@babel/plugin-transform-parameters
Advanced tools
Comparing version 7.24.1 to 7.24.5
@@ -114,2 +114,3 @@ "use strict"; | ||
path.ensureBlock(); | ||
const path2 = path; | ||
const { | ||
@@ -120,5 +121,5 @@ async, | ||
if (generator || state.needsOuterBinding || shadowedParams.size > 0) { | ||
body.push((0, _shadowUtils.buildScopeIIFE)(shadowedParams, path.node.body)); | ||
body.push((0, _shadowUtils.buildScopeIIFE)(shadowedParams, path2.node.body)); | ||
path.set("body", _core.types.blockStatement(body)); | ||
const bodyPath = path.get("body.body"); | ||
const bodyPath = path2.get("body.body"); | ||
const arrowPath = bodyPath[bodyPath.length - 1].get("argument.callee"); | ||
@@ -131,5 +132,5 @@ arrowPath.arrowFunctionToExpression(); | ||
if (async) { | ||
path.node.body = _core.template.statement.ast`{ | ||
path2.node.body = _core.template.statement.ast`{ | ||
try { | ||
${path.node.body.body} | ||
${path2.node.body.body} | ||
} catch (e) { | ||
@@ -141,3 +142,3 @@ return Promise.reject(e); | ||
} else { | ||
path.get("body").unshiftContainer("body", body); | ||
path2.get("body").unshiftContainer("body", body); | ||
} | ||
@@ -144,0 +145,0 @@ return true; |
{ | ||
"name": "@babel/plugin-transform-parameters", | ||
"version": "7.24.1", | ||
"version": "7.24.5", | ||
"description": "Compile ES2015 default and rest parameters to ES5", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.24.0" | ||
"@babel/helper-plugin-utils": "^7.24.5" | ||
}, | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.24.1", | ||
"@babel/core": "^7.24.5", | ||
"@babel/helper-plugin-test-runner": "^7.24.1" | ||
@@ -30,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131538
13
543
+ Addedcaniuse-lite@1.0.30001620(transitive)
+ Addedelectron-to-chromium@1.4.774(transitive)
- Removedcaniuse-lite@1.0.30001621(transitive)
- Removedelectron-to-chromium@1.4.777(transitive)