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

Add back support for node 16.10 #476

Closed
ParallelUniv3rse opened this issue Jul 19, 2022 · 7 comments
Closed

Add back support for node 16.10 #476

ParallelUniv3rse opened this issue Jul 19, 2022 · 7 comments

Comments

@ParallelUniv3rse
Copy link

ParallelUniv3rse commented Jul 19, 2022

Feature Request

Description:
Please add back support for node 16.10 into the package.json engines field.
the latest versions of jest-extended cannot be used when you're trying to avoid high memory consumption by jest in node v 16.11+ as described in jestjs/jest#11956.

This concerns jest-extended ^2.1.0 as well as ^3.0.0.

Possible solution:
Lower engines requirements for node to 16.10 from 16.13 in package.json

@keeganwitt
Copy link
Collaborator

keeganwitt commented Jul 19, 2022

We officially only support actively maintained LTS releases. This is what is indicated by having 16.13 in engines; it was the first LTS release in the 16.x line. However, if for some reason you need to use a different version, you should be able to. The "unsupported engine" message is just a warning.

@ParallelUniv3rse
Copy link
Author

Thank you for considering and for the explanation. Not sure about npm, but yarn fails to install on the engines requirement.

For anyone using yarn and looking for a workaround:
yarn install --ignore-engines

@keeganwitt
Copy link
Collaborator

keeganwitt commented Jul 20, 2022

Thanks for that comment. It's been a while since I've used Yarn and I forgot this behavior is different than npm. For npm, it just prints a warning, there's no ignore parameter needed, e.g.

$ npm i -D jest-extended
npm WARN notsup Unsupported engine for jest-extended@3.0.1: wanted: {"node":"^14.15.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-extended@3.0.1
...

It's worth noting, that a bunch of the latest Jest dependencies behave the same way,

$ npm i -D jest
npm WARN notsup Unsupported engine for jest@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest@28.1.3
npm WARN notsup Unsupported engine for @jest/core@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/core@28.1.3
npm WARN notsup Unsupported engine for @jest/types@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/types@28.1.3
npm WARN notsup Unsupported engine for jest-cli@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-cli@28.1.3
npm WARN notsup Unsupported engine for @jest/console@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/console@28.1.3
npm WARN notsup Unsupported engine for @jest/transform@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/transform@28.1.3
npm WARN notsup Unsupported engine for jest-changed-files@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-changed-files@28.1.3
npm WARN notsup Unsupported engine for jest-config@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-config@28.1.3
npm WARN notsup Unsupported engine for jest-message-util@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-message-util@28.1.3
npm WARN notsup Unsupported engine for jest-runner@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-runner@28.1.3
npm WARN notsup Unsupported engine for jest-regex-util@28.0.2: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-regex-util@28.0.2
npm WARN notsup Unsupported engine for jest-validate@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-validate@28.1.3
npm WARN notsup Unsupported engine for @jest/test-result@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/test-result@28.1.3
npm WARN notsup Unsupported engine for jest-resolve-dependencies@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-resolve-dependencies@28.1.3
npm WARN notsup Unsupported engine for jest-haste-map@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-haste-map@28.1.3
npm WARN notsup Unsupported engine for jest-resolve@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-resolve@28.1.3
npm WARN notsup Unsupported engine for @jest/reporters@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/reporters@28.1.3
npm WARN notsup Unsupported engine for jest-runtime@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-runtime@28.1.3
npm WARN notsup Unsupported engine for jest-util@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-util@28.1.3
npm WARN notsup Unsupported engine for jest-snapshot@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-snapshot@28.1.3
npm WARN notsup Unsupported engine for jest-watcher@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-watcher@28.1.3
npm WARN notsup Unsupported engine for pretty-format@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: pretty-format@28.1.3
npm WARN notsup Unsupported engine for @jest/schemas@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/schemas@28.1.3
npm WARN notsup Unsupported engine for jest-worker@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-worker@28.1.3
npm WARN notsup Unsupported engine for write-file-atomic@4.0.1: wanted: {"node":"^12.13.0 || ^14.15.0 || >=16"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: write-file-atomic@4.0.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.3.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN notsup Unsupported engine for jest-circus@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-circus@28.1.3
npm WARN notsup Unsupported engine for babel-jest@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: babel-jest@28.1.3
npm WARN notsup Unsupported engine for jest-environment-node@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-environment-node@28.1.3
npm WARN notsup Unsupported engine for jest-get-type@28.0.2: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-get-type@28.0.2
npm WARN notsup Unsupported engine for @jest/test-sequencer@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/test-sequencer@28.1.3
npm WARN notsup Unsupported engine for babel-preset-jest@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: babel-preset-jest@28.1.3
npm WARN notsup Unsupported engine for babel-plugin-jest-hoist@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: babel-plugin-jest-hoist@28.1.3
npm WARN notsup Unsupported engine for @jest/expect@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/expect@28.1.3
npm WARN notsup Unsupported engine for jest-each@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-each@28.1.3
npm WARN notsup Unsupported engine for jest-matcher-utils@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-matcher-utils@28.1.3
npm WARN notsup Unsupported engine for @jest/environment@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/environment@28.1.3
npm WARN notsup Unsupported engine for @jest/fake-timers@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/fake-timers@28.1.3
npm WARN notsup Unsupported engine for jest-mock@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-mock@28.1.3
npm WARN notsup Unsupported engine for expect@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: expect@28.1.3
npm WARN notsup Unsupported engine for @jest/expect-utils@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/expect-utils@28.1.3
npm WARN notsup Unsupported engine for jest-diff@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-diff@28.1.3
npm WARN notsup Unsupported engine for diff-sequences@28.1.1: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: diff-sequences@28.1.1
npm WARN notsup Unsupported engine for @jest/source-map@28.1.2: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/source-map@28.1.2
npm WARN notsup Unsupported engine for @jest/globals@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: @jest/globals@28.1.3
npm WARN notsup Unsupported engine for jest-docblock@28.1.1: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-docblock@28.1.1
npm WARN notsup Unsupported engine for jest-leak-detector@28.1.3: wanted: {"node":"^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"} (current: {"node":"14.10.1","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: jest-leak-detector@28.1.3
...

@SimenB
Copy link
Member

SimenB commented Jul 20, 2022

I think we can do the same here as in jestjs/jest#12754 and kulshekhar/ts-jest#3495 just so people don't have to supply a flag (or ignore warnings).

@SimenB SimenB reopened this Jul 20, 2022
@keeganwitt
Copy link
Collaborator

I don't object. I don't pay much attention to engines warnings personally.

@ShruthiNicheSolv
Copy link

I have node 16.13.1 with jest "^29.5.0" but getting

> jest --coverage

/home/shruthi/Projects/test/node_modules/jest-cli/build/run.js:129
    if (error?.stack) {
              ^

SyntaxError: Unexpected token .
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/shruthi/Projects/test/node_modules/jest-cli/build/index.js:18:12)

@SimenB
Copy link
Member

SimenB commented Jun 1, 2023

Node 16 (and even Node 14) supports optional chaining, so you're not using that.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#browser_compatibility


That said, this is not the correct issue (or even repository) to report your issue.

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

No branches or pull requests

4 participants