Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-modules-systemjs

Package Overview
Dependencies
Maintainers
6
Versions
102
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.12.1 to 7.12.13

31

lib/index.js

@@ -43,2 +43,7 @@ "use strict";

`;
const MISSING_PLUGIN_ERROR = `\
ERROR: Dynamic import() transformation must be enabled using the
@babel/plugin-proposal-dynamic-import plugin. Babel 8
no longer transforms import() without using that plugin.
`;

@@ -64,14 +69,16 @@ function getExportSpecifierName(node, stringSpecifiers) {

if (exportNames.length === 1) {
statements.push(_core.types.expressionStatement(_core.types.callExpression(exportIdent, [_core.types.stringLiteral(exportNames[0]), exportValues[0]])));
} else if (!exportStarTarget) {
const objectProperties = [];
if (!exportStarTarget) {
if (exportNames.length === 1) {
statements.push(_core.types.expressionStatement(_core.types.callExpression(exportIdent, [_core.types.stringLiteral(exportNames[0]), exportValues[0]])));
} else {
const objectProperties = [];
for (let i = 0; i < exportNames.length; i++) {
const exportName = exportNames[i];
const exportValue = exportValues[i];
objectProperties.push(_core.types.objectProperty(stringSpecifiers.has(exportName) ? _core.types.stringLiteral(exportName) : _core.types.identifier(exportName), exportValue));
for (let i = 0; i < exportNames.length; i++) {
const exportName = exportNames[i];
const exportValue = exportValues[i];
objectProperties.push(_core.types.objectProperty(stringSpecifiers.has(exportName) ? _core.types.stringLiteral(exportName) : _core.types.identifier(exportName), exportValue));
}
statements.push(_core.types.expressionStatement(_core.types.callExpression(exportIdent, [_core.types.objectExpression(objectProperties)])));
}
statements.push(_core.types.expressionStatement(_core.types.callExpression(exportIdent, [_core.types.objectExpression(objectProperties)])));
} else {

@@ -168,3 +175,5 @@ const exportObj = path.scope.generateUid("exportObj");

if (!this.file.has("@babel/plugin-proposal-dynamic-import")) {
console.warn(MISSING_PLUGIN_WARNING);
{
console.warn(MISSING_PLUGIN_WARNING);
}
}

@@ -171,0 +180,0 @@

{
"name": "@babel/plugin-transform-modules-systemjs",
"version": "7.12.1",
"version": "7.12.13",
"description": "This plugin transforms ES2015 modules to SystemJS",

@@ -16,6 +16,6 @@ "repository": {

"dependencies": {
"@babel/helper-hoist-variables": "^7.10.4",
"@babel/helper-module-transforms": "^7.12.1",
"@babel/helper-plugin-utils": "^7.10.4",
"@babel/helper-validator-identifier": "^7.10.4",
"@babel/helper-hoist-variables": "^7.12.13",
"@babel/helper-module-transforms": "^7.12.13",
"@babel/helper-plugin-utils": "^7.12.13",
"@babel/helper-validator-identifier": "^7.12.11",
"babel-plugin-dynamic-import-node": "^2.3.3"

@@ -30,6 +30,7 @@ },

"devDependencies": {
"@babel/core": "^7.12.1",
"@babel/helper-plugin-test-runner": "7.10.4",
"@babel/core": "7.12.13",
"@babel/helper-plugin-test-runner": "7.12.13",
"@babel/plugin-syntax-dynamic-import": "^7.8.0"
}
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-modules-systemjs"
}

@@ -5,3 +5,3 @@ # @babel/plugin-transform-modules-systemjs

See our website [@babel/plugin-transform-modules-systemjs](https://babeljs.io/docs/en/next/babel-plugin-transform-modules-systemjs.html) for more information.
See our website [@babel/plugin-transform-modules-systemjs](https://babeljs.io/docs/en/babel-plugin-transform-modules-systemjs) for more information.

@@ -8,0 +8,0 @@ ## Install

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