chore: drop TypeScript versions below 5.4 (#15621)

This commit is contained in:
Simen Bekkhus 2025-05-24 11:25:19 +02:00 committed by GitHub
parent cfd6e34b0d
commit e90eb4f96a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 10 additions and 8 deletions

View File

@ -48,8 +48,8 @@ jobs:
- name: ts integration
run: yarn test-ts --selectProjects ts-integration
- name: type tests
run: yarn test-types --target 5.0,current
- name: verify TypeScript@5.0 compatibility
run: yarn test-types --target 5.4,current
- name: verify TypeScript@5.4 compatibility
run: yarn verify-old-ts
- name: run ESLint with type info
run: yarn lint-ts-files

View File

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

View File

@ -95,12 +95,13 @@ onNodeVersions('<23.6', () => {
writeFiles(DIR, {
'__tests__/a-giraffe.js': "test('giraffe', () => expect(1).toBe(1));",
'jest.config.ts': `
/**@jest-config-loader-options {"transpileOnly":${!!skipTypeCheck}}*/
/**@jest-config-loader-options {"transpileOnly":${skipTypeCheck}}*/
import {Config} from 'jest';
const config: Config = { testTimeout: "10000" };
export default config;
`,
'package.json': '{}',
'tsconfig.json': '{}',
});
const typeErrorString =

View File

@ -41,7 +41,7 @@ const tsConfig = {
};
/* eslint-enable sort-keys */
const tsVersion = '5.0';
const tsVersion = '5.4';
function smoketest() {
const jestDirectory = path.resolve(

View File

@ -2,8 +2,8 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"module": "preserve",
"moduleResolution": "bundler",
"composite": true,
"declaration": true,
"emitDeclarationOnly": true,

View File

@ -1,8 +1,8 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"module": "preserve",
"moduleResolution": "bundler",
"noEmit": true,
"noUnusedLocals": false,
"noUnusedParameters": false,