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

chore(main): release 15.2.0 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

🤖 I have created a release beep boop

15.2.0 (2023-05-16)

⚠ 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.
  • feat!: improve support for async/await yargs/yargs#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.
  • tweaks to ESM/Deno API surface: now exports yargs function by default; getProcessArgvWithoutBin becomes hidBin; types now exported for Deno.
  • find-up replaced with escalade; export map added (limits importable files in Node >= 12); yarser-parser@19.x.x (new decamelize/camelcase implementation).
  • usage: single character aliases are now shown first in help output
  • ts: yargs now ships with its own types
  • drop support for EOL Node 8 (#1686)
  • deps: yargs-parser@17.0.0 no longer implicitly creates arrays out of boolean arguments when duplicates are provided
  • deps: yargs-parser now throws on invalid combinations of config (#1470)
  • yargs-parser@16.0.0 drops support for Node 6
  • drop Node 6 support (#1461)
  • remove package.json-based parserConfiguration (#1460)
  • previously to this fix methods like yargs.getOptions() contained the state of the last command to execute.
  • do not allow additional positionals in strict mode
  • options with leading '+' or '0' now parse as strings
  • dropping Node 6 which hits end of life in April 2019
  • see yargs-parser@12.0.0 CHANGELOG
  • we now warn if the yargs stanza package.json is used.
  • Options absent from argv (not set via CLI argument) are now absent from the parsed result object rather tahn being set with undefined
  • drop Node 6 from testing matrix, such that we'll gradually start drifting away from supporting Node 4.
  • yargs-parser does not populate 'false' when boolean flag is not passed
  • tests that assert against help output will need to be updated
  • requiresArg now has significantly different error output, matching nargs.

Features

  • Add .parserConfiguration() method, deprecating package.json config (#1262) (3c6869a)
  • add applyBeforeValidation, for applying sync middleware before validation (5be206a)
  • add browser.d.ts and check for existence of Error.captureStackTrace() (#2144) (6192990)
  • add commands alias (similar to options function) (#1850) (00b74ad)
  • add method to hide option extras (#2156) (2c144c4)
  • add Norwegian Nynorsk translations (#1028) (a5ac213)
  • add parseSync/parseAsync method (#1898) (6130ad8)
  • add support for showVersion, similar to showHelp (#1831) (1a1e2d5)
  • add support for global middleware, useful for shared tasks like metrics (#1119) (9d71ac7)
  • add usage for single-digit boolean aliases (#1580) (6014e39)
  • adds config option for sorting command output (#1256) (6916ce9)
  • adds deprecation option for commands (027a636)
  • adds strictOptions() (#1738) (b215fba)
  • adds support for async builder (#1888) (ade29b8), closes #1042
  • adds support for ESM and Deno (#1708) (ac6d5d1)
  • adds support for multiple epilog messages (#1384) (07a5554)
  • allow calling standard completion function from custom one (#1855) (31765cb)
  • allow completionCommand to be set via showCompletionScript (#1385) (5562853)
  • allow default completion to be referenced and modified, in custom completion (#1878) (01619f6)
  • allow hidden options to be displayed with --show-hidden (#1061) (ea862ae)
  • allow setting scriptName $0 (#1143) (a2f2eae)
  • async command handlers (#1001) (241124b)
  • async: add support for async check and coerce (#1872) (8b95f57)
  • autocomplete choices for options (#2018) (01b2c6a)
  • command() now accepts an array of modules (f415388)
  • complete short options with a single dash (#1507) (99011ab)
  • completion: choices will now work for all possible aliases of an option and not just the default long option (30edd50)
  • completion: positional arguments completion (#2090) (00e4ebb)
  • completion: takes negated flags into account when boolean-negation is set (#1509) (7293ad5)
  • convert line break to whitespace for the description of the option (#2271) (4cb41dc)
  • deprecateOption (#1559) (8aae333)
  • deps: introduce yargs-parser with support for unknown-options-as-args (#1440) (4d21520)
  • deps: pull in yargs-parser@17.0.0 (#1553) (b9409da)
  • deps: yargs-parser now throws on invalid combinations of config (#1470) (c10c38c)
  • deps: yargs-parser with 'greedy-array' configuration (#1569) (a03a320)
  • deps: yargs-parser with support for collect-unknown-options (#1421) (d388a7c)
  • display appropriate $0 for electron apps (#1536) (d0e4379)
  • drop support for EOL Node 8 (#1686) (863937f)
  • expose Parser from require('yargs/yargs') (#1477) (1840ba2)
  • expose hideBin helper for CJS (#1768) (63e1173)
  • extend *.rc files in addition to json (#1080) (11691a6)
  • fallback to default bash completion (74c0ba5)
  • helpers: rebase, Parser, applyExtends now blessed helpers (#1733) (c7debe8)
  • i18n for ESM and Deno (#1735) (c71783a)
  • i18n: swap out os-locale dependency for simple inline implementation (#1356) (4dfa19b)
  • improve support for async/await (#1823) (169b815)
  • introduces strictCommands() subset of strict mode (#1540) (1d4cca3)
  • lang: add Finnish localization (language code fi) (222c8fe)
  • lang: Czech locale (#2220) (5895cf1)
  • locale: add Ukrainian locale (#1893) (c872dfc)
  • locales: Added Uzbek translation (#2024) (ee047b9)
  • make it possible to merge configurations when extending other config. (#1411) (5d7ad98)
  • middleware (#881) (77b8dbc)
  • 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)
  • onFinishCommand handler (#1473) (fe380cd)
  • options/positionals with leading '+' and '0' no longer parse as numbers (#1286) (e9dc3aa)
  • remove setPlaceholderKeys (#1105) (6ee2c82)
  • requiresArg is now simply an alias for nargs(1) (#1054) (a3ddacc)
  • support array of examples (#1682) (225ab82)
  • support defaultDescription for positional arguments (812048c)
  • support promises in middleware (f3a4e4f)
  • tweaks to API surface based on user feedback (#1726) (4151fee)
  • update Levenshtein to Damerau-Levenshtein (#1973) (d2c121b)
  • usage: add YARGS_DISABLE_WRAP env variable to disable wrap (#2210) (b680ace)
  • usage: single char aliases first in help (#1574) (a552990)
  • yargs-parser: introduce single-digit boolean aliases (#1576) (3af7f04)
  • zsh auto completion (#1292) (16c5d25), closes #1156

Bug Fixes

  • proto will now be replaced with proto in parse (#1591) (2474c38)
  • .argv and .parse() now invoke identical code path (#1126) (f13ebf4)
  • 'undefined' should be taken to mean no argument was provided (#1015) (c679e90)
  • $0 contains first arg in bundled electron apps (#1206) (567820b)
  • accept single function for middleware (66fd6f7)
  • Add dirname sanity check on findUp (#1036) (331d103)
  • add missing entries to published files (#2185) (5685382)
  • add package.json to module exports (#1818) (d783a49), closes #1817
  • add zsh script to files array (3180224)
  • address ambiguity between nargs of 1 and requiresArg (#1572) (a5edc32)
  • address bug when strict and async middleware used together (#2164) (cbc2eb7)
  • address display bug with default sub-commands (#2303) (9aa2490)
  • address issues with dutch translation (#1316) (0295132)
  • allows camel-case, variadic arguments, and strict mode to be combined (#1247) (eacc035)
  • always cache help message when running commands (#1865) (d57ca77), closes #1853
  • async middleware was called twice (#1422) (9a42b63)
  • async: don't call parse callback until async ops complete (#1896) (a93f5ff), closes #1888
  • avoid legacy accessors (#2013) (adb0d11)
  • better bash path completion (#1272) (da75ea2)
  • boolean option should work with strict (#1996) (e9379e2)
  • builder: apply default builder for showHelp/getHelp (#1913) (395bb67), closes #1912
  • builder: nested builder is now awaited (#1925) (b5accd6)
  • build: Node 12 is now minimum version (#1936) (0924566)
  • calling parse multiple times now appropriately maintains state (#1137) (#1369) (026b151)
  • cast error types as TypeScript 4.4 infers them as unknown instead of any (#2016) (01b2c6a)
  • choose correct config directory when require.main does not exist (#1056) (a04678c)
  • code was not passed to process.exit (#1742) (d1a9930)
  • coerce middleware should be applied once (#1978) (14bd6be)
  • coerce pollutes argv (#2161) (2d1136d)
  • coerce should play well with parser configuration (#2308) (8343c66)
  • coerce: options using coerce now displayed in help (#1911) (d2128cc), closes #1909
  • completion script name clashing on bash (#1903) (8f62d9a)
  • completion: Avoid default command and recommendations during completion (#1123) (036e7c5)
  • completion: changed the check for option arguments to match options that begin with '-', instead of '--', to include short options (30edd50)
  • completion: correct zsh installation instructions (22e9af2)
  • completion: don't show positional args choices with option choices (#2148) (b58b5bc)
  • completion: fix for completions that contain non-leading hyphens (30edd50)
  • completion: support for default flags (db35423)
  • conflicts and strip-dashed (#1998) (59a86fb)
  • copy the description of the option to its alias in completion (#2269) (f37ee6f)
  • deno: get yargs working on deno@1.5.x (#1799) (cb01c98)
  • deno: refactor to avoid prompts during module import (#2217) (b8c9eda)
  • deno: update types for deno ^1.4.0 (#1772) (0801752)
  • deno: use 'globalThis' instead of 'window' (#2186) (#2215) (561fc7a)
  • deno: use actual names for keys instead of inferring (#1891) (b96ef01)
  • dependencies: upgrade yargs-parser to fix #1602 (#1603) (c67c257)
  • deps: cliui with forced strip-ansi update (#2241) (38e8df1)
  • deps: cliui, find-up, and string-width, all drop Node 6 support (#1479) (6a9ebe2)
  • deps: fix enumeration for normalized path arguments (#1567) (0b5b1b0)
  • deps: update dependency yargs-parser to v21 (#2063) (76c1951)
  • deps: update dependency yargs-parser to v21.1.1 (#2231) (75b4d52)
  • deps: Update os-locale to avoid security vulnerability (#1270) (27bf739)
  • deps: upgrade cliui for compatibility with latest chalk. (#1330) (b20db65)
  • deps: use decamelize from npm instead of vendored copy (#1377) (015eeb9)
  • deps: yargs-parser update addressing several parsing bugs (#1357) (e230d5b)
  • detect zsh when zsh isnt run as a login prompt (#1395) (8792d13)
  • do not allow additional positionals in strict mode (35d777c)
  • do not crash completion when having negated options (#2322) (7f42848)
  • docs: broken markdown link (#1426) (236e24e)
  • docs: describe usage of .check() in more detail (932cd11)
  • docs: fix incorrect parserConfiguration documentation (2a99124)
  • docs: formalize existing callback argument to showHelp (#1386) (d217764)
  • docs: stop advertising .argv property (#2036) (4f5ecc1), closes #2035
  • docs: TypeScript import to prevent a future major release warning (#1441) (b1b156a)
  • docs: update boolean description and examples in docs (#1474) (afd5b48)
  • docs: use recommended cjs import syntax for ts examples (#1513) (f9a18bf)
  • don't fail if "fileURLToPath(import.meta.url)" throws (3a44796)
  • don't load config when processing positionals (5d0dc92)
  • dont clobber description for multiple option calls (#2171) (f91d9b3)
  • emit warning on version name collision (#1986) (d0e8292)
  • examples: fix usage-options.js to reflect current API (#1375) (6e5b76b)
  • exclude positionals from default completion (#1881) (0175677)
  • exit after async handler done (#2313) (e326cde)
  • exports: node 13.0-13.6 require a string fallback (#1776) (b45c43a)
  • expose helpers for legacy versions of Node.js (#1801) (107deaa)
  • failed command usage string is missing arg descriptions and optional args (#2105) (d6e342d)
  • fix promise check to accept any spec conform object (#1424) (0be43d2)
  • getCompletion() was not working for options (#1495) (463feb2)
  • groups were not being maintained for nested commands (#1430) (d38650e)
  • handle multiple node_modules folders determining mainFilename for ESM (#2123) (e0823dd)
  • help always displayed for the first command parsed having an async handler (#1535) (d585b30)
  • help command spacing when scriptName is empty (#1994) (d33e997)
  • hide hidden options from help output even if they are in a group (#1221) (da54028)
  • hide hidden options from completion (#2143) (e086dfa), closes #2142
  • Deno bundle yargsParser initialization failure yargs/yargs#1841 (comment) (b96ef01)
  • i18n: Japanese translation phrasing (#1619) (0894175)
  • i18n: rename unclear 'implication failed' to 'missing dependent arguments' (#1317) (bf46813)
  • implies should not fail when implied key's value is 0, false or empty string (#1985) (8010472)
  • import yargs/yargs in esm projects (#2151) (95aed1c)
  • improve Norwegian Bokmål translations (#1208) (a458fa4)
  • improve Norwegian Nynorsk translations (#1207) (d422eb5)
  • lang: add missing terms to Russian translation (#2181) (1c331f2)
  • lang: fix "Not enough non-option arguments" message for the Czech language (#2242) (3987b13)
  • lang: typo in Finnish unknown argument singular form (#2222) (a6dfd0a)
  • locales: only translate default option group name (acc16de)
  • locales: remove extra space in French for 'default' (#1564) (ecfc2c4)
  • make positionals in -- count towards validation (#1752) (eb2b29d)
  • middleware added multiple times due to reference bug (#1282) (64af518)
  • middleware should work regardless of when method is called (664b265), closes #1178
  • misspelling of package.json engines field (0891d0e)
  • modules: module path was incorrect (#1759) (95a4a0a)
  • move yargs.cjs to yargs to fix Node 10 imports (#1747) (5bfb85b)
  • populate correct value on yargs.parsed and stop warning on access (#1412) (bb0eb52)
  • populate positionals when unknown-options-as-args is set (#1508) (bb0f2eb), closes #1444
  • positional array defaults should not be combined with provided values (#2006) (832222d)
  • positional: positional strings no longer drop decimals (#1761) (e1a300f)
  • positionals should not overwrite options (#1992) (9d84309)
  • prefer user supplied script name in usage (#1383) (28c74b9)
  • prevent infinite loop with empty locale (#2179) (b672e70)
  • properties accessed on singleton now reflect current state of instance (#1366) (409d35b)
  • re-add options to check callback (#2079) (e75319d)
  • remove the trailing white spaces from the help output (#1090) (3f0746c)
  • requiresArg should only be enforced if argument exists (#1043) (fbf41ae)
  • Set implicit nargs=1 when type=number requiresArg=true (#1050) (2b56812)
  • show 2 dashes on help for single digit option key or alias (#1493) (63b3dd3)
  • show message when showHelpOnFail is chained globally (#2154) (ad9fcac)
  • showCompletionScript was logging script twice (#1388) (07c8537)
  • showHelp() and .getHelp() now return same output for commands as --help (#1826) (36abf26)
  • stop-parse was not being respected by commands (#1459) (12c82e6)
  • strict mode: report default command unknown arguments (#1626) (69f29a9)
  • strict should fail unknown arguments (#1977) (c804f0d)
  • strict() should not ignore hyphenated arguments (#1414) (b774b5e)
  • support merging deeply nested configuration (#1423) (bae66fe)
  • support options/sub-commands in zsh completion (0a96394)
  • temporary fix for libraries that call Object.freeze() (#1483) (99c2dc8)
  • tolerate null prototype for config objects with extends (#1376) (3d26d11), closes #1372
  • translation not working when using __ with a single parameter (#1183) (f449aea)
  • translations: add French translation for unknown command (#1563) (18b0b75)
  • translations: correct Korean translation (#2095) (c7c2b9e)
  • translations: fix pluralization in error messages. (#1557) (94fa38c)
  • typescript: address warning with objectKeys (394f5f8)
  • typescript: yargs-parser was breaking @types/yargs (#1745) (2253284)
  • update to yargs-parser with fix for array default values (#1463) (ebee59d)
  • upgrade os-locale to version that addresses license issue (#1195) (efc0970)
  • usage: translate 'options' group only when displaying help (#1600) (e60b39b)
  • validation: Use the error as a message when none exists otherwise (#1268) (0510fe6)
  • veriadic arguments override array provided in config (the same as multiple dash arguments). (4dac5b8)
  • wrap unknown args in quotes (#2092) (6a29778)
  • wrap(null) no longer causes strange indentation behavior (#1988) (e1871aa)
  • yargs: add missing command(module) signature (#1707) (0f81024), closes #1704
  • yargs: correct support of bundled electron apps (#1554) (a0b61ac)
  • zsh completion is now autoloadable (#1856) (d731f9f)

Miscellaneous Chores

Code Refactoring

  • coerce: coerce is now applied before validation. (8b95f57)
  • deprecated reset() method is now private (call yargs() instead). (376f892)
  • implicitly private methods are now actually private (376f892)
  • remove package.json-based parserConfiguration (#1460) (0d3642b)
  • ts: ship yargs.d.ts (#1671) (c06f886)
  • yargs-factory: refactor yargs-factory to use class (#1895) (376f892)

This PR was generated with Release Please. See documentation.

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