neutrinojs / neutrino

Create and build modern JavaScript projects with zero initial configuration.
https://neutrinojs.org
Mozilla Public License 2.0
3.95k stars 214 forks source link

Update dependency yargs-parser to v20 #1619

Closed renovate[bot] closed 4 years ago

renovate[bot] commented 4 years ago

This PR contains the following updates:

Package Type Update Change
yargs-parser dependencies major ^19.0.4 -> ^20.0.0

Release Notes

yargs/yargs-parser ### [`v20.0.0`](https://togithub.com/yargs/yargs-parser/blob/master/CHANGELOG.md#​2000-httpswwwgithubcomyargsyargs-parsercomparev1904v2000-2020-09-09) [Compare Source](https://togithub.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) ##### ⚠ BREAKING CHANGES - do not ship type definitions ([#​318](https://togithub.com/yargs/yargs-parser/issues/318)) ##### Bug Fixes - only strip camel case if hyphenated ([#​316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#​315](https://www.github.com/yargs/yargs-parser/issues/315) ##### Code Refactoring - do not ship type definitions ([#​318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330)) ##### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27) ##### Bug Fixes - **build:** fixing publication ([#​310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5)) ##### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27) ##### Bug Fixes - **build:** switch to action for publish ([#​308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174)) ##### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27) ##### Bug Fixes - **types:** envPrefix should be optional ([#​305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523)) ##### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09) ##### Bug Fixes - **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0))

Renovate configuration

:date: Schedule: At any time (no schedule defined).

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

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

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



This PR has been generated by WhiteSource Renovate. View repository job log here.

davidje13 commented 3 years ago

Is it possible to get a release cut with this update? yargs-parser@19 has a whole thing going on with conflicting TypeScript definitions when using Jest:

node_modules/@types/yargs/index.d.ts:28:10 - error TS2305: Module '"../../yargs-parser/build/index.cjs"' has no exported member 'DetailedArguments'.

28 import { DetailedArguments, Configuration } from 'yargs-parser';
            ~~~~~~~~~~~~~~~~~

node_modules/@types/yargs/index.d.ts:28:29 - error TS2305: Module '"../../yargs-parser/build/index.cjs"' has no exported member 'Configuration'.

28 import { DetailedArguments, Configuration } from 'yargs-parser';
                               ~~~~~~~~~~~~~

For the curious (since there isn't much info about this available and I had to spend a lot of time investigating), yargs-parser@19 switched (possibly accidentally) to including its own definitions rather than using @types/yargs-parser, but the @types/yargs package still depends on @types/yargs-parser rather than yargs-parser. If found, the yargs-parser types will take priority over the @types/yargs-parser ones. That combined with NPM's package hoisting means that if there are 2 versions of yargs-parser installed, which one it finds is basically random (the lack of a direct dependency means it won't force it to a particular version for that part of the dependency tree). In yargs-parser@20 it works because they got rid of bundling types in the main project and went back to using the @types/yargs-parser package (https://github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330).

It's a interesting frustrating example of how DefinitelyTyped's packaging strategy and NPM's package hoisting strategy can in rare situations (when types migrate from living with the project to living on @types or vice-versa) combine to cause an incredible mess.

edmorley commented 3 years ago

@davidje13 Hi :-) That sounds like a pain! I've published Neutrino v9.5.0 which contains this update. Hope it helps!

davidje13 commented 3 years ago

Yep, all working again now. Thanks!