@babel/plugin-transform-destructuring
Advanced tools
Comparing version
@@ -485,9 +485,7 @@ 'use strict'; | ||
if (!variableDeclarationHasPattern(declaration.node)) return; | ||
const specifiers = []; | ||
for (const name of Object.keys(path.getOuterBindingIdentifiers())) { | ||
specifiers.push(core.types.exportSpecifier(core.types.identifier(name), core.types.identifier(name))); | ||
{ | ||
var _path$splitExportDecl; | ||
(_path$splitExportDecl = path.splitExportDeclaration) != null ? _path$splitExportDecl : path.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration; | ||
} | ||
path.replaceWith(declaration.node); | ||
path.insertAfter(core.types.exportNamedDeclaration(null, specifiers)); | ||
path.scope.crawl(); | ||
path.splitExportDeclaration(); | ||
}, | ||
@@ -494,0 +492,0 @@ ForXStatement(path) { |
{ | ||
"name": "@babel/plugin-transform-destructuring", | ||
"version": "7.27.3", | ||
"version": "7.27.7", | ||
"description": "Compile ES2015 destructuring to ES5", | ||
@@ -20,3 +20,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.27.1" | ||
"@babel/helper-plugin-utils": "^7.27.1", | ||
"@babel/traverse": "^7.27.7" | ||
}, | ||
@@ -27,5 +28,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.27.3", | ||
"@babel/helper-plugin-test-runner": "^7.27.1", | ||
"@babel/traverse": "^7.27.3" | ||
"@babel/core": "^7.27.7", | ||
"@babel/helper-plugin-test-runner": "^7.27.1" | ||
}, | ||
@@ -32,0 +32,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
2
-33.33%85196
-0.38%3
50%570
-0.35%+ Added