Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-modules-commonjs

Package Overview
Dependencies
54
Maintainers
4
Versions
98
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.20.7 to 7.20.11

10

lib/dynamic-import.js

@@ -14,13 +14,5 @@ "use strict";

const buildRequire = noInterop ? requireNoInterop : requireInterop;
const source = (0, _helperModuleTransforms.getDynamicImportSource)(path.node);
const replacement = _core.types.isStringLiteral(source) || _core.types.isTemplateLiteral(source) && source.quasis.length === 0 ? _core.template.expression.ast`
Promise.resolve().then(() => ${buildRequire(source, file)})
` : _core.template.expression.ast`
Promise.resolve(${source}).then(
s => ${buildRequire(_core.types.identifier("s"), file)}
)
`;
path.replaceWith(replacement);
path.replaceWith((0, _helperModuleTransforms.buildDynamicImport)(path.node, true, false, specifier => buildRequire(specifier, file)));
}
//# sourceMappingURL=dynamic-import.js.map

4

package.json
{
"name": "@babel/plugin-transform-modules-commonjs",
"version": "7.20.7",
"version": "7.20.11",
"description": "This plugin transforms ES2015 modules to CommonJS",

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

"dependencies": {
"@babel/helper-module-transforms": "^7.20.7",
"@babel/helper-module-transforms": "^7.20.11",
"@babel/helper-plugin-utils": "^7.20.2",

@@ -19,0 +19,0 @@ "@babel/helper-simple-access": "^7.20.2"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc