Skip to content

Commit

Permalink
Babel option rename (blacklist -> denylist) (#14109)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo authored Sep 20, 2023
1 parent 76b0318 commit 0081f94
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-plugin-jest-hoist/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const IDVisitor = {
) {
ids.add(path);
},
blacklist: [
denylist: [
'TypeAnnotation',
'TSTypeAnnotation',
'TSTypeQuery',
Expand Down Expand Up @@ -135,7 +135,7 @@ FUNCTIONS.mock = args => {

const ids: Set<NodePath<Identifier>> = 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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 0081f94

Please sign in to comment.