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

Avoid args being rounded and converted to numbers #5361

Merged
merged 4 commits into from
Oct 14, 2018

Conversation

07Gond
Copy link
Contributor

@07Gond 07Gond commented Oct 6, 2018

What did you implement:

Closes #5050

How did you implement it:

After the CLI get the args, before the pass to the 'minimist' I'm handling the string values and encode their to a base64 string like a workaround. After the minimist process, I get again the values and decoded again to get the original values.

How can we verify it:

If we test the CLI with numbers and numbers like strings always they going to be treated as strings:

image
image

Also, there is a unit test added:

"should only return numbers like strings when numbers are given on options"

If we only executed it, we'll we have:
image

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • 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

@horike37 horike37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@07Gond
Thank you for taking care of it 👍 I think this is a good approach.
LGTM 💯 🎉

@horike37 horike37 added this to the 1.33.0 milestone Oct 14, 2018
@horike37 horike37 merged commit af26fbb into serverless:master Oct 14, 2018
@07Gond
Copy link
Contributor Author

07Gond commented Oct 14, 2018

Whoah!!! Thanks!
And thank you guys for this repo. I use it in my daily work! 💪
This is my first PR that was merged! 😄!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants