Socket
Socket
Sign inDemoInstall

babel-plugin-transform-cjs-system-require

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-cjs-system-require - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

.editorconfig

10

lib/index.js

@@ -52,5 +52,2 @@ 'use strict';

// require(expr)';
else {
path.replaceWith(t.callExpression(t.identifier(mappedRequireName), args));
}
}

@@ -61,2 +58,7 @@ },

var opts = _ref3$opts === undefined ? {} : _ref3$opts;
if (t.isObjectProperty(path.parent) || t.isMemberExpression(path.parent)) {
return;
}
var _opts$requireName2 = opts.requireName;

@@ -69,3 +71,3 @@ var requireName = _opts$requireName2 === undefined ? 'require' : _opts$requireName2;

if (path.node.name === requireName) {
path.node.name = mappedRequireName;
path.replaceWith(t.identifier(mappedRequireName));
}

@@ -72,0 +74,0 @@ }

2

package.json
{
"name": "babel-plugin-transform-cjs-system-require",
"version": "0.0.2",
"version": "0.1.0",
"description": "Transforms all calls of `require` into calls of the SystemJS internal `$__require`.",

@@ -5,0 +5,0 @@ "repository": {

@@ -0,0 +0,0 @@ # babel-plugin-transform-cjs-system-require

@@ -0,0 +0,0 @@ module.exports = {

module.exports = {
mappedRequireName : '$__foo'
};
module.exports = {
requireName : 'foo'
};

@@ -0,0 +0,0 @@ import path from 'path';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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