Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0-alpha.6 to 1.4.0

2

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

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

@@ -1,2 +0,8 @@

const PACKAGES = ['@talend/react-components', 'lodash', 'react-bootstrap', 'redux-saga'];
const PACKAGES = [
'@talend/react-components',
'@talend/react-containers',
'lodash',
'react-bootstrap',
'redux-saga',
];

@@ -7,2 +13,3 @@ const hasLib = {

'@talend/react-components': true,
'@talend/react-containers': true,
'redux-saga': false,

@@ -15,2 +22,3 @@ };

'@talend/react-components': false,
'@talend/react-containers': false,
'redux-saga': true,

@@ -66,5 +74,3 @@ };

if (type === 'ImportDefaultSpecifier' && hasNamedSubSupport[packageName]) {
return types.importDefaultSpecifier(
types.identifier(localName),
);
return types.importDefaultSpecifier(types.identifier(localName));
}

@@ -132,3 +138,6 @@ if (type === 'ImportNamespaceSpecifier') {

const pattern = types.objectPattern(properties);
const declarator = types.variableDeclarator(pattern, types.identifier(`__${extraKey}`));
const declarator = types.variableDeclarator(
pattern,
types.identifier(`__${extraKey}`),
);
const c = types.variableDeclaration('const', [declarator]);

@@ -135,0 +144,0 @@ realLastImport.insertAfter(c);

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