You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.
So I'm wondering if it might be worthwhile to reconsider the current format of the "requires" value, changing it to something that can be more consistent and robust.
How about this: The value of "requires" is always an array of objects, each object with these properties:
property (required): The required property name.
operator (optional): An operator pertaining to the property (e.g. "!", "<=").
values (optional): An array of objects representing satisfactory values for the specified property, each object with these properties:
value (required): The satisfactory value.
operator (optional): An operator pertaining to the value. For example, maybe you in the future we'll want to specify that some property must have any value other than 0, or any value greater than 0.
The main principle here is that an object is going to be more flexible and future-proof than a string.
That's my idea.
The text was updated successfully, but these errors were encountered:
I'm thinking about:
<=
key shows up on an object in the"requires"
array."requires"
array to itself be an array."!"
)."requires"
array be sometimes strings and sometimes objects."requires"
values — with validation code that will have to deal with the above.So I'm wondering if it might be worthwhile to reconsider the current format of the
"requires"
value, changing it to something that can be more consistent and robust.How about this: The value of
"requires"
is always an array of objects, each object with these properties:property
(required): The required property name.operator
(optional): An operator pertaining to the property (e.g."!"
,"<="
).values
(optional): An array of objects representing satisfactory values for the specified property, each object with these properties:value
(required): The satisfactory value.operator
(optional): An operator pertaining to the value. For example, maybe you in the future we'll want to specify that some property must have any value other than0
, or any value greater than0
.The main principle here is that an object is going to be more flexible and future-proof than a string.
That's my idea.
The text was updated successfully, but these errors were encountered: