-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make options optional #5499
Make options optional #5499
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
||
// resolve defaults for optional arguments | ||
if (value === undefined) { | ||
taskArguments[option.name] = option.defaultValue; |
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 wouldn't modify this input here, as that can be a user object.
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.
Also, shouldn't we validate the type after resolving the default?
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.
Will be addressed in a follow-up PR.
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 just left two small comments.
Unfortunately, I think all your open PRs need to be rebased because of the new assertion-related eslint rules.
67037d5
to
1a6f115
Compare
ccb6b8e
to
9bd70ac
Compare
Merge after #5495
Closes #5419