Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@babel/helper-module-transforms

Package Overview
Dependencies
Maintainers
4
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-module-transforms - npm Package Compare versions

Comparing version
7.28.3
to
7.28.6
+4
-6
lib/dynamic-import.js

@@ -8,8 +8,6 @@ "use strict";

var _core = require("@babel/core");
{
exports.getDynamicImportSource = function getDynamicImportSource(node) {
const [source] = node.arguments;
return _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) ? source : _core.template.expression.ast`\`\${${source}}\``;
};
}
exports.getDynamicImportSource = function getDynamicImportSource(node) {
const [source] = node.arguments;
return _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) ? source : _core.template.expression.ast`\`\${${source}}\``;
};
function buildDynamicImport(node, deferToThen, wrapWithPromise, builder) {

@@ -16,0 +14,0 @@ const specifier = _core.types.isCallExpression(node) ? node.arguments[0] : node.source;

+10
-12

@@ -7,14 +7,12 @@ "use strict";

exports.default = getModuleName;
{
const originalGetModuleName = getModuleName;
exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) {
var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
return originalGetModuleName(rootOpts, {
moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
});
};
}
const originalGetModuleName = getModuleName;
exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) {
var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
return originalGetModuleName(rootOpts, {
moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
});
};
function getModuleName(rootOpts, pluginOpts) {

@@ -21,0 +19,0 @@ const {

@@ -55,5 +55,3 @@ "use strict";

var _getModuleName = require("./get-module-name.js");
{
exports.getDynamicImportSource = require("./dynamic-import").getDynamicImportSource;
}
exports.getDynamicImportSource = require("./dynamic-import").getDynamicImportSource;
function rewriteModuleStatementsAndPrepareHeader(path, {

@@ -60,0 +58,0 @@ exportName,

@@ -331,7 +331,5 @@ "use strict";

programPath.get("body").forEach(child => {
var _child$splitExportDec;
if (!child.isExportDefaultDeclaration()) return;
{
var _child$splitExportDec;
(_child$splitExportDec = child.splitExportDeclaration) != null ? _child$splitExportDec : child.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
}
(_child$splitExportDec = child.splitExportDeclaration) != null ? _child$splitExportDec : child.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
child.splitExportDeclaration();

@@ -338,0 +336,0 @@ });

{
"name": "@babel/helper-module-transforms",
"version": "7.28.3",
"version": "7.28.6",
"description": "Babel helper functions for implementing ES6 module transformations",

@@ -18,8 +18,8 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/helper-module-imports": "^7.27.1",
"@babel/helper-validator-identifier": "^7.27.1",
"@babel/traverse": "^7.28.3"
"@babel/helper-module-imports": "^7.28.6",
"@babel/helper-validator-identifier": "^7.28.5",
"@babel/traverse": "^7.28.6"
},
"devDependencies": {
"@babel/core": "^7.28.3"
"@babel/core": "^7.28.6"
},

@@ -26,0 +26,0 @@ "peerDependencies": {

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