-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: require Node.js 6+ for all packages #7258
Conversation
We already have it, it seems: https://github.com/facebook/jest/blob/319329f7942ed33f0be706a19a2b23d08eac0ea0/packages/jest/package.json#L14 What package did you install that did not warn? |
See http://kangax.github.io/compat-table/es2016plus/#node6_5 for Array.prototype.includes. It was in jest-validate with |
Well, but in our case it did not warn that Node.js 6 is required for Jest. See https://travis-ci.org/docker/kitematic/builds/443616745#L475 https://node.green/#ES2016-features-Array-prototype-includes |
We might want to add it to all packages, then. Didn't think about the case where people use the other parts of jest, silly to overlook.
That seems like an npm bug. Maybe because it's fetched from cache?
Yes, but it doesn't mention anything about 6.0.0 not having it. Node 6.0.0 has it: |
What can I do here to help?
Not sure as this is a very old npm version which was shipped with Node.js 4. |
If you update all
🤷♂️ Not much we can do here though, as we have had that |
Ok I'll change it to So it seems the table is not exact. |
Codecov Report
@@ Coverage Diff @@
## master #7258 +/- ##
=======================================
Coverage 66.55% 66.55%
=======================================
Files 237 237
Lines 9317 9317
Branches 4 3 -1
=======================================
Hits 6201 6201
Misses 3115 3115
Partials 1 1 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the changelog as well?
How exactly? I never did this in this repo before so I am open to any code suggestions (and it is open for edits by maintainers). |
Add an entry under "Chore" here: https://github.com/facebook/jest/blob/master/CHANGELOG.md |
Done. |
Thanks! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Changes in Jest packages require at least Node.js 6.5+ so there is also no compatibility with older releases of Node.js 6.
Motivation: Node.js 4 support was officially dropped in Jest 22 and we test only 6, 8 and 10 so it makes sense to enforce
node >= 6
on all packages to prevent breaking builds due to incompatible Node.js versions as this is a hard breaking change.See https://jestjs.io/blog/2017/12/18/jest-22
See #7253
Test plan