Skip to content

Commit 0081f94

Browse files
Babel option rename (blacklist -> denylist) (#14109)
1 parent 76b0318 commit 0081f94

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
### Fixes
1313

14+
- `[babel-plugin-jest-hoist]` Use `denylist` instead of the deprecated `blacklist` for Babel 8 support ([#14109](https://github.com/jestjs/jest/pull/14109))
1415
- `[jest-leak-detector]` Make leak-detector more aggressive when running GC ([#14526](https://github.com/jestjs/jest/pull/14526))
1516

1617
### Performance
@@ -21,6 +22,7 @@
2122

2223
- `[*]` [**BREAKING**] Drop support for Node.js versions 14 and 19 ([#14460](https://github.com/jestjs/jest/pull/14460))
2324
- `[*]` [**BREAKING**] Drop support for `[email protected]`, minimum version is now `5.0` ([#14542](https://github.com/facebook/jest/pull/14542))
25+
- `[babel-jest, babel-preset-jest]` [**BREAKING**] Increase peer dependency of `@babel/core` to `^7.11` ([#14109](https://github.com/jestjs/jest/pull/14109))
2426
- `[jest-cli, jest-config, @jest/types]` [**BREAKING**] Remove deprecated `--init` argument ([#14490](https://github.com/jestjs/jest/pull/14490))
2527

2628
## 29.7.0

packages/babel-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/graceful-fs": "^4.1.3"
3333
},
3434
"peerDependencies": {
35-
"@babel/core": "^7.8.0"
35+
"@babel/core": "^7.11.0"
3636
},
3737
"engines": {
3838
"node": "^16.10.0 || ^18.12.0 || >=20.0.0"

packages/babel-plugin-jest-hoist/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const IDVisitor = {
107107
) {
108108
ids.add(path);
109109
},
110-
blacklist: [
110+
denylist: [
111111
'TypeAnnotation',
112112
'TSTypeAnnotation',
113113
'TSTypeQuery',
@@ -135,7 +135,7 @@ FUNCTIONS.mock = args => {
135135

136136
const ids: Set<NodePath<Identifier>> = new Set();
137137
const parentScope = moduleFactory.parentPath.scope;
138-
// @ts-expect-error: ReferencedIdentifier and blacklist are not known on visitors
138+
// @ts-expect-error: ReferencedIdentifier and denylist are not known on visitors
139139
moduleFactory.traverse(IDVisitor, {ids});
140140
for (const id of ids) {
141141
const {name} = id.node;
@@ -371,7 +371,7 @@ export default function jestHoist(): PluginObj<{
371371
CallExpression: visitCallExpr,
372372
VariableDeclarator: visitVariableDeclarator,
373373
// do not traverse into nested blocks, or we'll hoist calls in there out to this block
374-
blacklist: ['BlockStatement'],
374+
denylist: ['BlockStatement'],
375375
});
376376
callsHoistPoint.remove();
377377
varsHoistPoint.remove();

packages/babel-preset-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"babel-preset-current-node-syntax": "^1.0.0"
1818
},
1919
"peerDependencies": {
20-
"@babel/core": "^7.0.0"
20+
"@babel/core": "^7.11.0"
2121
},
2222
"engines": {
2323
"node": "^16.10.0 || ^18.12.0 || >=20.0.0"

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6482,7 +6482,7 @@ __metadata:
64826482
graceful-fs: ^4.2.9
64836483
slash: ^3.0.0
64846484
peerDependencies:
6485-
"@babel/core": ^7.8.0
6485+
"@babel/core": ^7.11.0
64866486
languageName: unknown
64876487
linkType: soft
64886488

@@ -6697,7 +6697,7 @@ __metadata:
66976697
babel-plugin-jest-hoist: "workspace:^"
66986698
babel-preset-current-node-syntax: ^1.0.0
66996699
peerDependencies:
6700-
"@babel/core": ^7.0.0
6700+
"@babel/core": ^7.11.0
67016701
languageName: unknown
67026702
linkType: soft
67036703

0 commit comments

Comments
 (0)