@talend/babel-plugin-import-from-index
Advanced tools
Comparing version 1.4.0-alpha.6 to 1.4.0
{ | ||
"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); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9054
226
1