-
Notifications
You must be signed in to change notification settings - Fork 212
Support for writing params of type List during discovery #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss offline whether this should be a JSON array, as presented, or a string + delimiter, as originally designed
expect(p1.equals(p2).value()).to.be.false; | ||
expect(p1.notEquals(p2).value()).to.be.true; | ||
|
||
expect(() => p1.greaterThan(p1).value()).to.throw; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I wish we had done operators in the type system with strong types for each expression type =/
src/params/types.ts
Outdated
@@ -159,6 +164,7 @@ type ParamValueType = "string" | "list" | "boolean" | "int" | "float" | "secret" | |||
type ParamInput<T> = | |||
| { text: TextInput<T> } | |||
| { select: SelectInput<T> } | |||
| { selectList: SelectListInput } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was called MultiSelect in the spec since that name has been common since the days of jQuery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a changelog entry?
}); | ||
|
||
it("falls back on the javascript zero values in case a list param's is unparsable as string[]", () => { | ||
const notAllStrings = params.defineList("BAD_LIST"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no action required - but i can see this being pretty frustrating if we silent fall back to an empty list if the list isn't made up of all string elements :/.
I don't think we expect this to happen in real life since environment variable will almost always be strings anyway?
No description provided.