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 1.0.0 #2082

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

🤖 I have created a release beep boop

1.0.0 (2021-11-30)

⚠ BREAKING CHANGES

  • node: drop Node 10 (feat(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 (refactor(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 #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 (feat!: drop support for EOL Node 8 #1686)
  • deps: 15.2.0
  • 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 (feat(deps)!: yargs-parser@16.0.0 now throws on invalid combinations of config #1470)
  • yargs-parser@16.0.0 drops support for Node 6
  • drop Node 6 support (chore!: drop Node 6 support #1461)
  • remove package.json-based parserConfiguration (refactor!: 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.
  • .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command.
  • previously hidden options were simply implied using a falsy description
  • help command now only executes if it's the last positional in argv._
  • version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled).
  • environment variables will now override config files, '--' is now populated rather than '_' when parsing is stopped.
  • extends functionality now always loads the JSON provided, rather than reading from a specific key
  • this pull requests introduces language features that require Node 4+.

Features

  • .usage() can now be used to configure a default command (#975) (7269531)
  • Add .parserConfiguration() method, deprecating package.json config (#1262) (3c6869a)
  • add applyBeforeValidation, for applying sync middleware before validation (5be206a)
  • add commands alias (similar to options function) (#1850) (00b74ad)
  • add missing simple chinese locale strings (#1004) (3cc24ec)
  • 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 extends to inherit from a module (#865) (89456d9)
  • allow hidden options to be displayed with --show-hidden (#1061) (ea862ae)
  • allow implies and conflicts to accept array values (#922) (abdc7da)
  • allow parse with no arguments as alias for yargs.argv (#944) (a9f03e7)
  • 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: takes negated flags into account when boolean-negation is set (#1509) (7293ad5)
  • 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)
  • enable .help() and .version() by default (#912) (1ef44e0)
  • 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)
  • hidden options are now explicitly indicated using "hidden" flag (#962) (280d0d6)
  • 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)
  • introduce .positional() for configuring positional arguments (#967) (cb16460)
  • introduces strictCommands() subset of strict mode (#1540) (1d4cca3)
  • lang: add Finnish localization (language code fi) (222c8fe)
  • 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)
  • multiple usage calls are now collected, not replaced (#958) (74a38b2)
  • 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)
  • replace /bin/bash with file basename (#983) (20bb99b)
  • 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)
  • to allow both undefined and nulls, for benefit of TypeScript (#945) (792564d)
  • translation: Update pl-PL translations (#985) (5a9c986)
  • tweaks to API surface based on user feedback (#1726) (4151fee)
  • update Levenshtein to Damerau-Levenshtein (#1973) (d2c121b)
  • 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' default value for choices resulted in validation failing (782b896)
  • '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 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 with handling of arrays of implications (c240661)
  • 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: options using coerce now displayed in help (#1911) (d2128cc), closes #1909
  • command: Run default cmd even if the only cmd (#950) (7b22203)
  • completion script name clashing on bash (#1903) (8f62d9a)
  • completion: Avoid default command and recommendations during completion (#1123) (036e7c5)
  • config and normalise can be disabled with false (#952) (3bb8771)
  • conflicts and strip-dashed (#1998) (59a86fb)
  • defaulting keys to 'undefined' interfered with conflicting key logic (a8e0cff)
  • deno: get yargs working on deno@1.5.x (#1799) (cb01c98)
  • deno: update types for deno ^1.4.0 (#1772) (0801752)
  • deno: use actual names for keys instead of inferring (#1891) (b96ef01)
  • dependencies: upgrade yargs-parser to fix #1602 (#1603) (c67c257)
  • 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 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)
  • 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 bother calling JSON.stringify() on string default values (#891) (628be21)
  • don't fail if "fileURLToPath(import.meta.url)" throws (3a44796)
  • don't load config when processing positionals (5d0dc92)
  • emit warning on version name collision (#1986) (d0e8292)
  • examples: fix usage-options.js to reflect current API (#1375) (6e5b76b)
  • exclude positional arguments from completion output (#927) (71c7ec7)
  • exclude positionals from default completion (#1881) (0175677)
  • exports: node 13.0-13.6 require a string fallback (#1776) (b45c43a)
  • expose helpers for legacy versions of Node.js (#1801) (107deaa)
  • fix promise check to accept any spec conform object (#1424) (0be43d2)
  • fix tiny spacing issue with usage (#992) (7871327)
  • getCompletion() was not working for options (#1495) (463feb2)
  • groups were not being maintained for nested commands (#1430) (d38650e)
  • help always displayed for the first command parsed having an async handler (#1535) (d585b30)
  • help command spacing when scriptName is empty (#1994) (d33e997)
  • help now takes precedence over command recommendation (#866) (17e3567)
  • help strings for nested commands were missing parent commands (#990) (cd1ca15)
  • hide hidden options from help output even if they are in a group (#1221) (da54028)
  • Deno bundle yargsParser initialization failure #1841 (comment) (b96ef01)
  • i18n: Japanese translation phrasing (#1619) (0894175)
  • i18n: rename unclear 'implication failed' to 'missing dependent arguments' (#1317) (bf46813)
  • implications fails only displayed once (#954) (ac8088b)
  • implies should not fail when implied key's value is 0, false or empty string (#1985) (8010472)
  • improve Norwegian Bokmål translations (#1208) (a458fa4)
  • improve Norwegian Nynorsk translations (#1207) (d422eb5)
  • less eager help command execution (#972) (8c1d7bf)
  • 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)
  • parse array rather than string, so that quotes are safe (#993) (c351685)
  • 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 arguments now work if no handler is provided to inner command (#864) (e28ded3)
  • 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)
  • 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)
  • 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 should not fail for hidden options (#949) (0e0c58d)
  • 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)
  • the positional argument parse was clobbering global flag arguments (#984) (7e58453)
  • 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: fix pluralization in error messages. (#1557) (94fa38c)
  • 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)
  • use correct completion command in generated completion script (#988) (3c8ac1d)
  • validation: Use the error as a message when none exists otherwise (#1268) (0510fe6)
  • 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