75lb / command-line-args

A mature, feature-complete library to parse command-line options.
MIT License
679 stars 107 forks source link

Jumping to array-back@6.1.2 restrict node to >=14 #115

Closed j0k3r closed 2 years ago

j0k3r commented 2 years ago

I don't know if it was intended, but version 5.1.2 now require node.js >= 14 because of array-back@6.1.2. It doesn't fail when using NPM (I don't know why ...) but a warning is displayed.

/tmp/command-line-args$ npm i
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'array-back@6.1.2',
npm WARN EBADENGINE   required: { node: '>=14' },
npm WARN EBADENGINE   current: { node: 'v12.22.1', npm: '7.16.0' }
npm WARN EBADENGINE }
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 168 packages, and audited 169 packages in 16s

3 packages are looking for funding
  run `npm fund` for details

6 vulnerabilities (2 moderate, 4 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
/tmp/command-line-args$

While using yarn, it fail hard:

/tmp/command-line-args$ yarn
yarn install v1.22.10
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning coveralls > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning coveralls > request > har-validator@5.1.5: this library is no longer supported
warning coveralls > request > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[3/5] 🚚  Fetching packages...
error array-back@6.1.2: The engine "node" is incompatible with this module. Expected version ">=14". Got "12.22.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/tmp/command-line-args$

I don't know if you want to force people to use Node 14, but at least the whole test suite is wrong saying node is supported starting version 4. You should revert to a previous version of array-back or defined the engine in package.json to explicitly say the lib is now more compatible with node < 14.

75lb commented 2 years ago

Hi, thanks for the report.. array-back was upgraded in error - I have reverted it back to version 3 (the version used in v5.1.1) and released v5.1.3 of command-line-args.

Please run npm install again..

j0k3r commented 2 years ago

Great, thanks for quick reply!