diff --git a/CHANGELOG.md b/CHANGELOG.md index 525ddd793b52..2b44958de987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Fixes +- `[babel-plugin-jest-hoist]` Use `denylist` instead of the deprecated `blacklist` for Babel 8 support ([#14109](https://github.com/jestjs/jest/pull/14109)) - `[jest-leak-detector]` Make leak-detector more aggressive when running GC ([#14526](https://github.com/jestjs/jest/pull/14526)) ### Performance @@ -21,6 +22,7 @@ - `[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460)) - `[*]` [**BREAKING**] Drop support for `typescript@4.3`, minimum version is now `5.0` ([#14542](https://github.com/facebook/jest/pull/14542)) +- `[babel-jest, babel-preset-jest]` [**BREAKING**] Increase peer dependency of `@babel/core` to `^7.11` ([#14109](https://github.com/jestjs/jest/pull/14109)) - `[jest-cli, jest-config, @jest/types]` [**BREAKING**] Remove deprecated `--init` argument ([#14490](https://github.com/jestjs/jest/pull/14490)) ## 29.7.0 diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index b783f4f16809..26d3359aa391 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -32,7 +32,7 @@ "@types/graceful-fs": "^4.1.3" }, "peerDependencies": { - "@babel/core": "^7.8.0" + "@babel/core": "^7.11.0" }, "engines": { "node": "^16.10.0 || ^18.12.0 || >=20.0.0" diff --git a/packages/babel-plugin-jest-hoist/src/index.ts b/packages/babel-plugin-jest-hoist/src/index.ts index c65f8080eafc..ea79cb8e5218 100644 --- a/packages/babel-plugin-jest-hoist/src/index.ts +++ b/packages/babel-plugin-jest-hoist/src/index.ts @@ -107,7 +107,7 @@ const IDVisitor = { ) { ids.add(path); }, - blacklist: [ + denylist: [ 'TypeAnnotation', 'TSTypeAnnotation', 'TSTypeQuery', @@ -135,7 +135,7 @@ FUNCTIONS.mock = args => { const ids: Set> = new Set(); const parentScope = moduleFactory.parentPath.scope; - // @ts-expect-error: ReferencedIdentifier and blacklist are not known on visitors + // @ts-expect-error: ReferencedIdentifier and denylist are not known on visitors moduleFactory.traverse(IDVisitor, {ids}); for (const id of ids) { const {name} = id.node; @@ -371,7 +371,7 @@ export default function jestHoist(): PluginObj<{ CallExpression: visitCallExpr, VariableDeclarator: visitVariableDeclarator, // do not traverse into nested blocks, or we'll hoist calls in there out to this block - blacklist: ['BlockStatement'], + denylist: ['BlockStatement'], }); callsHoistPoint.remove(); varsHoistPoint.remove(); diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 0fda8bd9bf32..9b0202a48fab 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -17,7 +17,7 @@ "babel-preset-current-node-syntax": "^1.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.11.0" }, "engines": { "node": "^16.10.0 || ^18.12.0 || >=20.0.0" diff --git a/yarn.lock b/yarn.lock index 843fd5df0992..95b8dff08a06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6482,7 +6482,7 @@ __metadata: graceful-fs: ^4.2.9 slash: ^3.0.0 peerDependencies: - "@babel/core": ^7.8.0 + "@babel/core": ^7.11.0 languageName: unknown linkType: soft @@ -6697,7 +6697,7 @@ __metadata: babel-plugin-jest-hoist: "workspace:^" babel-preset-current-node-syntax: ^1.0.0 peerDependencies: - "@babel/core": ^7.0.0 + "@babel/core": ^7.11.0 languageName: unknown linkType: soft