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: release 15.2.0 #1

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

chore: release 15.2.0 #1

wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link

🤖 I have created a release *beep* *boop*

15.2.0 (2020-09-14)

⚠ BREAKING CHANGES

  • 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 yargs/yargs#1686)
  • deps: yargs-parser@17.0.0 no longer implicitly creates arrays out of boolean
  • deps: yargs-parser now throws on invalid combinations of config (feat(deps)!: yargs-parser@16.0.0 now throws on invalid combinations of config yargs/yargs#1470)
  • yargs-parser@16.0.0 drops support for Node 6
  • drop Node 6 support (chore!: drop Node 6 support yargs/yargs#1461)
  • remove package.json-based parserConfiguration (refactor!: remove package.json-based parserConfiguration yargs/yargs#1460)
  • we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed
  • 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+.
  • the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global.
  • extends key in config file is now used for extending other config files
  • environment variables now take precedence over config files.
  • context now takes precedence over argv and defaults
  • there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way.
  • by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands.
  • yargs will no longer aggressively supress errors, allowing errors that are not generated internally to bubble.
  • coerce is now applied as a final step after other parsing is complete
  • fail is now applied globally.
  • we now default to an empty builder function when command is executed with no builder.
  • yargs-parser now better handles negative integer values, at the cost of handling numeric option names, e.g., -1 hello
  • default: removed undocumented defaults alias for default.
  • introduces a default help command which outputs help, as an alternative to a help flag.

Features

  • adds strictOptions() (#1738) (b215fba)
  • helpers: rebase, Parser, applyExtends now blessed helpers (#1733) (c7debe8)
  • .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 missing simple chinese locale strings (#1004) (3cc24ec)
  • add Norwegian Nynorsk translations (#1028) (a5ac213)
  • 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 support for ESM and Deno (#1708) (ac6d5d1)
  • adds support for multiple epilog messages (#1384) (07a5554)
  • allow completionCommand to be set via showCompletionScript (#1385) (5562853)
  • allow hidden options to be displayed with --show-hidden (#1061) (ea862ae)
  • allow setting scriptName $0 (#1143) (a2f2eae)
  • async command handlers (#1001) (241124b)
  • complete short options with a single dash (#1507) (99011ab)
  • deprecateOption (#1559) (8aae333)
  • display appropriate $0 for electron apps (#1536) (d0e4379)
  • drop support for EOL Node 8 (#1686) (863937f)
  • expose Parser from require('yargs/yargs') (#1477) (1840ba2)
  • extend *.rc files in addition to json (#1080) (11691a6)
  • hidden options are now explicitly indicated using "hidden" flag (#962) (280d0d6)
  • i18n for ESM and Deno (#1735) (c71783a)
  • make it possible to merge configurations when extending other config. (#1411) (5d7ad98)
  • options/positionals with leading '+' and '0' no longer parse as numbers (#1286) (e9dc3aa)
  • support array of examples (#1682) (225ab82)
  • tweaks to API surface based on user feedback (#1726) (4151fee)
  • completion: takes negated flags into account when boolean-negation is set (#1509) (7293ad5)
  • 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)
  • i18n: swap out os-locale dependency for simple inline implementation (#1356) (4dfa19b)
  • lang: add Finnish localization (language code fi) (222c8fe)
  • usage: single char aliases first in help (#1574) (a552990)
  • yargs-parser: introduce single-digit boolean aliases (#1576) (3af7f04)
  • .help() API can now enable implicit help command (#574) (7645019)
  • add .commandDir(dir) to API to apply all command modules from a relative directory (#494) (b299dff)
  • add coerce api (#586) (1d53ccb)
  • add conflicts and implies shorthands. (#753) (bd1472b)
  • add new pt_BR translations (#674) (5615a82)
  • add support for numeric commands (#825) (fde0564)
  • add traditional Chinese translation (#780) (6ab6a95)
  • adds recommendCommands() for command suggestions (#580) (59474dc)
  • allow extends to inherit from a module (#865) (89456d9)
  • allow implies and conflicts to accept array values (#922) (abdc7da)
  • allow parse with no arguments as alias for yargs.argv (#944) (a9f03e7)
  • allow provided config object to extend other configs (#779) (3280dd0)
  • allow strict mode to be disabled (#840) (6f78c05)
  • apply .env() globally (#553) (be65728)
  • apply default builder to command() and apply fail() handlers globally (#583) (0aaa68b)
  • builder is now optional for a command module (#545) (8d6ad6e)
  • enable .help() and .version() by default (#912) (1ef44e0)
  • function argument validation (#773) (22ed9bb)
  • if only one column is provided for examples, allow it to take up the entire line (#749) (7931652)
  • implement conflicts() for defining mutually exclusive arguments; thanks @madcampos! (#741) (5883779)
  • initial support for command aliases (#647) (127a040)
  • interpret demand() numbers as relative to executing command (#582) (927810c)
  • introduce .positional() for configuring positional arguments (#967) (cb16460)
  • introduce custom yargs error object (#765) (8308efa)
  • introduces strictCommands() subset of strict mode (#1540) (1d4cca3)
  • introduces support for default commands, using the '*' identifier (#785) (d78a0f5)
  • Italian translations for 'did you mean' and 'aliases' (#673) (81984e6)
  • make opts object optional for .option() (#624) (4f29de6)
  • middleware (#881) (77b8dbc)
  • multiple usage calls are now collected, not replaced (#958) (74a38b2)
  • onFinishCommand handler (#1473) (fe380cd)
  • pull in yargs-parser introducing additional settings (#688), and fixing #716 (#722) (702995a)
  • remove setPlaceholderKeys (#1105) (6ee2c82)
  • replace /bin/bash with file basename (#983) (20bb99b)
  • requiresArg is now simply an alias for nargs(1) (#1054) (a3ddacc)
  • rethink how options are inherited by commands (#766) (ab1fa4b)
  • reworking yargs API to make it easier to run in headless environments, e.g., Slack (#646) (f284c29)
  • split demand() into demandCommand()/demandOption() (#740) (66573c8)
  • support defaultDescription for positional arguments (812048c)
  • support for positional argument aliases (#727) (27e1a57)
  • support promises in middleware (f3a4e4f)
  • to allow both undefined and nulls, for benefit of TypeScript (#945) (792564d)
  • Turkish translations for 'did you mean' and 'aliases' (#660) (072fd45)
  • update to yargs-parser that addresses #598, #617 (#700) (54cb31d)
  • yargs is now passed as the third-argument to fail handler (#613) (21b74f9)
  • zsh auto completion (#1292) (16c5d25), closes #1156
  • command: add camelcase commands to argv (#658) (b1cabae)
  • command: builder function no longer needs to return the yargs instance (#549) (eaa2873)
  • command: derive missing command string from module filename (#527) (20d4b8a)
  • locales: add Hindi translations (9290912)
  • locales: add Hungarian translations (be92327)
  • locales: Add Thai locale file (#679) (c05e36b)
  • locales: Added Belarusian translation (#690) (68dac1f)
  • locales: Create nl.json (#687) (46ce1bb)
  • locales: Japanese translations for 'did you mean' and 'aliases' (#651) (5eb78fc)
  • locales: Polish translations for 'did you mean' and 'aliases' (#650) (c951c0e)
  • translation: Update pl-PL translations (#985) (5a9c986)
  • update yargs-parser to version 3.1.0 (#581) (882a127)

Bug Fixes

  • --help with default command should print top-level help (#810) (9c03fa4)
  • .argv and .parse() now invoke identical code path (#1126) (f13ebf4)
  • make positionals in -- count towards validation (#1752) (eb2b29d)
  • move yargs.cjs to yargs to fix Node 10 imports (#1747) (5bfb85b)
  • deps: cliui, find-up, and string-width, all drop Node 6 support (#1479) (6a9ebe2)
  • deps: fix enumeration for normalized path arguments (#1567) (0b5b1b0)
  • docs: broken markdown link (#1426) (236e24e)
  • docs: describe usage of .check() in more detail (932cd11)
  • docs: formalize existing callback argument to showHelp (#1386) (d217764)
  • docs: TypeScript import to prevent a future major release warning (#1441) (b1b156a)
  • docs: use recommended cjs import syntax for ts examples (#1513) (f9a18bf)
  • i18n: Japanese translation phrasing (#1619) (0894175)
  • locales: only translate default option group name (acc16de)
  • locales: remove extra space in French for 'default' (#1564) (ecfc2c4)
  • strict mode: report default command unknown arguments (#1626) (69f29a9)
  • translations: fix pluralization in error messages. (#1557) (94fa38c)
  • typescript: yargs-parser was breaking @types/yargs (#1745) (2253284)
  • code was not passed to process.exit (#1742) (d1a9930)
  • translations: add French translation for unknown command (#1563) (18b0b75)
  • usage: translate 'options' group only when displaying help (#1600) (e60b39b)
  • yargs: add missing command(module) signature (#1707) (0f81024), closes #1704
  • proto will now be replaced with proto in parse (#1591) (2474c38)
  • address ambiguity between nargs of 1 and requiresArg (#1572) (a5edc32)
  • yargs: correct support of bundled electron apps (#1554) (a0b61ac)
  • 'undefined' default value for choices resulted in validation failing (782b896)
  • 'undefined' should be taken to mean no argument was provided (#1015) (c679e90)
  • [object Object] was accidentally being populated on options object (#736) (f755e27)
  • $0 contains first arg in bundled electron apps (#1206) (567820b)
  • accept single function for middleware (66fd6f7), closes #1214 #1214
  • Add dirname sanity check on findUp (#1036) (331d103)
  • add config lookup for .implies() (#556) (8d7585c)
  • add zsh script to files array (3180224)
  • address bug with handling of arrays of implications (c240661)
  • address issues with dutch translation (#1316) (0295132)
  • address min/max validation message regression (#750) (2e5ce0f)
  • address positional argument strict() bug introduced in #766 (#784) (a8528e6)
  • allows camel-case, variadic arguments, and strict mode to be combined (#1247) (eacc035)
  • async middleware was called twice (#1422) (9a42b63)
  • better bash path completion (#1272) (da75ea2)
  • cache pkg lookups by path to avoid returning the wrong one (#552) (fea7e0b)
  • calling parse multiple times now appropriately maintains state (#1137) (#1369) (026b151)
  • choose correct config directory when require.main does not exist (#1056) (a04678c)
  • commands are now applied in order, from left to right (#857) (baba863)
  • config and normalise can be disabled with false (#952) (3bb8771)
  • console.warn() rather than throwing errors when api signatures are incorrect (#804) (a607061)
  • context should override parsed argv (#786) (0997288)
  • context variables are now recognized in strict() mode (#796) (48575cd)
  • defaulting keys to 'undefined' interfered with conflicting key logic (a8e0cff)
  • detect zsh when zsh isnt run as a login prompt (#1395) (8792d13)
  • do not allow additional positionals in strict mode (35d777c)
  • do not use cwd when resolving package.json for yargs parsing config (#726) (9bdaab7)
  • don't bother calling JSON.stringify() on string default values (#891) (628be21)
  • don't load config when processing positionals (5d0dc92)
  • errors were not bubbling appropriately from sub-commands to top-level (#802) (8a992f5)
  • exclude positional arguments from completion output (#927) (71c7ec7)
  • fake a tty in tests, so that we can use the new set-blocking (#512) (a54c742)
  • fix demandOption no longer treats 'false' as truthy (#829) (c748dd2)
  • fix promise check to accept any spec conform object (#1424) (0be43d2)
  • fix tiny spacing issue with usage (#992) (7871327)
  • get terminalWidth in non interactive mode no longer causes a validation exception (#837) (360e301)
  • 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 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)
  • implications fails only displayed once (#954) (ac8088b)
  • improve Norwegian Bokmål translations (#1208) (a458fa4)
  • improve Norwegian Nynorsk translations (#1207) (d422eb5)
  • less eager help command execution (#972) (8c1d7bf)
  • 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)
  • 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
  • populating placeholder arguments broke validation (b3eb2fe)
  • positional arguments now work if no handler is provided to inner command (#864) (e28ded3)
  • positional arguments of sub-commands threw strict() exception (#805) (f3f074b)
  • prefer user supplied script name in usage (#1383) (28c74b9)
  • properties accessed on singleton now reflect current state of instance (#1366) (409d35b)
  • pull in yargs-parser with modified env precedence (#787) (e0fbbe5)
  • requiresArg should only be enforced if argument exists (#1043) (fbf41ae)
  • running parse() multiple times on the same yargs instance caused exception if help() enabled (#790) (07e39b7)
  • 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)
  • strict mode should not fail for hidden options (#949) (0e0c58d)
  • the positional argument parse was clobbering global flag arguments (#984) (7e58453)
  • use correct completion command in generated completion script (#988) (3c8ac1d)
  • command: Run default cmd even if the only cmd (#950) (7b22203)
  • still freeze/unfreeze if parse() is called in isolation (#717) (30a9492)
  • strict() should not ignore hyphenated arguments (#1414) (b774b5e)
  • support merging deeply nested configuration (#1423) (bae66fe)
  • temporary fix for libraries that call Object.freeze() (#1483) (99c2dc8)
  • use path.resolve() to support node 0.10 (#797) (49a93fc)
  • command: subcommands via commandDir() now supported for parse(msg, cb) (#678) (6b85cc6)
  • completion: Avoid default command and recommendations during completion (#1123) (036e7c5)
  • 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)
  • docs: fix incorrect parserConfiguration documentation (2a99124)
  • docs: update boolean description and examples in docs (#1474) (afd5b48)
  • examples: fix usage-options.js to reflect current API (#1375) (6e5b76b)
  • locales: correct some Russian translations (#691) (a980671)
  • changed parsing of the command string to ignore extra spaces (#600) (e8e5a72)
  • drop lodash.assign (#641) (ad3146f)
  • drop unused camelcase dependency fixes #516 (#525) (365fb9a)
  • for args that have skipValidation set to true, check if the parsed arg is true (#619) (658a34c)
  • freeze was not resetting configObjects to initial state; addressed performance issue raised by @nexdrew. (#670) (ae4bcd4)
  • remove deprecated zh.json (#578) (317c62c)
  • stop applying parser to context object (#675) (3fe9b8f)
  • support options/sub-commands in zsh completion (0a96394)
  • tolerate null prototype for config objects with extends (#1376) (3d26d11), closes #1372
  • commandDir: make dir relative to caller instead of require.main.filename (#548) (3c2e479)
  • default: Remove undocumented alias of default() (#469) (b8591b2)
  • i18n: rename unclear 'implication failed' to 'missing dependent arguments' (#1317) (bf46813)
  • locales: change some translations (#667) (aa966c5)
  • locales: conform hi locale to y18n.__n expectations (#666) (22adb18)
  • validation: Use the error as a message when none exists otherwise (#1268) (0510fe6)
  • ignore invalid package.json during read-pkg-up (#546) (e058c87)
  • keep both zh and zh_CN until yargs@5.x (0f8faa7)
  • lazy-load package.json and cache. get rid of pkg-conf dependency. (#544) (2609b2e)
  • link build badge to master branch (#505) (7126b47)
  • make stdout flush on newer versions of Node.js (#501) (9f8c6f4), closes #497
  • positional arguments were not being handled appropriately by parse() (#559) (063a866)
  • pull in @nexdrew's fixes to yargs-parser (#560) (c77c080)
  • remove the trailing white spaces from the help output (#1090) (3f0746c)
  • stop-parse was not being respected by commands (#1459) (12c82e6)
  • translation not working when using __ with a single parameter (#1183) (f449aea)
  • update to yargs-parser with fix for array default values (#1463) (ebee59d)
  • upgrade os-locale to version that addresses license issue (#1195) (efc0970)
  • upgrade standard, and fix appveyor config so that it works with newest standard (#607) (c301f42)
  • use const as a semantic tool (#502) (03ab687)
  • we now respect the order of _ when applying commands (#537) (ed86b78)
  • we shouldn't output help if we've printed a prior help-like message (#847) (17e89bd)
  • package: update camelcase to version 3.0.0 (#495) (796285d)

Performance Improvements

  • defer requiring most external libs until needed (#584) (f9b0ed4)
  • defer windowWidth() to improve perf for non-help usage (#610) (cbc3636)
  • normalizing package data is an expensive operation (#705) (49cf533)

Reverts

Miscellaneous Chores

Code Refactoring


This PR was generated with Release Please.

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