Skip to content

Commit

Permalink
chore: update @types/babel-traverse (#14791)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Dec 30, 2023
1 parent faf0714 commit 9b9933e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions packages/babel-plugin-jest-hoist/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {NodePath} from '@babel/traverse';
import {
type BlockStatement,
type CallExpression,
type EmptyStatement,
type Expression,
type Identifier,
type ImportDeclaration,
Expand Down Expand Up @@ -315,10 +316,11 @@ const extractJestObjExprIfHoistable = (expr: NodePath): JestObjInfo | null => {

function visitBlock(block: NodePath<BlockStatement> | NodePath<Program>) {
// use a temporary empty statement instead of the real first statement, which may itself be hoisted
const [varsHoistPoint, callsHoistPoint] = block.unshiftContainer('body', [
emptyStatement(),
emptyStatement(),
]);
const [varsHoistPoint, callsHoistPoint] = block.unshiftContainer<
BlockStatement | Program,
'body',
[EmptyStatement, EmptyStatement]
>('body', [emptyStatement(), emptyStatement()]);
block.traverse({
CallExpression: visitCallExpr,
VariableDeclarator: visitVariableDeclarator,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3":
"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3":
version: 7.23.6
resolution: "@babel/types@npm:7.23.6"
dependencies:
Expand Down Expand Up @@ -4979,11 +4979,11 @@ __metadata:
linkType: hard

"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6":
version: 7.18.3
resolution: "@types/babel__traverse@npm:7.18.3"
version: 7.20.5
resolution: "@types/babel__traverse@npm:7.20.5"
dependencies:
"@babel/types": ^7.3.0
checksum: d20953338b2f012ab7750932ece0a78e7d1645b0a6ff42d49be90f55e9998085da1374a9786a7da252df89555c6586695ba4d1d4b4e88ab2b9f306bcd35e00d3
"@babel/types": ^7.20.7
checksum: 608e0ab4fc31cd47011d98942e6241b34d461608c0c0e153377c5fd822c436c475f1ded76a56bfa76a1adf8d9266b727bbf9bfac90c4cb152c97f30dadc5b7e8
languageName: node
linkType: hard

Expand Down

0 comments on commit 9b9933e

Please sign in to comment.