Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-modules-systemjs

Package Overview
Dependencies
Maintainers
4
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-modules-systemjs - npm Package Compare versions

Comparing version 7.16.7 to 7.17.8

23

lib/index.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc