@babel/plugin-transform-destructuring
Advanced tools
Comparing version 7.18.0 to 7.18.6
@@ -209,3 +209,3 @@ 'use strict'; | ||
copiedPattern.properties[i] = Object.assign({}, copiedPattern.properties[i], { | ||
copiedPattern.properties[i] = Object.assign({}, prop, { | ||
key: name | ||
@@ -416,14 +416,19 @@ }); | ||
for (const node of nodes) { | ||
if (tail !== null && core.types.isVariableDeclaration(node)) { | ||
tail.declarations.push(...node.declarations); | ||
if (core.types.isVariableDeclaration(node)) { | ||
if (tail !== null) { | ||
tail.declarations.push(...node.declarations); | ||
continue; | ||
} else { | ||
node.kind = nodeKind; | ||
tail = node; | ||
} | ||
} else { | ||
node.kind = nodeKind; | ||
tail = null; | ||
} | ||
if (!node.loc) { | ||
node.loc = nodeLoc; | ||
} | ||
if (!node.loc) { | ||
node.loc = nodeLoc; | ||
} | ||
nodesOut.push(node); | ||
tail = core.types.isVariableDeclaration(node) ? node : null; | ||
} | ||
nodesOut.push(node); | ||
} | ||
@@ -531,3 +536,3 @@ | ||
path.ensureBlock(); | ||
const statementBody = node.body.body; | ||
const statementBody = path.node.body.body; | ||
const nodes = []; | ||
@@ -586,3 +591,3 @@ | ||
destructuring.init(pattern, ref); | ||
node.body.body = nodes.concat(node.body.body); | ||
node.body.body = [...nodes, ...node.body.body]; | ||
scope.crawl(); | ||
@@ -589,0 +594,0 @@ }, |
{ | ||
"name": "@babel/plugin-transform-destructuring", | ||
"version": "7.18.0", | ||
"version": "7.18.6", | ||
"description": "Compile ES2015 destructuring to ES5", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.17.12" | ||
"@babel/helper-plugin-utils": "^7.18.6" | ||
}, | ||
@@ -27,5 +27,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.18.0", | ||
"@babel/helper-plugin-test-runner": "^7.16.7", | ||
"@babel/traverse": "^7.18.0" | ||
"@babel/core": "^7.18.6", | ||
"@babel/helper-plugin-test-runner": "^7.18.6", | ||
"@babel/traverse": "^7.18.6" | ||
}, | ||
@@ -35,3 +35,4 @@ "engines": { | ||
}, | ||
"author": "The Babel Team (https://babel.dev/team)" | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
"type": "commonjs" | ||
} |
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
77494
5
519