Socket
Socket
Sign inDemoInstall

@talend/babel-plugin-import-from-index

Package Overview
Dependencies
0
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.5 to 1.4.6

2

package.json
{
"name": "@talend/babel-plugin-import-from-index",
"version": "1.4.5",
"version": "1.4.6",
"description": "Transform default imports from specific path to named import from index",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -112,2 +112,9 @@ const PACKAGES = [

}
if (
PACKAGES.indexOf(importDeclarationPath.node.source.value) !== -1 &&
type === 'ImportDefaultSpecifier'
) {
return types.importDefaultSpecifier(types.identifier(localName));
}
return types.importSpecifier(

@@ -114,0 +121,0 @@ types.identifier(localName),

@@ -41,2 +41,12 @@ import pluginTester from 'babel-plugin-tester';

code: `
import _ from 'lodash';
_.toUpper('foo');`,
output: `
import _ from 'lodash';
_.toUpper('foo');`,
},
{
code: `
import React from 'react';

@@ -95,6 +105,6 @@ import { SidePanel } from '@talend/react-components';

{
code: "import SagaTester from 'redux-saga-tester';",
output: "import SagaTester from 'redux-saga-tester';",
},
code: "import SagaTester from 'redux-saga-tester';",
output: "import SagaTester from 'redux-saga-tester';",
},
],
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc