@babel/traverse
Advanced tools
Comparing version 7.20.7 to 7.20.8
@@ -30,2 +30,3 @@ "use strict"; | ||
isCallExpression, | ||
isExportNamedDeclaration, | ||
isExpression, | ||
@@ -42,5 +43,7 @@ isIdentifier, | ||
const { | ||
parentPath | ||
parentPath, | ||
parent | ||
} = this; | ||
if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { | ||
if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || | ||
isExportNamedDeclaration(parent) || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { | ||
return parentPath.insertBefore(nodes); | ||
@@ -112,5 +115,7 @@ } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") { | ||
const { | ||
parentPath | ||
parentPath, | ||
parent | ||
} = this; | ||
if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { | ||
if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || | ||
isExportNamedDeclaration(parent) || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { | ||
return parentPath.insertAfter(nodes.map(node => { | ||
@@ -117,0 +122,0 @@ return isExpression(node) ? expressionStatement(node) : node; |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.20.7", | ||
"version": "7.20.8", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -5,0 +5,0 @@ "author": "The Babel Team (https://babel.dev/team)", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
577468
5075