@babel/helper-module-transforms
Advanced tools
Comparing version 7.13.12 to 7.13.14
@@ -7,16 +7,28 @@ "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 | ||
}); | ||
}; | ||
} | ||
function getModuleName(rootOpts, pluginOpts) { | ||
var _pluginOpts$moduleRoo, _rootOpts$moduleIds, _rootOpts$moduleRoot; | ||
const { | ||
filename, | ||
filenameRelative = filename, | ||
sourceRoot = (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot | ||
sourceRoot = pluginOpts.moduleRoot | ||
} = rootOpts; | ||
const { | ||
moduleId = rootOpts.moduleId, | ||
moduleIds = (_rootOpts$moduleIds = rootOpts.moduleIds) != null ? _rootOpts$moduleIds : !!moduleId, | ||
getModuleId = rootOpts.getModuleId, | ||
moduleRoot = (_rootOpts$moduleRoot = rootOpts.moduleRoot) != null ? _rootOpts$moduleRoot : sourceRoot | ||
moduleId, | ||
moduleIds = !!moduleId, | ||
getModuleId, | ||
moduleRoot = sourceRoot | ||
} = pluginOpts; | ||
@@ -23,0 +35,0 @@ if (!moduleIds) return null; |
@@ -295,3 +295,3 @@ "use strict"; | ||
hasReexport = hasReexport || data.reexportAll; | ||
hasReexport = hasReexport || !!data.reexportAll; | ||
} | ||
@@ -298,0 +298,0 @@ |
@@ -178,3 +178,3 @@ "use strict"; | ||
if (exportName === "__esModule") { | ||
throw exportName.buildCodeFrameError('Illegal export "__esModule".'); | ||
throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".'); | ||
} | ||
@@ -181,0 +181,0 @@ }); |
@@ -51,3 +51,3 @@ "use strict"; | ||
programPath.traverse(rewriteBindingInitVisitor, { | ||
const rewriteBindingInitVisitorState = { | ||
metadata, | ||
@@ -57,5 +57,6 @@ requeueInParent, | ||
exported | ||
}); | ||
}; | ||
programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState); | ||
(0, _helperSimpleAccess.default)(programPath, new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())])); | ||
programPath.traverse(rewriteReferencesVisitor, { | ||
const rewriteReferencesVisitorState = { | ||
seen: new WeakSet(), | ||
@@ -80,3 +81,4 @@ metadata, | ||
} | ||
}); | ||
}; | ||
programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState); | ||
} | ||
@@ -180,3 +182,3 @@ | ||
} = ref; | ||
path.replaceWith(t.JSXMemberExpression(t.JSXIdentifier(object.name), t.JSXIdentifier(property.name))); | ||
path.replaceWith(t.jsxMemberExpression(t.jsxIdentifier(object.name), t.jsxIdentifier(property.name))); | ||
} else { | ||
@@ -183,0 +185,0 @@ path.replaceWith(ref); |
{ | ||
"name": "@babel/helper-module-transforms", | ||
"version": "7.13.12", | ||
"version": "7.13.14", | ||
"description": "Babel helper functions for implementing ES6 module transformations", | ||
@@ -24,5 +24,5 @@ "author": "Logan Smyth <loganfsmyth@gmail.com>", | ||
"@babel/template": "^7.12.13", | ||
"@babel/traverse": "^7.13.0", | ||
"@babel/types": "^7.13.12" | ||
"@babel/traverse": "^7.13.13", | ||
"@babel/types": "^7.13.14" | ||
} | ||
} |
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
38448
940
Updated@babel/traverse@^7.13.13
Updated@babel/types@^7.13.14