@babel/plugin-transform-modules-systemjs
Advanced tools
Comparing version 7.16.7 to 7.17.8
@@ -21,3 +21,3 @@ "use strict"; | ||
const buildTemplate = (0, _core.template)(` | ||
const buildTemplate = _core.template.statement(` | ||
SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) { | ||
@@ -32,3 +32,4 @@ "use strict"; | ||
`); | ||
const buildExportAll = (0, _core.template)(` | ||
const buildExportAll = _core.template.statement(` | ||
for (var KEY in TARGET) { | ||
@@ -38,2 +39,3 @@ if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY]; | ||
`); | ||
const MISSING_PLUGIN_WARNING = `\ | ||
@@ -259,2 +261,4 @@ WARNING: Dynamic import() transformation must be enabled using the | ||
path.replaceWith(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.cloneNode(path.node.id), _core.types.toExpression(path.node)))); | ||
} else if (path.isVariableDeclaration()) { | ||
path.node.kind = "var"; | ||
} else if (path.isImportDeclaration()) { | ||
@@ -275,5 +279,6 @@ const source = path.node.source.value; | ||
const declar = path.get("declaration"); | ||
const id = declar.node.id; | ||
if (declar.isClassDeclaration()) { | ||
const id = declar.node.id; | ||
if (id) { | ||
@@ -291,2 +296,4 @@ exportNames.push("default"); | ||
} else if (declar.isFunctionDeclaration()) { | ||
const id = declar.node.id; | ||
if (id) { | ||
@@ -312,3 +319,3 @@ beforeBody.push(declar.node); | ||
if (path.isFunction()) { | ||
if (declar.isFunction()) { | ||
const node = declar.node; | ||
@@ -321,3 +328,3 @@ const name = node.id.name; | ||
removedPaths.push(path); | ||
} else if (path.isClass()) { | ||
} else if (declar.isClass()) { | ||
const name = declar.node.id.name; | ||
@@ -330,2 +337,6 @@ exportNames.push(name); | ||
} else { | ||
if (declar.isVariableDeclaration()) { | ||
declar.node.kind = "var"; | ||
} | ||
for (const name of Object.keys(declar.getBindingIdentifiers())) { | ||
@@ -423,3 +434,3 @@ addExportName(name, name); | ||
} | ||
}, null); | ||
}); | ||
@@ -426,0 +437,0 @@ if (variableIds.length) { |
{ | ||
"name": "@babel/plugin-transform-modules-systemjs", | ||
"version": "7.16.7", | ||
"version": "7.17.8", | ||
"description": "This plugin transforms ES2015 modules to SystemJS", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"@babel/helper-hoist-variables": "^7.16.7", | ||
"@babel/helper-module-transforms": "^7.16.7", | ||
"@babel/helper-module-transforms": "^7.17.7", | ||
"@babel/helper-plugin-utils": "^7.16.7", | ||
@@ -30,3 +30,3 @@ "@babel/helper-validator-identifier": "^7.16.7", | ||
"devDependencies": { | ||
"@babel/core": "^7.16.7", | ||
"@babel/core": "^7.17.8", | ||
"@babel/helper-plugin-test-runner": "^7.16.7", | ||
@@ -33,0 +33,0 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3" |
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
20993
396