@babel/helper-module-transforms
Advanced tools
Comparing version 7.21.0 to 7.21.2
@@ -45,3 +45,3 @@ "use strict"; | ||
local, | ||
source, | ||
sources, | ||
hasExports | ||
@@ -53,7 +53,7 @@ } = getModuleMetadata(programPath, { | ||
removeImportExportDeclarations(programPath); | ||
for (const [, metadata] of source) { | ||
for (const [source, metadata] of sources) { | ||
if (metadata.importsNamespace.size > 0) { | ||
metadata.name = metadata.importsNamespace.values().next().value; | ||
} | ||
const resolvedInterop = resolveImportInterop(importInterop, metadata.source, filename); | ||
const resolvedInterop = resolveImportInterop(importInterop, source, filename); | ||
if (resolvedInterop === "none") { | ||
@@ -74,3 +74,3 @@ metadata.interop = "none"; | ||
local, | ||
source, | ||
source: sources, | ||
stringSpecifiers | ||
@@ -121,3 +121,3 @@ }; | ||
lazy: false, | ||
source | ||
referenced: false | ||
}; | ||
@@ -143,2 +143,3 @@ sourceData.set(source, data); | ||
}); | ||
data.referenced = true; | ||
} | ||
@@ -154,2 +155,3 @@ } else if (spec.isImportNamespaceSpecifier()) { | ||
}); | ||
data.referenced = true; | ||
} | ||
@@ -166,2 +168,3 @@ } else if (spec.isImportSpecifier()) { | ||
}); | ||
data.referenced = true; | ||
} | ||
@@ -177,2 +180,3 @@ } | ||
}; | ||
data.referenced = true; | ||
} else if (child.isExportNamedDeclaration() && child.node.source) { | ||
@@ -187,2 +191,3 @@ hasExports = true; | ||
data.reexports.set(exportName, importName); | ||
data.referenced = true; | ||
if (exportName === "__esModule") { | ||
@@ -234,3 +239,3 @@ throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".'); | ||
local: localData, | ||
source: sourceData | ||
sources: sourceData | ||
}; | ||
@@ -237,0 +242,0 @@ } |
@@ -86,2 +86,3 @@ "use strict"; | ||
const meta = metadata.source.get(source); | ||
meta.referenced = true; | ||
if (localName) { | ||
@@ -88,0 +89,0 @@ if (meta.lazy) { |
{ | ||
"name": "@babel/helper-module-transforms", | ||
"version": "7.21.0", | ||
"version": "7.21.2", | ||
"description": "Babel helper functions for implementing ES6 module transformations", | ||
@@ -24,4 +24,4 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"@babel/template": "^7.20.7", | ||
"@babel/traverse": "^7.21.0", | ||
"@babel/types": "^7.21.0" | ||
"@babel/traverse": "^7.21.2", | ||
"@babel/types": "^7.21.2" | ||
}, | ||
@@ -28,0 +28,0 @@ "engines": { |
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
146007
1184
Updated@babel/traverse@^7.21.2
Updated@babel/types@^7.21.2