-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Plugins - now allow falsy default values. #7071
Plugins - now allow falsy default values. #7071
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7071 +/- ##
==========================================
+ Coverage 88.48% 88.48% +<.01%
==========================================
Files 231 231
Lines 8478 8479 +1
==========================================
+ Hits 7502 7503 +1
Misses 976 976
Continue to review full report at Codecov.
|
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.
Hey @neverendingqs thanks for working on this 👍
The code looks good so far. The only thing I'm concerned about is whether this change would break existing plugins which rely on the current behavior of falsy default values.
@medikoo what are your thoughts around that? 🤔
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.
@neverendingqs great thanks for that PR. It's a very good call!.
I've suggested one improvement, so we handle it more naturally (where JS language is concerned)
Yes, technically if one put I would drive it in, as bug fix |
100% agree with that sentiment 👍 I'd also treat it as a bug rather than a feature. |
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.
Thank you @neverendingqs, looks great!
What did you implement
Previously, the plugin manager did not properly set the default value if the default value is
0
,false
, or''
. This PR fixes that.Closes #XXXXX (none that I can find)
How can we verify it
serverless.yml
:.serverless_plugins/serverless-test-plugin.js
:Then run
Before:
After:
Todos
Useful Scripts
npm run test:ci
--> Run all validation checks on proposed changesnpm run lint:updated
--> Lint all the updated filesnpm run lint:fix
--> Automatically fix lint problems (if possible)npm run prettier-check:updated
--> Check if updated files adhere to Prettier confignpm run prettify:updated
--> Prettify all the updated filesIs this ready for review?: YES
Is it a breaking change?: NO