Skip to content

Commit e90eb4f

Browse files
authored
chore: drop TypeScript versions below 5.4 (#15621)
1 parent cfd6e34 commit e90eb4f

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
- name: ts integration
4949
run: yarn test-ts --selectProjects ts-integration
5050
- name: type tests
51-
run: yarn test-types --target 5.0,current
52-
- name: verify TypeScript@5.0 compatibility
51+
run: yarn test-types --target 5.4,current
52+
- name: verify TypeScript@5.4 compatibility
5353
run: yarn verify-old-ts
5454
- name: run ESLint with type info
5555
run: yarn lint-ts-files

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
- `[*]` [**BREAKING**] Add ESM wrapper for all of Jest's modules ([#14661](https://github.com/jestjs/jest/pull/14661))
123123
- `[*]` [**BREAKING**] Upgrade to `glob@10` ([#14509](https://github.com/jestjs/jest/pull/14509))
124124
- `[*]` Use `TypeError` over `Error` where appropriate ([#14799](https://github.com/jestjs/jest/pull/14799))
125+
- `[*]` [**BREAKING**] Drop support for TypeScript versions below 5.4 ([#15621](https://github.com/jestjs/jest/pull/15621))
125126
- `[docs]` Fix typos in `CHANGELOG.md` and `packages/jest-validate/README.md` ([#14640](https://github.com/jestjs/jest/pull/14640))
126127
- `[docs]` Don't use alias matchers in docs ([#14631](https://github.com/jestjs/jest/pull/14631))
127128
- `[babel-jest, babel-preset-jest]` [**BREAKING**] Increase peer dependency of `@babel/core` to `^7.11` ([#14109](https://github.com/jestjs/jest/pull/14109))

e2e/__tests__/jest.config.ts.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ onNodeVersions('<23.6', () => {
9595
writeFiles(DIR, {
9696
'__tests__/a-giraffe.js': "test('giraffe', () => expect(1).toBe(1));",
9797
'jest.config.ts': `
98-
/**@jest-config-loader-options {"transpileOnly":${!!skipTypeCheck}}*/
98+
/**@jest-config-loader-options {"transpileOnly":${skipTypeCheck}}*/
9999
import {Config} from 'jest';
100100
const config: Config = { testTimeout: "10000" };
101101
export default config;
102102
`,
103103
'package.json': '{}',
104+
'tsconfig.json': '{}',
104105
});
105106

106107
const typeErrorString =

scripts/verifyOldTs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const tsConfig = {
4141
};
4242
/* eslint-enable sort-keys */
4343

44-
const tsVersion = '5.0';
44+
const tsVersion = '5.4';
4545

4646
function smoketest() {
4747
const jestDirectory = path.resolve(

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"extends": "@tsconfig/node16/tsconfig.json",
44
"compilerOptions": {
5-
"module": "commonjs",
6-
"moduleResolution": "node",
5+
"module": "preserve",
6+
"moduleResolution": "bundler",
77
"composite": true,
88
"declaration": true,
99
"emitDeclarationOnly": true,

tsconfig.typetest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "@tsconfig/node16/tsconfig.json",
33
"compilerOptions": {
4-
"module": "commonjs",
5-
"moduleResolution": "node",
4+
"module": "preserve",
5+
"moduleResolution": "bundler",
66
"noEmit": true,
77
"noUnusedLocals": false,
88
"noUnusedParameters": false,

0 commit comments

Comments
 (0)