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

Deno bundle yargsParser initialization failure #1841

Closed
nchudleigh opened this issue Dec 23, 2020 · 5 comments · Fixed by #1891
Closed

Deno bundle yargsParser initialization failure #1841

nchudleigh opened this issue Dec 23, 2020 · 5 comments · Fixed by #1891
Labels

Comments

@nchudleigh
Copy link

Trying to write a cli with Deno, went to go and try the example from the readme and the bundled code fails at runtime.

Works fine if you just deno run main.ts, but the hope was to use the bundled code (compiled to binary) for distribution.

Any ideas on why this may be happening? Wasnt sure if this was more of a Deno issue or a yargs issue, so if I am barking up the wrong tree let me know.

// main.ts
import yargs from 'https://deno.land/x/yargs/deno.ts'
import { Arguments } from 'https://deno.land/x/yargs/deno-types.ts'

yargs(Deno.args)
  .command('download <files...>', 'download a list of files', (yargs: any) => {
    return yargs.positional('files', {
      describe: 'a list of files to do something with'
    })
  }, (argv: Arguments) => {
    console.info(argv)
  })
  .strictCommands()
  .demandCommand(1)
  .argv

❯ deno bundle ./main.ts bundle.js

Bundle main.ts
Check main.ts
Emit "bundle.js" (227.35KB)

❯ deno run bundle.js

error: Uncaught ReferenceError: Cannot access 'yargsParser' before initialization
yargsParser.camelCase = camelCase;
^
    at bundle.js:517:1
@bcoe bcoe added the bug label Dec 24, 2020
@bcoe
Copy link
Member

bcoe commented Dec 24, 2020

@nchudleigh I haven't experimented with Deno much, beyond writing the unit tests to get yargs running on it.

Do you need to explicitly add yargs-parser to the bundle?

@nchudleigh
Copy link
Author

Tried that and didnt have any effect, the issue now seems to be cliui access issue.

error: Uncaught ReferenceError: cliui is not defined
    cliui: cliui,

I have tried explicitly bundling both of them and it gives the same issue.

I went to the yargs-parser repo and tried the same process of bundling the example in the readme and it had an issue with finding which OS it is on.

error: Uncaught ReferenceError: Cannot access 'isWindows' before initialization
const path = isWindows ? _win32 : _posix;

Perhaps this is a deeper issue with the dependency, in any case I need to dig deeper, going to close until I find something actionable.

@nchudleigh
Copy link
Author

Just tried it again with Deno version 1.6.3 and it appears to have been fixed.

@seivan
Copy link
Contributor

seivan commented Mar 23, 2021

@bcoe @nchudleigh This is still broken with deno compile executables.
It works when doing deno run but running a binary compiled with deno compile will fail. shim.Parser is undefined.

It seems to be an issue with YargsWithShim something from ./lib/platform-shims/deno.ts';
is not available during in the runtime when using deno compile

I haven't been able to pinpoint it, but if there is a way for deno to give some sort of introspection when running deno compile about unsupported features, it would be easy to pinpoint what's causing it and fixing it.

@seivan
Copy link
Contributor

seivan commented Mar 23, 2021

I think I found the issue

There is a distinction between the names of an exported value between deno run and deno compile when importing an object and using it as a key in a new object

export default yargsParser
import Parser from 'https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts';

const newObject = {
 Parser
}

This will create {yargParser: Parser} in deno compile while work as intended with deno run where you get {Parser: Parser}

seivan added a commit to seivan/yargs that referenced this issue Mar 23, 2021
kodiakhq bot pushed a commit to X-oss-byte/Canary-nextjs that referenced this issue Oct 9, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [yargs](https://yargs.js.org/) ([source](https://togithub.com/yargs/yargs)) | [`16.2.0` -> `17.7.2`](https://renovatebot.com/diffs/npm/yargs/16.2.0/17.7.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/yargs/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yargs/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yargs/16.2.0/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yargs/16.2.0/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>yargs/yargs (yargs)</summary>

### [`v17.7.2`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1772-2023-04-27)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.7.1...v17.7.2)

##### Bug Fixes

-   do not crash completion when having negated options ([#&#8203;2322](https://togithub.com/yargs/yargs/issues/2322)) ([7f42848](https://togithub.com/yargs/yargs/commit/7f428485e75e9b1b0db1320216d1c31469770563))

### [`v17.7.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1771-2023-02-21)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.7.0...v17.7.1)

##### Bug Fixes

-   address display bug with default sub-commands ([#&#8203;2303](https://togithub.com/yargs/yargs/issues/2303)) ([9aa2490](https://togithub.com/yargs/yargs/commit/9aa24908ae4e857161d5084613a402f9dc4895a7))

### [`v17.7.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1770-2023-02-13)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.2...v17.7.0)

##### Features

-   add method to hide option extras ([#&#8203;2156](https://togithub.com/yargs/yargs/issues/2156)) ([2c144c4](https://togithub.com/yargs/yargs/commit/2c144c4ea534646df26d6177f73ce917105c6c09))
-   convert line break to whitespace for the description of the option ([#&#8203;2271](https://togithub.com/yargs/yargs/issues/2271)) ([4cb41dc](https://togithub.com/yargs/yargs/commit/4cb41dc80aaa730a2abd15bd3118ecd9f4ebe876))

##### Bug Fixes

-   copy the description of the option to its alias in completion ([#&#8203;2269](https://togithub.com/yargs/yargs/issues/2269)) ([f37ee6f](https://togithub.com/yargs/yargs/commit/f37ee6f7da386a1244bf0a0c21b9572f2bb3131b))

### [`v17.6.2`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1762-2022-11-03)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.1...v17.6.2)

##### Bug Fixes

-   **deps:** update dependency yargs-parser to v21.1.1 ([#&#8203;2231](https://togithub.com/yargs/yargs/issues/2231)) ([75b4d52](https://togithub.com/yargs/yargs/commit/75b4d5222f8f0152790b9ca0718fa5314c9a1c6b))
-   **lang:** typo in Finnish unknown argument singular form ([#&#8203;2222](https://togithub.com/yargs/yargs/issues/2222)) ([a6dfd0a](https://togithub.com/yargs/yargs/commit/a6dfd0a8f7f2c58a2e8b7dde0142cc1a12c4e027))

### [`v17.6.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1761-2022-11-02)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.0...v17.6.1)

##### Bug Fixes

-   **lang:** fix "Not enough non-option arguments" message for the Czech language ([#&#8203;2242](https://togithub.com/yargs/yargs/issues/2242)) ([3987b13](https://togithub.com/yargs/yargs/commit/3987b13e31f669d79836cc6ed84105e9be0f9482))

### [`v17.6.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1760-2022-10-01)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.5.1...v17.6.0)

##### Features

-   **lang:** Czech locale ([#&#8203;2220](https://togithub.com/yargs/yargs/issues/2220)) ([5895cf1](https://togithub.com/yargs/yargs/commit/5895cf1ba1dcd5158d284d0c589f5f0caff8b739))
-   **usage:** add YARGS_DISABLE_WRAP env variable to disable wrap ([#&#8203;2210](https://togithub.com/yargs/yargs/issues/2210)) ([b680ace](https://togithub.com/yargs/yargs/commit/b680ace2994dcf14d1a1a928aefd3fe8006b2198))

##### Bug Fixes

-   **deno:** use 'globalThis' instead of 'window' ([#&#8203;2186](https://togithub.com/yargs/yargs/issues/2186)) ([#&#8203;2215](https://togithub.com/yargs/yargs/issues/2215)) ([561fc7a](https://togithub.com/yargs/yargs/commit/561fc7a787228b226e0ba76ab674456cbd30cd37))
-   **deps:** cliui with forced strip-ansi update ([#&#8203;2241](https://togithub.com/yargs/yargs/issues/2241)) ([38e8df1](https://togithub.com/yargs/yargs/commit/38e8df10f0f020ae794329610354521f8458fc41))
-   dont clobber description for multiple option calls ([#&#8203;2171](https://togithub.com/yargs/yargs/issues/2171)) ([f91d9b3](https://togithub.com/yargs/yargs/commit/f91d9b334ad9cfce79a89c08ff210c622b7c528f))
-   **typescript:** address warning with objectKeys ([394f5f8](https://togithub.com/yargs/yargs/commit/394f5f86d15a9bb319276518d36cb560d7cb6322))

##### [17.5.1](https://togithub.com/yargs/yargs/compare/v17.5.0...v17.5.1) (2022-05-16)

##### Bug Fixes

-   add missing entries to published files ([#&#8203;2185](https://togithub.com/yargs/yargs/issues/2185)) ([5685382](https://togithub.com/yargs/yargs/commit/5685382d18dc05f2ec66098d90ab16f31b622753))
-   address bug when strict and async middleware used together ([#&#8203;2164](https://togithub.com/yargs/yargs/issues/2164)) ([cbc2eb7](https://togithub.com/yargs/yargs/commit/cbc2eb726efc1d688ad484e8cbe4d233b212a046))
-   **completion:** correct zsh installation instructions ([22e9af2](https://togithub.com/yargs/yargs/commit/22e9af28bb7a7101aeeac80b5bfd0c18f7e6226f))
-   handle multiple node_modules folders determining mainFilename for ESM ([#&#8203;2123](https://togithub.com/yargs/yargs/issues/2123)) ([e0823dd](https://togithub.com/yargs/yargs/commit/e0823dd7e6ced7eaf1d7d1e67f77374f4ef5cbce))
-   **lang:** add missing terms to Russian translation ([#&#8203;2181](https://togithub.com/yargs/yargs/issues/2181)) ([1c331f2](https://togithub.com/yargs/yargs/commit/1c331f22c71496e3d50cf103a1b21f4a05d97aac))
-   prevent infinite loop with empty locale ([#&#8203;2179](https://togithub.com/yargs/yargs/issues/2179)) ([b672e70](https://togithub.com/yargs/yargs/commit/b672e709e4fc45f50d77f54e42025a5fa7c66a42))
-   veriadic arguments override array provided in config (the same as multiple dash arguments). ([4dac5b8](https://togithub.com/yargs/yargs/commit/4dac5b8c2f03488c31d40f075075d2ac43134412))

### [`v17.5.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1751-2022-05-16)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.5.0...v17.5.1)

### [`v17.5.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1750-2022-05-11)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.4.1...v17.5.0)

##### Features

-   add browser.d.ts and check for existence of Error.captureStackTrace() ([#&#8203;2144](https://togithub.com/yargs/yargs/issues/2144)) ([6192990](https://togithub.com/yargs/yargs/commit/6192990509cf793c4b10b88884d626893dee89df))

##### Bug Fixes

-   **completion:** support for default flags ([db35423](https://togithub.com/yargs/yargs/commit/db354232705623bbcd8fad362f6a4d6d59650be5))
-   import yargs/yargs in esm projects ([#&#8203;2151](https://togithub.com/yargs/yargs/issues/2151)) ([95aed1c](https://togithub.com/yargs/yargs/commit/95aed1c175ec82e585003883bda1b6b75d5493ce))

##### [17.4.1](https://togithub.com/yargs/yargs/compare/v17.4.0...v17.4.1) (2022-04-09)

##### Bug Fixes

-   coerce pollutes argv ([#&#8203;2161](https://togithub.com/yargs/yargs/issues/2161)) ([2d1136d](https://togithub.com/yargs/yargs/commit/2d1136d303ea805685a973ded62f52efd49b78b9))
-   **completion:** don't show positional args choices with option choices ([#&#8203;2148](https://togithub.com/yargs/yargs/issues/2148)) ([b58b5bc](https://togithub.com/yargs/yargs/commit/b58b5bc2cda7fc15acf559ae4a6a0eda0be06044))
-   hide hidden options from completion ([#&#8203;2143](https://togithub.com/yargs/yargs/issues/2143)) ([e086dfa](https://togithub.com/yargs/yargs/commit/e086dfad7ff11956b1e8779c00cf2351a4cc3b03)), closes [#&#8203;2142](https://togithub.com/yargs/yargs/issues/2142)
-   show message when showHelpOnFail is chained globally ([#&#8203;2154](https://togithub.com/yargs/yargs/issues/2154)) ([ad9fcac](https://togithub.com/yargs/yargs/commit/ad9fcacb001a7eb842924408f3a06865a7c7a3b6))

### [`v17.4.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1741-2022-04-09)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.4.0...v17.4.1)

### [`v17.4.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1740-2022-03-19)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.3.1...v17.4.0)

##### Features

-   **completion:** choices will now work for all possible aliases of an option and not just the default long option ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   **completion:** positional arguments completion ([#&#8203;2090](https://togithub.com/yargs/yargs/issues/2090)) ([00e4ebb](https://togithub.com/yargs/yargs/commit/00e4ebbe3acd438e73fdb101e75b4f879eb6d345))

##### Bug Fixes

-   **completion:** changed the check for option arguments to match options that begin with '-', instead of '--', to include short options ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   **completion:** fix for completions that contain non-leading hyphens ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   failed command usage string is missing arg descriptions and optional args ([#&#8203;2105](https://togithub.com/yargs/yargs/issues/2105)) ([d6e342d](https://togithub.com/yargs/yargs/commit/d6e342d8ef2c488f438c32770ba2209cf8223342))
-   wrap unknown args in quotes ([#&#8203;2092](https://togithub.com/yargs/yargs/issues/2092)) ([6a29778](https://togithub.com/yargs/yargs/commit/6a2977867bd58dbd8bb550f7b0b4c4c298835597))

##### [17.3.1](https://togithub.com/yargs/yargs/compare/v17.3.0...v17.3.1) (2021-12-23)

##### Bug Fixes

-   **translations:** correct Korean translation ([#&#8203;2095](https://togithub.com/yargs/yargs/issues/2095)) ([c7c2b9e](https://togithub.com/yargs/yargs/commit/c7c2b9eb340754ddac7bdd1687c7951332c5ebba))

### [`v17.3.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1731-2021-12-23)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.3.0...v17.3.1)

### [`v17.3.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1730-2021-11-30)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.2.1...v17.3.0)

##### Features

-   fallback to default bash completion ([74c0ba5](https://togithub.com/yargs/yargs/commit/74c0ba5cfcc59afa5538de821fad70e1a76a354e))

##### Bug Fixes

-   avoid legacy accessors ([#&#8203;2013](https://togithub.com/yargs/yargs/issues/2013)) ([adb0d11](https://togithub.com/yargs/yargs/commit/adb0d11e02c613af3d9427b3028cc192703a3869))
-   **deps:** update dependency yargs-parser to v21 ([#&#8203;2063](https://togithub.com/yargs/yargs/issues/2063)) ([76c1951](https://togithub.com/yargs/yargs/commit/76c19518d74ca94c0edcd450e5c0ef9efeee369d))
-   don't fail if "fileURLToPath(import.meta.url)" throws ([3a44796](https://togithub.com/yargs/yargs/commit/3a44796c84e3cb60769841d5883448a396227ade))
-   re-add options to check callback ([#&#8203;2079](https://togithub.com/yargs/yargs/issues/2079)) ([e75319d](https://togithub.com/yargs/yargs/commit/e75319d99142a048b0abe9856499730fd4bc004c))

##### [17.2.1](https://www.github.com/yargs/yargs/compare/v17.2.0...v17.2.1) (2021-09-25)

##### Bug Fixes

-   **docs:** stop advertising .argv property ([#&#8203;2036](https://www.togithub.com/yargs/yargs/issues/2036)) ([4f5ecc1](https://www.github.com/yargs/yargs/commit/4f5ecc1427ed6c83f23ea90ee6da75ce0c332f7a)), closes [#&#8203;2035](https://www.togithub.com/yargs/yargs/issues/2035)

### [`v17.2.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1721-2021-09-25)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.2.0...v17.2.1)

### [`v17.2.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1720-2021-09-23)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.1.1...v17.2.0)

##### Features

-   autocomplete choices for options ([#&#8203;2018](https://www.togithub.com/yargs/yargs/issues/2018)) ([01b2c6a](https://www.github.com/yargs/yargs/commit/01b2c6a99167d826d3d1e6f6b94f18382a17d47e))
-   **locales:** Added Uzbek translation ([#&#8203;2024](https://www.togithub.com/yargs/yargs/issues/2024)) ([ee047b9](https://www.github.com/yargs/yargs/commit/ee047b9cd6260ce90d845e7e687228e617c8a30d))

##### Bug Fixes

-   boolean option should work with strict ([#&#8203;1996](https://www.togithub.com/yargs/yargs/issues/1996)) ([e9379e2](https://www.github.com/yargs/yargs/commit/e9379e27d49820f4db842f22cda6410bbe2bff10))
-   cast error types as TypeScript 4.4 infers them as unknown instead of any ([#&#8203;2016](https://www.togithub.com/yargs/yargs/issues/2016)) ([01b2c6a](https://www.github.com/yargs/yargs/commit/01b2c6a99167d826d3d1e6f6b94f18382a17d47e))
-   conflicts and strip-dashed ([#&#8203;1998](https://www.togithub.com/yargs/yargs/issues/1998)) ([59a86fb](https://www.github.com/yargs/yargs/commit/59a86fb83cfeb8533c6dd446c73cf4166cc455f2))
-   emit warning on version name collision ([#&#8203;1986](https://www.togithub.com/yargs/yargs/issues/1986)) ([d0e8292](https://www.github.com/yargs/yargs/commit/d0e829239580bd44873bbde65de2ed7671aa2ab0))
-   help command spacing when scriptName is empty ([#&#8203;1994](https://www.togithub.com/yargs/yargs/issues/1994)) ([d33e997](https://www.github.com/yargs/yargs/commit/d33e9972291406490cd8fdad0b3589be234e0f12))

##### [17.1.1](https://www.github.com/yargs/yargs/compare/v17.1.0...v17.1.1) (2021-08-13)

##### Bug Fixes

-   positional array defaults should not be combined with provided values ([#&#8203;2006](https://www.togithub.com/yargs/yargs/issues/2006)) ([832222d](https://www.github.com/yargs/yargs/commit/832222d7777da49e5c9da6c5801c2dd90d7fa6a2))

### [`v17.1.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1711-2021-08-13)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.1.0...v17.1.1)

### [`v17.1.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1710-2021-08-04)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.0.1...v17.1.0)

##### Features

-   update Levenshtein to Damerau-Levenshtein ([#&#8203;1973](https://www.togithub.com/yargs/yargs/issues/1973)) ([d2c121b](https://www.github.com/yargs/yargs/commit/d2c121b00f2e1eb2ea8cc3a23a5039b3a4425bea))

##### Bug Fixes

-   coerce middleware should be applied once ([#&#8203;1978](https://www.togithub.com/yargs/yargs/issues/1978)) ([14bd6be](https://www.github.com/yargs/yargs/commit/14bd6bebc3027ae929106b20dd198b9dccdeec31))
-   implies should not fail when implied key's value is 0, false or empty string ([#&#8203;1985](https://www.togithub.com/yargs/yargs/issues/1985)) ([8010472](https://www.github.com/yargs/yargs/commit/80104727d5f2ec4c5b491c1bdec4c94b2db95d9c))
-   positionals should not overwrite options ([#&#8203;1992](https://www.togithub.com/yargs/yargs/issues/1992)) ([9d84309](https://www.github.com/yargs/yargs/commit/9d84309e53ce1d30b1c61035ed5c78827a89df86))
-   strict should fail unknown arguments ([#&#8203;1977](https://www.togithub.com/yargs/yargs/issues/1977)) ([c804f0d](https://www.github.com/yargs/yargs/commit/c804f0db78e56b44341cc7a91878c27b1b68b9f2))
-   wrap(null) no longer causes strange indentation behavior ([#&#8203;1988](https://www.togithub.com/yargs/yargs/issues/1988)) ([e1871aa](https://www.github.com/yargs/yargs/commit/e1871aa792de219b221179417d410931af70d405))

##### [17.0.1](https://www.github.com/yargs/yargs/compare/v17.0.0...v17.0.1) (2021-05-03)

##### Bug Fixes

-   **build:** Node 12 is now minimum version ([#&#8203;1936](https://www.togithub.com/yargs/yargs/issues/1936)) ([0924566](https://www.github.com/yargs/yargs/commit/09245666e57facb140e0b45a9e45ca704883e5dd))

### [`v17.0.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1701-2021-05-03)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.0.0...v17.0.1)

### [`v17.0.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1700-2021-05-02)

[Compare Source](https://togithub.com/yargs/yargs/compare/v16.2.0...v17.0.0)

##### ⚠ BREAKING CHANGES

-   **node:** drop Node 10 ([#&#8203;1919](https://togithub.com/yargs/yargs/issues/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 ([#&#8203;1895](https://togithub.com/yargs/yargs/issues/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.
-   [#&#8203;1823](https://togithub.com/yargs/yargs/issues/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) ([#&#8203;1850](https://www.togithub.com/yargs/yargs/issues/1850)) ([00b74ad](https://www.github.com/yargs/yargs/commit/00b74adcb30ab89b4450ef7105ef1ad32d820ebf))
-   add parseSync/parseAsync method ([#&#8203;1898](https://www.togithub.com/yargs/yargs/issues/1898)) ([6130ad8](https://www.github.com/yargs/yargs/commit/6130ad89b85dc49e34190e596e14a2fd3e668781))
-   add support for `showVersion`, similar to `showHelp` ([#&#8203;1831](https://www.togithub.com/yargs/yargs/issues/1831)) ([1a1e2d5](https://www.github.com/yargs/yargs/commit/1a1e2d554dca3566bc174584394419be0120d207))
-   adds support for async builder ([#&#8203;1888](https://www.togithub.com/yargs/yargs/issues/1888)) ([ade29b8](https://www.github.com/yargs/yargs/commit/ade29b864abecaa8c4f8dcc3493f5eb24fb73d84)), closes [#&#8203;1042](https://www.togithub.com/yargs/yargs/issues/1042)
-   allow calling standard completion function from custom one ([#&#8203;1855](https://www.togithub.com/yargs/yargs/issues/1855)) ([31765cb](https://www.github.com/yargs/yargs/commit/31765cbdce812ee5c16aaae70ab523a2c7e0fcec))
-   allow default completion to be referenced and modified, in custom completion ([#&#8203;1878](https://www.togithub.com/yargs/yargs/issues/1878)) ([01619f6](https://www.github.com/yargs/yargs/commit/01619f6191a3ab16bf6b77456d4e9dfa80533907))
-   **async:** add support for async check and coerce ([#&#8203;1872](https://www.togithub.com/yargs/yargs/issues/1872)) ([8b95f57](https://www.github.com/yargs/yargs/commit/8b95f57bb2a49b098c6bf23cea88c6f900a34f89))
-   improve support for async/await ([#&#8203;1823](https://www.togithub.com/yargs/yargs/issues/1823)) ([169b815](https://www.github.com/yargs/yargs/commit/169b815df7ae190965f04030f28adc3ab92bb4b5))
-   **locale:** add Ukrainian locale ([#&#8203;1893](https://www.togithub.com/yargs/yargs/issues/1893)) ([c872dfc](https://www.github.com/yargs/yargs/commit/c872dfc1d87ebaa7fcc79801f649318a16195495))
-   **middleware:** async middleware can now be used before validation. ([e0f9363](https://www.github.com/yargs/yargs/commit/e0f93636e04fa7e02a2c3b1fe465b6a14aa1f06d))
-   **middleware:** global middleware now applied when no command is configured. ([e0f9363](https://www.github.com/yargs/yargs/commit/e0f93636e04fa7e02a2c3b1fe465b6a14aa1f06d))
-   **node:** drop Node 10 ([#&#8203;1919](https://www.togithub.com/yargs/yargs/issues/1919)) ([5edeb9e](https://www.github.com/yargs/yargs/commit/5edeb9ea17b1f0190a3590508f2e7911b5f70659))

##### Bug Fixes

-   always cache help message when running commands ([#&#8203;1865](https://www.togithub.com/yargs/yargs/issues/1865)) ([d57ca77](https://www.github.com/yargs/yargs/commit/d57ca7751d533d7e0f216cd9fbf7c2b0ec98f791)), closes [#&#8203;1853](https://www.togithub.com/yargs/yargs/issues/1853)
-   **async:** don't call parse callback until async ops complete ([#&#8203;1896](https://www.togithub.com/yargs/yargs/issues/1896)) ([a93f5ff](https://www.github.com/yargs/yargs/commit/a93f5ff35d7c09b01e0ca93d7d855d2b26593165)), closes [#&#8203;1888](https://www.togithub.com/yargs/yargs/issues/1888)
-   **builder:** apply default builder for showHelp/getHelp ([#&#8203;1913](https://www.togithub.com/yargs/yargs/issues/1913)) ([395bb67](https://www.github.com/yargs/yargs/commit/395bb67749787d269cabe80ffc3133c2f6958aeb)), closes [#&#8203;1912](https://www.togithub.com/yargs/yargs/issues/1912)
-   **builder:** nested builder is now awaited ([#&#8203;1925](https://www.togithub.com/yargs/yargs/issues/1925)) ([b5accd6](https://www.github.com/yargs/yargs/commit/b5accd64ccbd3ffb800517fb40d0f59382515fbb))
-   **coerce:** options using coerce now displayed in help ([#&#8203;1911](https://www.togithub.com/yargs/yargs/issues/1911)) ([d2128cc](https://www.github.com/yargs/yargs/commit/d2128cc4ffd411eed7111e6a3c561948330e4f6f)), closes [#&#8203;1909](https://www.togithub.com/yargs/yargs/issues/1909)
-   completion script name clashing on bash ([#&#8203;1903](https://www.togithub.com/yargs/yargs/issues/1903)) ([8f62d9a](https://www.github.com/yargs/yargs/commit/8f62d9a9e8bebf86f988c100ad3c417dc32b2471))
-   **deno:** use actual names for keys instead of inferring ([#&#8203;1891](https://www.togithub.com/yargs/yargs/issues/1891)) ([b96ef01](https://www.github.com/yargs/yargs/commit/b96ef01b16bc5377b79d7914dd5495068037fe7b))
-   exclude positionals from default completion ([#&#8203;1881](https://www.togithub.com/yargs/yargs/issues/1881)) ([0175677](https://www.github.com/yargs/yargs/commit/0175677b79ffe50a9c5477631288ae10120b8a32))
-   [yargs/yargs#1841 (comment) ([b96ef01](https://www.github.com/yargs/yargs/commit/b96ef01b16bc5377b79d7914dd5495068037fe7b))
-   showHelp() and .getHelp() now return same output for commands as --help ([#&#8203;1826](https://www.togithub.com/yargs/yargs/issues/1826)) ([36abf26](https://www.github.com/yargs/yargs/commit/36abf26919b5a19f3adec08598539851c34b7086))
-   zsh completion is now autoloadable ([#&#8203;1856](https://www.togithub.com/yargs/yargs/issues/1856)) ([d731f9f](https://www.github.com/yargs/yargs/commit/d731f9f9adbc11f918e918443c5bff4149fc6681))

##### Code Refactoring

-   **coerce:** coerce is now applied before validation. ([8b95f57](https://www.github.com/yargs/yargs/commit/8b95f57bb2a49b098c6bf23cea88c6f900a34f89))
-   deprecated reset() method is now private (call yargs() instead). ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))
-   implicitly private methods are now actually private ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))
-   **yargs-factory:** refactor yargs-factory to use class ([#&#8203;1895](https://www.togithub.com/yargs/yargs/issues/1895)) ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Canary-nextjs).
kodiakhq bot pushed a commit to X-oss-byte/Nextjs that referenced this issue Oct 17, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [yargs](https://yargs.js.org/) ([source](https://togithub.com/yargs/yargs)) | [`16.2.0` -> `17.7.2`](https://renovatebot.com/diffs/npm/yargs/16.2.0/17.7.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/yargs/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/yargs/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/yargs/16.2.0/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/yargs/16.2.0/17.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>yargs/yargs (yargs)</summary>

### [`v17.7.2`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1772-2023-04-27)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.7.1...v17.7.2)

##### Bug Fixes

-   do not crash completion when having negated options ([#&#8203;2322](https://togithub.com/yargs/yargs/issues/2322)) ([7f42848](https://togithub.com/yargs/yargs/commit/7f428485e75e9b1b0db1320216d1c31469770563))

### [`v17.7.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1771-2023-02-21)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.7.0...v17.7.1)

##### Bug Fixes

-   address display bug with default sub-commands ([#&#8203;2303](https://togithub.com/yargs/yargs/issues/2303)) ([9aa2490](https://togithub.com/yargs/yargs/commit/9aa24908ae4e857161d5084613a402f9dc4895a7))

### [`v17.7.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1770-2023-02-13)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.2...v17.7.0)

##### Features

-   add method to hide option extras ([#&#8203;2156](https://togithub.com/yargs/yargs/issues/2156)) ([2c144c4](https://togithub.com/yargs/yargs/commit/2c144c4ea534646df26d6177f73ce917105c6c09))
-   convert line break to whitespace for the description of the option ([#&#8203;2271](https://togithub.com/yargs/yargs/issues/2271)) ([4cb41dc](https://togithub.com/yargs/yargs/commit/4cb41dc80aaa730a2abd15bd3118ecd9f4ebe876))

##### Bug Fixes

-   copy the description of the option to its alias in completion ([#&#8203;2269](https://togithub.com/yargs/yargs/issues/2269)) ([f37ee6f](https://togithub.com/yargs/yargs/commit/f37ee6f7da386a1244bf0a0c21b9572f2bb3131b))

### [`v17.6.2`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1762-2022-11-03)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.1...v17.6.2)

##### Bug Fixes

-   **deps:** update dependency yargs-parser to v21.1.1 ([#&#8203;2231](https://togithub.com/yargs/yargs/issues/2231)) ([75b4d52](https://togithub.com/yargs/yargs/commit/75b4d5222f8f0152790b9ca0718fa5314c9a1c6b))
-   **lang:** typo in Finnish unknown argument singular form ([#&#8203;2222](https://togithub.com/yargs/yargs/issues/2222)) ([a6dfd0a](https://togithub.com/yargs/yargs/commit/a6dfd0a8f7f2c58a2e8b7dde0142cc1a12c4e027))

### [`v17.6.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1761-2022-11-02)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.6.0...v17.6.1)

##### Bug Fixes

-   **lang:** fix "Not enough non-option arguments" message for the Czech language ([#&#8203;2242](https://togithub.com/yargs/yargs/issues/2242)) ([3987b13](https://togithub.com/yargs/yargs/commit/3987b13e31f669d79836cc6ed84105e9be0f9482))

### [`v17.6.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1760-2022-10-01)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.5.1...v17.6.0)

##### Features

-   **lang:** Czech locale ([#&#8203;2220](https://togithub.com/yargs/yargs/issues/2220)) ([5895cf1](https://togithub.com/yargs/yargs/commit/5895cf1ba1dcd5158d284d0c589f5f0caff8b739))
-   **usage:** add YARGS_DISABLE_WRAP env variable to disable wrap ([#&#8203;2210](https://togithub.com/yargs/yargs/issues/2210)) ([b680ace](https://togithub.com/yargs/yargs/commit/b680ace2994dcf14d1a1a928aefd3fe8006b2198))

##### Bug Fixes

-   **deno:** use 'globalThis' instead of 'window' ([#&#8203;2186](https://togithub.com/yargs/yargs/issues/2186)) ([#&#8203;2215](https://togithub.com/yargs/yargs/issues/2215)) ([561fc7a](https://togithub.com/yargs/yargs/commit/561fc7a787228b226e0ba76ab674456cbd30cd37))
-   **deps:** cliui with forced strip-ansi update ([#&#8203;2241](https://togithub.com/yargs/yargs/issues/2241)) ([38e8df1](https://togithub.com/yargs/yargs/commit/38e8df10f0f020ae794329610354521f8458fc41))
-   dont clobber description for multiple option calls ([#&#8203;2171](https://togithub.com/yargs/yargs/issues/2171)) ([f91d9b3](https://togithub.com/yargs/yargs/commit/f91d9b334ad9cfce79a89c08ff210c622b7c528f))
-   **typescript:** address warning with objectKeys ([394f5f8](https://togithub.com/yargs/yargs/commit/394f5f86d15a9bb319276518d36cb560d7cb6322))

##### [17.5.1](https://togithub.com/yargs/yargs/compare/v17.5.0...v17.5.1) (2022-05-16)

##### Bug Fixes

-   add missing entries to published files ([#&#8203;2185](https://togithub.com/yargs/yargs/issues/2185)) ([5685382](https://togithub.com/yargs/yargs/commit/5685382d18dc05f2ec66098d90ab16f31b622753))
-   address bug when strict and async middleware used together ([#&#8203;2164](https://togithub.com/yargs/yargs/issues/2164)) ([cbc2eb7](https://togithub.com/yargs/yargs/commit/cbc2eb726efc1d688ad484e8cbe4d233b212a046))
-   **completion:** correct zsh installation instructions ([22e9af2](https://togithub.com/yargs/yargs/commit/22e9af28bb7a7101aeeac80b5bfd0c18f7e6226f))
-   handle multiple node_modules folders determining mainFilename for ESM ([#&#8203;2123](https://togithub.com/yargs/yargs/issues/2123)) ([e0823dd](https://togithub.com/yargs/yargs/commit/e0823dd7e6ced7eaf1d7d1e67f77374f4ef5cbce))
-   **lang:** add missing terms to Russian translation ([#&#8203;2181](https://togithub.com/yargs/yargs/issues/2181)) ([1c331f2](https://togithub.com/yargs/yargs/commit/1c331f22c71496e3d50cf103a1b21f4a05d97aac))
-   prevent infinite loop with empty locale ([#&#8203;2179](https://togithub.com/yargs/yargs/issues/2179)) ([b672e70](https://togithub.com/yargs/yargs/commit/b672e709e4fc45f50d77f54e42025a5fa7c66a42))
-   veriadic arguments override array provided in config (the same as multiple dash arguments). ([4dac5b8](https://togithub.com/yargs/yargs/commit/4dac5b8c2f03488c31d40f075075d2ac43134412))

### [`v17.5.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1751-2022-05-16)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.5.0...v17.5.1)

### [`v17.5.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1750-2022-05-11)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.4.1...v17.5.0)

##### Features

-   add browser.d.ts and check for existence of Error.captureStackTrace() ([#&#8203;2144](https://togithub.com/yargs/yargs/issues/2144)) ([6192990](https://togithub.com/yargs/yargs/commit/6192990509cf793c4b10b88884d626893dee89df))

##### Bug Fixes

-   **completion:** support for default flags ([db35423](https://togithub.com/yargs/yargs/commit/db354232705623bbcd8fad362f6a4d6d59650be5))
-   import yargs/yargs in esm projects ([#&#8203;2151](https://togithub.com/yargs/yargs/issues/2151)) ([95aed1c](https://togithub.com/yargs/yargs/commit/95aed1c175ec82e585003883bda1b6b75d5493ce))

##### [17.4.1](https://togithub.com/yargs/yargs/compare/v17.4.0...v17.4.1) (2022-04-09)

##### Bug Fixes

-   coerce pollutes argv ([#&#8203;2161](https://togithub.com/yargs/yargs/issues/2161)) ([2d1136d](https://togithub.com/yargs/yargs/commit/2d1136d303ea805685a973ded62f52efd49b78b9))
-   **completion:** don't show positional args choices with option choices ([#&#8203;2148](https://togithub.com/yargs/yargs/issues/2148)) ([b58b5bc](https://togithub.com/yargs/yargs/commit/b58b5bc2cda7fc15acf559ae4a6a0eda0be06044))
-   hide hidden options from completion ([#&#8203;2143](https://togithub.com/yargs/yargs/issues/2143)) ([e086dfa](https://togithub.com/yargs/yargs/commit/e086dfad7ff11956b1e8779c00cf2351a4cc3b03)), closes [#&#8203;2142](https://togithub.com/yargs/yargs/issues/2142)
-   show message when showHelpOnFail is chained globally ([#&#8203;2154](https://togithub.com/yargs/yargs/issues/2154)) ([ad9fcac](https://togithub.com/yargs/yargs/commit/ad9fcacb001a7eb842924408f3a06865a7c7a3b6))

### [`v17.4.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1741-2022-04-09)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.4.0...v17.4.1)

### [`v17.4.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1740-2022-03-19)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.3.1...v17.4.0)

##### Features

-   **completion:** choices will now work for all possible aliases of an option and not just the default long option ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   **completion:** positional arguments completion ([#&#8203;2090](https://togithub.com/yargs/yargs/issues/2090)) ([00e4ebb](https://togithub.com/yargs/yargs/commit/00e4ebbe3acd438e73fdb101e75b4f879eb6d345))

##### Bug Fixes

-   **completion:** changed the check for option arguments to match options that begin with '-', instead of '--', to include short options ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   **completion:** fix for completions that contain non-leading hyphens ([30edd50](https://togithub.com/yargs/yargs/commit/30edd5067111b2b59387dcc47f4e7af93b9054f3))
-   failed command usage string is missing arg descriptions and optional args ([#&#8203;2105](https://togithub.com/yargs/yargs/issues/2105)) ([d6e342d](https://togithub.com/yargs/yargs/commit/d6e342d8ef2c488f438c32770ba2209cf8223342))
-   wrap unknown args in quotes ([#&#8203;2092](https://togithub.com/yargs/yargs/issues/2092)) ([6a29778](https://togithub.com/yargs/yargs/commit/6a2977867bd58dbd8bb550f7b0b4c4c298835597))

##### [17.3.1](https://togithub.com/yargs/yargs/compare/v17.3.0...v17.3.1) (2021-12-23)

##### Bug Fixes

-   **translations:** correct Korean translation ([#&#8203;2095](https://togithub.com/yargs/yargs/issues/2095)) ([c7c2b9e](https://togithub.com/yargs/yargs/commit/c7c2b9eb340754ddac7bdd1687c7951332c5ebba))

### [`v17.3.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1731-2021-12-23)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.3.0...v17.3.1)

### [`v17.3.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1730-2021-11-30)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.2.1...v17.3.0)

##### Features

-   fallback to default bash completion ([74c0ba5](https://togithub.com/yargs/yargs/commit/74c0ba5cfcc59afa5538de821fad70e1a76a354e))

##### Bug Fixes

-   avoid legacy accessors ([#&#8203;2013](https://togithub.com/yargs/yargs/issues/2013)) ([adb0d11](https://togithub.com/yargs/yargs/commit/adb0d11e02c613af3d9427b3028cc192703a3869))
-   **deps:** update dependency yargs-parser to v21 ([#&#8203;2063](https://togithub.com/yargs/yargs/issues/2063)) ([76c1951](https://togithub.com/yargs/yargs/commit/76c19518d74ca94c0edcd450e5c0ef9efeee369d))
-   don't fail if "fileURLToPath(import.meta.url)" throws ([3a44796](https://togithub.com/yargs/yargs/commit/3a44796c84e3cb60769841d5883448a396227ade))
-   re-add options to check callback ([#&#8203;2079](https://togithub.com/yargs/yargs/issues/2079)) ([e75319d](https://togithub.com/yargs/yargs/commit/e75319d99142a048b0abe9856499730fd4bc004c))

##### [17.2.1](https://www.github.com/yargs/yargs/compare/v17.2.0...v17.2.1) (2021-09-25)

##### Bug Fixes

-   **docs:** stop advertising .argv property ([#&#8203;2036](https://www.togithub.com/yargs/yargs/issues/2036)) ([4f5ecc1](https://www.github.com/yargs/yargs/commit/4f5ecc1427ed6c83f23ea90ee6da75ce0c332f7a)), closes [#&#8203;2035](https://www.togithub.com/yargs/yargs/issues/2035)

### [`v17.2.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1721-2021-09-25)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.2.0...v17.2.1)

### [`v17.2.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1720-2021-09-23)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.1.1...v17.2.0)

##### Features

-   autocomplete choices for options ([#&#8203;2018](https://www.togithub.com/yargs/yargs/issues/2018)) ([01b2c6a](https://www.github.com/yargs/yargs/commit/01b2c6a99167d826d3d1e6f6b94f18382a17d47e))
-   **locales:** Added Uzbek translation ([#&#8203;2024](https://www.togithub.com/yargs/yargs/issues/2024)) ([ee047b9](https://www.github.com/yargs/yargs/commit/ee047b9cd6260ce90d845e7e687228e617c8a30d))

##### Bug Fixes

-   boolean option should work with strict ([#&#8203;1996](https://www.togithub.com/yargs/yargs/issues/1996)) ([e9379e2](https://www.github.com/yargs/yargs/commit/e9379e27d49820f4db842f22cda6410bbe2bff10))
-   cast error types as TypeScript 4.4 infers them as unknown instead of any ([#&#8203;2016](https://www.togithub.com/yargs/yargs/issues/2016)) ([01b2c6a](https://www.github.com/yargs/yargs/commit/01b2c6a99167d826d3d1e6f6b94f18382a17d47e))
-   conflicts and strip-dashed ([#&#8203;1998](https://www.togithub.com/yargs/yargs/issues/1998)) ([59a86fb](https://www.github.com/yargs/yargs/commit/59a86fb83cfeb8533c6dd446c73cf4166cc455f2))
-   emit warning on version name collision ([#&#8203;1986](https://www.togithub.com/yargs/yargs/issues/1986)) ([d0e8292](https://www.github.com/yargs/yargs/commit/d0e829239580bd44873bbde65de2ed7671aa2ab0))
-   help command spacing when scriptName is empty ([#&#8203;1994](https://www.togithub.com/yargs/yargs/issues/1994)) ([d33e997](https://www.github.com/yargs/yargs/commit/d33e9972291406490cd8fdad0b3589be234e0f12))

##### [17.1.1](https://www.github.com/yargs/yargs/compare/v17.1.0...v17.1.1) (2021-08-13)

##### Bug Fixes

-   positional array defaults should not be combined with provided values ([#&#8203;2006](https://www.togithub.com/yargs/yargs/issues/2006)) ([832222d](https://www.github.com/yargs/yargs/commit/832222d7777da49e5c9da6c5801c2dd90d7fa6a2))

### [`v17.1.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1711-2021-08-13)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.1.0...v17.1.1)

### [`v17.1.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1710-2021-08-04)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.0.1...v17.1.0)

##### Features

-   update Levenshtein to Damerau-Levenshtein ([#&#8203;1973](https://www.togithub.com/yargs/yargs/issues/1973)) ([d2c121b](https://www.github.com/yargs/yargs/commit/d2c121b00f2e1eb2ea8cc3a23a5039b3a4425bea))

##### Bug Fixes

-   coerce middleware should be applied once ([#&#8203;1978](https://www.togithub.com/yargs/yargs/issues/1978)) ([14bd6be](https://www.github.com/yargs/yargs/commit/14bd6bebc3027ae929106b20dd198b9dccdeec31))
-   implies should not fail when implied key's value is 0, false or empty string ([#&#8203;1985](https://www.togithub.com/yargs/yargs/issues/1985)) ([8010472](https://www.github.com/yargs/yargs/commit/80104727d5f2ec4c5b491c1bdec4c94b2db95d9c))
-   positionals should not overwrite options ([#&#8203;1992](https://www.togithub.com/yargs/yargs/issues/1992)) ([9d84309](https://www.github.com/yargs/yargs/commit/9d84309e53ce1d30b1c61035ed5c78827a89df86))
-   strict should fail unknown arguments ([#&#8203;1977](https://www.togithub.com/yargs/yargs/issues/1977)) ([c804f0d](https://www.github.com/yargs/yargs/commit/c804f0db78e56b44341cc7a91878c27b1b68b9f2))
-   wrap(null) no longer causes strange indentation behavior ([#&#8203;1988](https://www.togithub.com/yargs/yargs/issues/1988)) ([e1871aa](https://www.github.com/yargs/yargs/commit/e1871aa792de219b221179417d410931af70d405))

##### [17.0.1](https://www.github.com/yargs/yargs/compare/v17.0.0...v17.0.1) (2021-05-03)

##### Bug Fixes

-   **build:** Node 12 is now minimum version ([#&#8203;1936](https://www.togithub.com/yargs/yargs/issues/1936)) ([0924566](https://www.github.com/yargs/yargs/commit/09245666e57facb140e0b45a9e45ca704883e5dd))

### [`v17.0.1`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1701-2021-05-03)

[Compare Source](https://togithub.com/yargs/yargs/compare/v17.0.0...v17.0.1)

### [`v17.0.0`](https://togithub.com/yargs/yargs/blob/HEAD/CHANGELOG.md#1700-2021-05-02)

[Compare Source](https://togithub.com/yargs/yargs/compare/v16.2.0...v17.0.0)

##### ⚠ BREAKING CHANGES

-   **node:** drop Node 10 ([#&#8203;1919](https://togithub.com/yargs/yargs/issues/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 ([#&#8203;1895](https://togithub.com/yargs/yargs/issues/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.
-   [#&#8203;1823](https://togithub.com/yargs/yargs/issues/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) ([#&#8203;1850](https://www.togithub.com/yargs/yargs/issues/1850)) ([00b74ad](https://www.github.com/yargs/yargs/commit/00b74adcb30ab89b4450ef7105ef1ad32d820ebf))
-   add parseSync/parseAsync method ([#&#8203;1898](https://www.togithub.com/yargs/yargs/issues/1898)) ([6130ad8](https://www.github.com/yargs/yargs/commit/6130ad89b85dc49e34190e596e14a2fd3e668781))
-   add support for `showVersion`, similar to `showHelp` ([#&#8203;1831](https://www.togithub.com/yargs/yargs/issues/1831)) ([1a1e2d5](https://www.github.com/yargs/yargs/commit/1a1e2d554dca3566bc174584394419be0120d207))
-   adds support for async builder ([#&#8203;1888](https://www.togithub.com/yargs/yargs/issues/1888)) ([ade29b8](https://www.github.com/yargs/yargs/commit/ade29b864abecaa8c4f8dcc3493f5eb24fb73d84)), closes [#&#8203;1042](https://www.togithub.com/yargs/yargs/issues/1042)
-   allow calling standard completion function from custom one ([#&#8203;1855](https://www.togithub.com/yargs/yargs/issues/1855)) ([31765cb](https://www.github.com/yargs/yargs/commit/31765cbdce812ee5c16aaae70ab523a2c7e0fcec))
-   allow default completion to be referenced and modified, in custom completion ([#&#8203;1878](https://www.togithub.com/yargs/yargs/issues/1878)) ([01619f6](https://www.github.com/yargs/yargs/commit/01619f6191a3ab16bf6b77456d4e9dfa80533907))
-   **async:** add support for async check and coerce ([#&#8203;1872](https://www.togithub.com/yargs/yargs/issues/1872)) ([8b95f57](https://www.github.com/yargs/yargs/commit/8b95f57bb2a49b098c6bf23cea88c6f900a34f89))
-   improve support for async/await ([#&#8203;1823](https://www.togithub.com/yargs/yargs/issues/1823)) ([169b815](https://www.github.com/yargs/yargs/commit/169b815df7ae190965f04030f28adc3ab92bb4b5))
-   **locale:** add Ukrainian locale ([#&#8203;1893](https://www.togithub.com/yargs/yargs/issues/1893)) ([c872dfc](https://www.github.com/yargs/yargs/commit/c872dfc1d87ebaa7fcc79801f649318a16195495))
-   **middleware:** async middleware can now be used before validation. ([e0f9363](https://www.github.com/yargs/yargs/commit/e0f93636e04fa7e02a2c3b1fe465b6a14aa1f06d))
-   **middleware:** global middleware now applied when no command is configured. ([e0f9363](https://www.github.com/yargs/yargs/commit/e0f93636e04fa7e02a2c3b1fe465b6a14aa1f06d))
-   **node:** drop Node 10 ([#&#8203;1919](https://www.togithub.com/yargs/yargs/issues/1919)) ([5edeb9e](https://www.github.com/yargs/yargs/commit/5edeb9ea17b1f0190a3590508f2e7911b5f70659))

##### Bug Fixes

-   always cache help message when running commands ([#&#8203;1865](https://www.togithub.com/yargs/yargs/issues/1865)) ([d57ca77](https://www.github.com/yargs/yargs/commit/d57ca7751d533d7e0f216cd9fbf7c2b0ec98f791)), closes [#&#8203;1853](https://www.togithub.com/yargs/yargs/issues/1853)
-   **async:** don't call parse callback until async ops complete ([#&#8203;1896](https://www.togithub.com/yargs/yargs/issues/1896)) ([a93f5ff](https://www.github.com/yargs/yargs/commit/a93f5ff35d7c09b01e0ca93d7d855d2b26593165)), closes [#&#8203;1888](https://www.togithub.com/yargs/yargs/issues/1888)
-   **builder:** apply default builder for showHelp/getHelp ([#&#8203;1913](https://www.togithub.com/yargs/yargs/issues/1913)) ([395bb67](https://www.github.com/yargs/yargs/commit/395bb67749787d269cabe80ffc3133c2f6958aeb)), closes [#&#8203;1912](https://www.togithub.com/yargs/yargs/issues/1912)
-   **builder:** nested builder is now awaited ([#&#8203;1925](https://www.togithub.com/yargs/yargs/issues/1925)) ([b5accd6](https://www.github.com/yargs/yargs/commit/b5accd64ccbd3ffb800517fb40d0f59382515fbb))
-   **coerce:** options using coerce now displayed in help ([#&#8203;1911](https://www.togithub.com/yargs/yargs/issues/1911)) ([d2128cc](https://www.github.com/yargs/yargs/commit/d2128cc4ffd411eed7111e6a3c561948330e4f6f)), closes [#&#8203;1909](https://www.togithub.com/yargs/yargs/issues/1909)
-   completion script name clashing on bash ([#&#8203;1903](https://www.togithub.com/yargs/yargs/issues/1903)) ([8f62d9a](https://www.github.com/yargs/yargs/commit/8f62d9a9e8bebf86f988c100ad3c417dc32b2471))
-   **deno:** use actual names for keys instead of inferring ([#&#8203;1891](https://www.togithub.com/yargs/yargs/issues/1891)) ([b96ef01](https://www.github.com/yargs/yargs/commit/b96ef01b16bc5377b79d7914dd5495068037fe7b))
-   exclude positionals from default completion ([#&#8203;1881](https://www.togithub.com/yargs/yargs/issues/1881)) ([0175677](https://www.github.com/yargs/yargs/commit/0175677b79ffe50a9c5477631288ae10120b8a32))
-   [yargs/yargs#1841 (comment) ([b96ef01](https://www.github.com/yargs/yargs/commit/b96ef01b16bc5377b79d7914dd5495068037fe7b))
-   showHelp() and .getHelp() now return same output for commands as --help ([#&#8203;1826](https://www.togithub.com/yargs/yargs/issues/1826)) ([36abf26](https://www.github.com/yargs/yargs/commit/36abf26919b5a19f3adec08598539851c34b7086))
-   zsh completion is now autoloadable ([#&#8203;1856](https://www.togithub.com/yargs/yargs/issues/1856)) ([d731f9f](https://www.github.com/yargs/yargs/commit/d731f9f9adbc11f918e918443c5bff4149fc6681))

##### Code Refactoring

-   **coerce:** coerce is now applied before validation. ([8b95f57](https://www.github.com/yargs/yargs/commit/8b95f57bb2a49b098c6bf23cea88c6f900a34f89))
-   deprecated reset() method is now private (call yargs() instead). ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))
-   implicitly private methods are now actually private ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))
-   **yargs-factory:** refactor yargs-factory to use class ([#&#8203;1895](https://www.togithub.com/yargs/yargs/issues/1895)) ([376f892](https://www.github.com/yargs/yargs/commit/376f89242733dcd4ecb8040685c40ae1d622931d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants