Skip to content

Commit

Permalink
chore: drop node 12 and 14 (#13033)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Jul 17, 2022
1 parent 9f4dc3e commit 71441df
Show file tree
Hide file tree
Showing 88 changed files with 441 additions and 750 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ workflows:
name: test-node-partial-<< matrix.node-version >>
matrix:
parameters:
node-version: ['12', '14', '16', '17', '18']
node-version: ['14', '16', '18']
- test-jest-jasmine
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [12.x, 14.x, 16.x, 17.x, 18.x]
node-version: [14.x, 16.x, 18.x]
shard: ['1/4', '2/4', '3/4', '4/4']
name: Node v${{ matrix.node-version }} on ${{ inputs.os }} (${{ matrix.shard }})
runs-on: ${{ inputs.os }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Chore & Maintenance

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

### Performance

## 28.1.3
Expand Down
4 changes: 2 additions & 2 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
'react', 'react-dom',
% Only RN should be bumped to react 18
'react-test-renderer',
% @types/node in the root need to stay on ~12.12.0
% @types/node in the root need to stay on ~14.14.45
'@types/node',
% upgrading the entire repository is a breaking change
'glob'
Expand Down Expand Up @@ -61,7 +61,7 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.access', null) :-
workspace_field(WorkspaceCwd, 'private', true).

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

% Enforces the main and types field to start with ./
Expand Down
222 changes: 0 additions & 222 deletions docs/UpgradingToJest28.md

This file was deleted.

16 changes: 16 additions & 0 deletions docs/UpgradingToJest29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: upgrading-to-jest29
title: From v28 to v29
---

Upgrading Jest from v28 to v29? This guide aims to help refactoring your configuration and tests.

:::info

See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md#2900) for the full list of changes.

:::

## Compatibility

The supported Node versions are 14.15, 16.10, 18.0 and above.
44 changes: 22 additions & 22 deletions e2e/__tests__/__snapshots__/coverageProviderV8.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

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`] = `
exports[`prints correct coverage report, if a CJS module is put under test without transformation 1`] = `
" console.log
this will print
at covered (module.ts:13:11)
at covered (module.js:11:11)
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 50 | 25 | 25 | 50 |
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
types.ts | 0 | 0 | 0 | 0 | 1-8
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
All files | 59.37 | 60 | 50 | 59.37 |
module.js | 79.16 | 75 | 66.66 | 79.16 | 14-16,19-20
uncovered.js | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------"
`;

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports[`moduleNameMapper wrong array configuration 1`] = `
12 | module.exports = () => 'test';
13 |
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:900:17)
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:896:17)
at Object.require (index.js:10:1)"
`;

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

0 comments on commit 71441df

Please sign in to comment.