@talend/babel-plugin-import-from-index
Advanced tools
Comparing version 1.4.7 to 2.0.0-alpha.1
{ | ||
"name": "@talend/babel-plugin-import-from-index", | ||
"version": "1.4.7", | ||
"version": "2.0.0-alpha.1", | ||
"description": "Transform default imports from specific path to named import from index", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -6,3 +6,2 @@ const PACKAGES = [ | ||
'react-bootstrap', | ||
'redux-saga', | ||
]; | ||
@@ -23,3 +22,2 @@ | ||
'@talend/react-containers': false, | ||
'redux-saga': true, | ||
}; | ||
@@ -74,4 +72,3 @@ | ||
const packageName = find(importDeclarationPath); | ||
const isPackageFrom = | ||
PACKAGES.includes(importDeclarationPath.node.source.value); | ||
const isPackageFrom = PACKAGES.includes(importDeclarationPath.node.source.value); | ||
if (packageName && !importSpecifiers[packageName]) { | ||
@@ -78,0 +75,0 @@ importSpecifiers[packageName] = []; |
@@ -10,31 +10,2 @@ import pluginTester from 'babel-plugin-tester'; | ||
code: ` | ||
import { take, put } from 'redux-saga/effects'; | ||
import { createMockTask } from 'redux-saga/utils';`, | ||
output: ` | ||
import { effects as __effects, utils as __utils } from 'redux-saga'; | ||
const { createMockTask } = __utils; | ||
const { take, put } = __effects;`, | ||
}, | ||
{ | ||
code: ` | ||
import createSagaMiddleware from 'redux-saga'; | ||
import { spawn } from 'redux-saga/effects'; | ||
`, | ||
output: ` | ||
import createSagaMiddleware, { effects as __effects } from 'redux-saga'; | ||
const { spawn } = __effects; | ||
`, | ||
}, | ||
{ | ||
code: ` | ||
import { spawn } from 'redux-saga/effects'; | ||
import createSagaMiddleware from 'redux-saga'; | ||
`, | ||
output: ` | ||
import createSagaMiddleware, { effects as __effects } from 'redux-saga'; | ||
const { spawn } = __effects; | ||
`, | ||
}, | ||
{ | ||
code: ` | ||
import get from 'lodash/get';`, | ||
@@ -41,0 +12,0 @@ output: ` |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9581
239
2