Upgrade yargs: 16.2.0 → 17.1.1 (major)
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳ ️ yargs (16.2.0 → 17.1.1) · Repo · Changelog
Release Notes
17.1.1
Bug Fixes
17.1.0
Features
Bug Fixes
- coerce middleware should be applied once (#1978) (14bd6be)
- implies should not fail when implied key's value is 0, false or empty string (#1985) (8010472)
- positionals should not overwrite options (#1992) (9d84309)
- strict should fail unknown arguments (#1977) (c804f0d)
- wrap(null) no longer causes strange indentation behavior (#1988) (e1871aa)
17.0.1
Bug Fixes
17.0.0
⚠ BREAKING CHANGES
- node: drop Node 10 (#1919)
- implicitly private methods are now actually private
- deprecated reset() method is now private (call yargs() instead).
- yargs-factory: refactor yargs-factory to use class (#1895)
- .positional() now allowed at root level of yargs.
- coerce: coerce is now applied before validation.
- async: yargs now returns a promise if async or check are asynchronous.
- middleware: global middleware now applied when no command is configured.
- #1823 contains the following breaking API changes:
- now returns a promise if handler is async.
- onFinishCommand removed, in favor of being able to await promise.
- getCompletion now invokes callback with err and `completions, returns promise of completions.
Features
- add commands alias (similar to options function) (#1850) (00b74ad)
- add parseSync/parseAsync method (#1898) (6130ad8)
- add support for
showVersion
, similar toshowHelp
(#1831) (1a1e2d5)- adds support for async builder (#1888) (ade29b8), closes #1042
- allow calling standard completion function from custom one (#1855) (31765cb)
- allow default completion to be referenced and modified, in custom completion (#1878) (01619f6)
- async: add support for async check and coerce (#1872) (8b95f57)
- improve support for async/await (#1823) (169b815)
- locale: add Ukrainian locale (#1893) (c872dfc)
- middleware: async middleware can now be used before validation. (e0f9363)
- middleware: global middleware now applied when no command is configured. (e0f9363)
- node: drop Node 10 (#1919) (5edeb9e)
Bug Fixes
- always cache help message when running commands (#1865) (d57ca77), closes #1853
- async: don't call parse callback until async ops complete (#1896) (a93f5ff), closes #1888
- builder: apply default builder for showHelp/getHelp (#1913) (395bb67), closes #1912
- builder: nested builder is now awaited (#1925) (b5accd6)
- coerce: options using coerce now displayed in help (#1911) (d2128cc), closes #1909
- completion script name clashing on bash (#1903) (8f62d9a)
- deno: use actual names for keys instead of inferring (#1891) (b96ef01)
- exclude positionals from default completion (#1881) (0175677)
- #1841 (comment) (b96ef01)
- showHelp() and .getHelp() now return same output for commands as --help (#1826) (36abf26)
- zsh completion is now autoloadable (#1856) (d731f9f)
Code Refactoring
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 56 commits:
chore: release 17.1.1 (#2007)
fix: positional array defaults should not be combined with provided values (#2006)
chore: release 17.1.0 (#1984)
build: use denoland/setup-deno (#1991)
fix: wrap(null) no longer causes strange indentation behavior (#1988)
chore(deps): update dependency @types/mocha to v9 (#1993)
fix: positionals should not overwrite options (#1992)
fix: implies should not fail when implied key's value is 0, false or empty string (#1985)
fix: coerce middleware should be applied once (#1978)
feat: update Levenshtein to Damerau-Levenshtein (#1973)
fix: strict should fail unknown arguments (#1977)
i18n: Update zh_TW.json (#1976)
docs: add config header & add .argv union & header for choices (#1958)
chore(deps): update dependency mocha to v9 (#1962)
refactor: use modern array helpers, etc
chore: release 17.0.1 (#1937)
refactor: small simplifications (#1933)
fix(build): Node 12 is now minimum version (#1936)
chore: release 17.0.0 (#1876)
docs: document hideBin (#1932)
docs: add link to list of functions to the start of the API docs for better discoverability (#1915)
fix(builder): nested builder is now awaited (#1925)
build: ignore string-width (#1920)
feat(node)!: drop Node 10 (#1919)
fix(builder): apply default builder for showHelp/getHelp (#1913)
fix(coerce): options using coerce now displayed in help (#1911)
fix: completion script name clashing on bash (#1903)
test: add test demonstrating how to set custom description and aliases for help/version
docs(webpck): add updated docs on webpack (#1900)
docs: clarify .check() behavior (#1907)
test(deno): add example of parseAsync behavior (#1902)
build(bundle): use terser to minify CJS code (#1901)
build: do not publish **/*.d.ts
feat: add parseSync/parseAsync method (#1898)
fix(async): don't call parse callback until async ops complete (#1896)
feat(locale): add Ukrainian locale (#1893)
refactor(yargs-factory)!: refactor yargs-factory to use class (#1895)
feat: adds support for async builder (#1888)
fix(deno): use actual names for keys instead of inferring (#1891)
docs(usage): add return to fix TS inheritance (#1889)
feat: add support for `showVersion`, similar to `showHelp` (#1831)
feat(async): add support for async check and coerce (#1872)
fix: exclude positionals from default completion (#1881)
fix: showHelp() and .getHelp() now return same output for commands as --help (#1826)
docs: add completion filter docs (#1880)
feat: allow default completion to be referenced and modified, in custom completion (#1878)
feat: add commands alias (similar to options function) (#1850)
feat: allow calling standard completion function from custom one (#1855)
refactor: simplify/fix linting (#1867)
meta: middleware improvements (#1852)
fix: always cache help message when running commands (#1865)
fix: zsh completion is now autoloadable (#1856)
feat: improve support for async/await (#1823)
docs: add descriptions of parsing numbers (#1824)
docs: address spelling mistake
chore(deps): update standardx
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase
.
All Depfu comment commands
- @depfu rebase
- Rebases against your default branch and redoes this update
- @depfu recreate
- Recreates this PR, overwriting any edits that you've made to it
- @depfu merge
- Merges this PR once your tests are passing and conflicts are resolved
- @depfu close
- Closes this PR and deletes the branch
- @depfu reopen
- Restores the branch and reopens this PR (if it's closed)
- @depfu pause
- Ignores all future updates for this dependency and closes this PR
- @depfu pause [minor|major]
- Ignores all future minor/major updates for this dependency and closes this PR
- @depfu resume
- Future versions of this dependency will create PRs again (leaves this PR as is)