Skip to content

Commit 71441df

Browse files
authored
chore: drop node 12 and 14 (jestjs#13033)
1 parent 9f4dc3e commit 71441df

File tree

88 files changed

+441
-750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+441
-750
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ workflows:
5454
name: test-node-partial-<< matrix.node-version >>
5555
matrix:
5656
parameters:
57-
node-version: ['12', '14', '16', '17', '18']
57+
node-version: ['14', '16', '18']
5858
- test-jest-jasmine

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
node-version: [12.x, 14.x, 16.x, 17.x, 18.x]
15+
node-version: [14.x, 16.x, 18.x]
1616
shard: ['1/4', '2/4', '3/4', '4/4']
1717
name: Node v${{ matrix.node-version }} on ${{ inputs.os }} (${{ matrix.shard }})
1818
runs-on: ${{ inputs.os }}

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Chore & Maintenance
88

9+
- `[*]` [**BREAKING**] Drop support for Node v12 and v17 ([#13033](https://github.com/facebook/jest/pull/13033))
10+
911
### Performance
1012

1113
## 28.1.3

constraints.pro

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
2727
'react', 'react-dom',
2828
% Only RN should be bumped to react 18
2929
'react-test-renderer',
30-
% @types/node in the root need to stay on ~12.12.0
30+
% @types/node in the root need to stay on ~14.14.45
3131
'@types/node',
3232
% upgrading the entire repository is a breaking change
3333
'glob'
@@ -61,7 +61,7 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :-
6161
workspace_field(WorkspaceCwd, 'private', true).
6262

6363
% Enforces the engines.node field for public workspace
64-
gen_enforced_field(WorkspaceCwd, 'engines.node', '^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0') :-
64+
gen_enforced_field(WorkspaceCwd, 'engines.node', '^14.15.0 || ^16.10.0 || >=18.0.0') :-
6565
\+ workspace_field(WorkspaceCwd, 'private', true).
6666

6767
% Enforces the main and types field to start with ./

docs/UpgradingToJest28.md

-222
This file was deleted.

docs/UpgradingToJest29.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: upgrading-to-jest29
3+
title: From v28 to v29
4+
---
5+
6+
Upgrading Jest from v28 to v29? This guide aims to help refactoring your configuration and tests.
7+
8+
:::info
9+
10+
See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md#2900) for the full list of changes.
11+
12+
:::
13+
14+
## Compatibility
15+
16+
The supported Node versions are 14.15, 16.10, 18.0 and above.

e2e/__tests__/__snapshots__/coverageProviderV8.test.ts.snap

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`on node >=12.16.0 prints correct coverage report, if a TS module is transpiled by custom transformer to ESM put under test 1`] = `
3+
exports[`prints correct coverage report, if a CJS module is put under test without transformation 1`] = `
44
" console.log
55
this will print
66
7-
at covered (module.ts:13:11)
7+
at covered (module.js:11:11)
88
99
--------------|---------|----------|---------|---------|-------------------
1010
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1111
--------------|---------|----------|---------|---------|-------------------
12-
All files | 50 | 25 | 25 | 50 |
13-
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
14-
types.ts | 0 | 0 | 0 | 0 | 1-8
15-
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
12+
All files | 59.37 | 60 | 50 | 59.37 |
13+
module.js | 79.16 | 75 | 66.66 | 79.16 | 14-16,19-20
14+
uncovered.js | 0 | 0 | 0 | 0 | 1-8
1615
--------------|---------|----------|---------|---------|-------------------"
1716
`;
1817

19-
exports[`on node >=12.16.0 prints correct coverage report, if an ESM module is put under test without transformation 1`] = `
18+
exports[`prints correct coverage report, if a TS module is transpiled by Babel to CJS and put under test 1`] = `
2019
" console.log
2120
this will print
2221
23-
at covered (module.js:11:11)
22+
at log (module.ts:13:11)
2423
2524
--------------|---------|----------|---------|---------|-------------------
2625
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
2726
--------------|---------|----------|---------|---------|-------------------
28-
All files | 59.37 | 50 | 33.33 | 59.37 |
29-
module.js | 79.16 | 66.66 | 50 | 79.16 | 14-16,19-20
30-
uncovered.js | 0 | 0 | 0 | 0 | 1-8
27+
All files | 50 | 25 | 25 | 50 |
28+
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
29+
types.ts | 0 | 0 | 0 | 0 | 1-8
30+
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
3131
--------------|---------|----------|---------|---------|-------------------"
3232
`;
3333

34-
exports[`prints correct coverage report, if a CJS module is put under test without transformation 1`] = `
34+
exports[`prints correct coverage report, if a TS module is transpiled by custom transformer to ESM put under test 1`] = `
3535
" console.log
3636
this will print
3737
38-
at covered (module.js:11:11)
38+
at covered (module.ts:13:11)
3939
4040
--------------|---------|----------|---------|---------|-------------------
4141
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
4242
--------------|---------|----------|---------|---------|-------------------
43-
All files | 59.37 | 60 | 50 | 59.37 |
44-
module.js | 79.16 | 75 | 66.66 | 79.16 | 14-16,19-20
45-
uncovered.js | 0 | 0 | 0 | 0 | 1-8
43+
All files | 50 | 25 | 25 | 50 |
44+
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
45+
types.ts | 0 | 0 | 0 | 0 | 1-8
46+
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
4647
--------------|---------|----------|---------|---------|-------------------"
4748
`;
4849

49-
exports[`prints correct coverage report, if a TS module is transpiled by Babel to CJS and put under test 1`] = `
50+
exports[`prints correct coverage report, if an ESM module is put under test without transformation 1`] = `
5051
" console.log
5152
this will print
5253
53-
at log (module.ts:13:11)
54+
at covered (module.js:11:11)
5455
5556
--------------|---------|----------|---------|---------|-------------------
5657
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
5758
--------------|---------|----------|---------|---------|-------------------
58-
All files | 50 | 25 | 25 | 50 |
59-
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
60-
types.ts | 0 | 0 | 0 | 0 | 1-8
61-
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
59+
All files | 59.37 | 50 | 33.33 | 59.37 |
60+
module.js | 79.16 | 66.66 | 50 | 79.16 | 14-16,19-20
61+
uncovered.js | 0 | 0 | 0 | 0 | 1-8
6262
--------------|---------|----------|---------|---------|-------------------"
6363
`;
6464

e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports[`moduleNameMapper wrong array configuration 1`] = `
4141
12 | module.exports = () => 'test';
4242
13 |
4343
44-
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:900:17)
44+
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:896:17)
4545
at Object.require (index.js:10:1)"
4646
`;
4747

@@ -70,6 +70,6 @@ exports[`moduleNameMapper wrong configuration 1`] = `
7070
12 | module.exports = () => 'test';
7171
13 |
7272
73-
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:900:17)
73+
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:896:17)
7474
at Object.require (index.js:10:1)"
7575
`;

0 commit comments

Comments
 (0)