From eda8e211b0beb919dc4a3fe0dccc2bd82d5750eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 25 Apr 2023 11:21:59 +0200 Subject: [PATCH 1/3] Babel option rename (blacklist -> denylist) --- packages/babel-plugin-jest-hoist/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); From 4ad537af0aef450e86610d04999423a6ddfdc91c Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 20 Sep 2023 08:56:29 +0200 Subject: [PATCH 2/3] increase peer dep --- packages/babel-jest/package.json | 2 +- packages/babel-preset-jest/package.json | 2 +- yarn.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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-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 From 7f6b2f5723637e7e87343825e8972b5cc5edd121 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 20 Sep 2023 08:58:23 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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