New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-rename-import

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-rename-import - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

14

lib/index.js

@@ -47,3 +47,3 @@ "use strict";

},
CallExpression: function CallExpression(path, state) {
ExportDeclaration: function ExportDeclaration(path, state) {
var replacements = getReplacements(state);

@@ -55,2 +55,14 @@ replacements.forEach(function (_ref3) {

if (node.source && isModule(node.source.value, original)) {
path.node.source = source(node.source.value, original, replacement);
}
});
},
CallExpression: function CallExpression(path, state) {
var replacements = getReplacements(state);
replacements.forEach(function (_ref4) {
var original = _ref4.original,
replacement = _ref4.replacement;
var node = path.node;
if (node.callee.name === "require" && node.arguments && node.arguments.length === 1 && t.isStringLiteral(node.arguments[0]) && isModule(node.arguments[0].value, original)) {

@@ -57,0 +69,0 @@ path.node.arguments = [source(node.arguments[0].value, original, replacement)];

2

package.json
{
"name": "babel-plugin-transform-rename-import",
"version": "2.2.0",
"version": "2.3.0",
"description": "Replace import sources",

@@ -5,0 +5,0 @@ "main": "lib/index",

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