Update command-line-args to version 4.0.0 🚀 #1059
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello lovely humans,
command-line-args just published its new version 4.0.0.
This version is not covered by your current version range.
Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.
I recommend you look into these changes and try to get onto the latest version of command-line-args.
Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.
Do you have any ideas how I could improve these pull requests? Did I report anything you think isn’t right?
Are you unsure about how things are supposed to work?
There is a collection of frequently asked questions and while I’m just a bot, there is a group of people who are happy to teach me new things. Let them know.
Good luck with your project ✨
You rock!
🌴
GitHub Release
Breaking changes since v3.0.5
The method signature changed. If you're passing a custom
argv
you now do it this way:Previously, it was done this way:
String
is the new defaulttype
function.New feature
Other changes
The new version differs by 15 commits .
4e40041
4.0.0
266098b
4.0.0-1
769b447
update examples
c7a43d9
overhauled the examples
8b98b9d
update validate example
2d70566
docs
978dae2
implemented partial parsing on grouped output
1808f75
4.0.0-0
279cc83
for non-multiple defaultOptions, the first parsed value is now taken - not the last
8f2ce47
method sig is now commandLineArgs(definitions, [options]). Added mocha and unknown-options examples.
8549990
implement 'partial' parse option.. initial tests
e72101e
refactored internals.. default option type is now 'String'.
c343257
Options with multiple:true set must always return an array. Fixed a case where that was not so (where a scalar defaultValue was supplied and no option values passed on the command line). Fixes #24
a04ff8f
fix tests.. linting
d54564a
remove support for node versions less than v4.0.0
See the full diff.
Screencast
Try it today. Free for private repositories during beta.