@babel/helper-module-transforms
Advanced tools
Comparing version 7.24.9 to 7.25.0
@@ -12,3 +12,2 @@ "use strict"; | ||
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); | ||
var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration"); | ||
function hasExports(metadata) { | ||
@@ -331,3 +330,7 @@ return metadata.hasExports; | ||
if (!child.isExportDefaultDeclaration()) return; | ||
(0, _helperSplitExportDeclaration.default)(child); | ||
{ | ||
var _child$splitExportDec; | ||
(_child$splitExportDec = child.splitExportDeclaration) != null ? _child$splitExportDec : child.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration; | ||
} | ||
child.splitExportDeclaration(); | ||
}); | ||
@@ -334,0 +337,0 @@ } |
@@ -7,21 +7,17 @@ "use strict"; | ||
exports.default = rewriteThis; | ||
var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor"); | ||
var _core = require("@babel/core"); | ||
const { | ||
numericLiteral, | ||
unaryExpression | ||
} = _core.types; | ||
var _traverse = require("@babel/traverse"); | ||
let rewriteThisVisitor; | ||
function rewriteThis(programPath) { | ||
if (!rewriteThisVisitor) { | ||
rewriteThisVisitor = _core.traverse.visitors.merge([_helperEnvironmentVisitor.default, { | ||
rewriteThisVisitor = _traverse.visitors.environmentVisitor({ | ||
ThisExpression(path) { | ||
path.replaceWith(unaryExpression("void", numericLiteral(0), true)); | ||
path.replaceWith(_core.types.unaryExpression("void", _core.types.numericLiteral(0), true)); | ||
} | ||
}]); | ||
}); | ||
rewriteThisVisitor.noScope = true; | ||
} | ||
(0, _core.traverse)(programPath.node, rewriteThisVisitor); | ||
(0, _traverse.default)(programPath.node, rewriteThisVisitor); | ||
} | ||
//# sourceMappingURL=rewrite-this.js.map |
{ | ||
"name": "@babel/helper-module-transforms", | ||
"version": "7.24.9", | ||
"version": "7.25.0", | ||
"description": "Babel helper functions for implementing ES6 module transformations", | ||
@@ -18,7 +18,6 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"dependencies": { | ||
"@babel/helper-environment-visitor": "^7.24.7", | ||
"@babel/helper-module-imports": "^7.24.7", | ||
"@babel/helper-simple-access": "^7.24.7", | ||
"@babel/helper-split-export-declaration": "^7.24.7", | ||
"@babel/helper-validator-identifier": "^7.24.7" | ||
"@babel/helper-validator-identifier": "^7.24.7", | ||
"@babel/traverse": "^7.25.0" | ||
}, | ||
@@ -25,0 +24,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
159837
5
1248
+ Added@babel/traverse@^7.25.0
- Removed@babel/helper-environment-visitor@7.24.7(transitive)
- Removed@babel/helper-split-export-declaration@7.24.7(transitive)