Skip to content
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

Replace minimist with yargs-parser #7187

Merged
merged 4 commits into from Jan 10, 2020
Merged

Conversation

@richarddd
Copy link
Contributor

richarddd commented Jan 8, 2020

What did you implement

Replaces minimist with yargs-parser

Also fixes an issue where "nested" arguments contain an equals sign

Closes #6083

How can we verify it

invoke local --function hello --docker --docker-arg="-e AWS_ACCESS_KEY_ID=1" --docker-arg="-e AWS_SECRET_ACCESS_KEY=1"

Todos

Useful Scripts
  • npm run test:ci --> Run all validation checks on proposed changes
  • npm run lint:updated --> Lint all the updated files
  • npm run lint:fix --> Automatically fix lint problems (if possible)
  • npm run prettier-check:updated --> Check if updated files adhere to Prettier config
  • npm run prettify:updated --> Prettify all the updated files
  • Write and run all tests
  • Write documentation
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

Copy link
Member

medikoo left a comment

@richarddd that's really a great idea! We should have done it earlier.

I've suggested some improvements that'll make yargs-parser based version even leaner.

Thank you!

lib/utils/resolveCliInput.js Show resolved Hide resolved
package.json Show resolved Hide resolved
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 10, 2020

Codecov Report

Merging #7187 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7187      +/-   ##
==========================================
+ Coverage   87.99%   88.14%   +0.14%     
==========================================
  Files         236      236              
  Lines        8608     8641      +33     
==========================================
+ Hits         7575     7617      +42     
+ Misses       1033     1024       -9
Impacted Files Coverage Δ
lib/utils/resolveCliInput.js 100% <100%> (ø) ⬆️
...ckage/compile/events/apiGateway/lib/permissions.js 87.5% <0%> (-5.36%) ⬇️
lib/plugins/package/lib/packageService.js 86.06% <0%> (-1.44%) ⬇️
lib/plugins/aws/package/compile/functions/index.js 96.73% <0%> (ø) ⬆️
lib/plugins/aws/invokeLocal/index.js 77% <0%> (ø) ⬆️
lib/plugins/aws/lib/updateStack.js 98.11% <0%> (+0.07%) ⬆️
lib/plugins/aws/lib/naming.js 97.81% <0%> (+0.08%) ⬆️
lib/plugins/aws/provider/awsProvider.js 93% <0%> (+0.14%) ⬆️
lib/utils/downloadTemplateFromRepo.js 96.63% <0%> (+0.41%) ⬆️
...ins/aws/package/compile/events/cloudFront/index.js 100% <0%> (+10.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f9f808...ba0d95f. Read the comment docs.

@richarddd

This comment has been minimized.

Copy link
Contributor Author

richarddd commented Jan 10, 2020

@medikoo done :)

Copy link
Member

medikoo left a comment

Looks great! Thank you @richarddd

@medikoo medikoo merged commit 780fb46 into serverless:master Jan 10, 2020
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - package.json (serverless) No new issues
Details
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
@serverless serverless deleted a comment Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.