@talend/babel-plugin-import-from-index
Advanced tools
Comparing version 1.4.0-alpha.5 to 1.4.0-alpha.6
{ | ||
"name": "@talend/babel-plugin-import-from-index", | ||
"version": "1.4.0-alpha.5", | ||
"version": "1.4.0-alpha.6", | ||
"description": "Transform default imports from specific path to named import from index", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -91,4 +91,4 @@ const PACKAGES = ['@talend/react-components', 'lodash', 'react-bootstrap', 'redux-saga']; | ||
return types.importSpecifier( | ||
types.identifier(`__${lastName}`), | ||
types.identifier(lastName), | ||
types.identifier(lastName), | ||
); | ||
@@ -130,3 +130,3 @@ } | ||
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]); | ||
@@ -133,0 +133,0 @@ realLastImport.insertAfter(c); |
@@ -13,5 +13,5 @@ import pluginTester from 'babel-plugin-tester'; | ||
output: ` | ||
import { effects, utils } from 'redux-saga'; | ||
const { createMockTask } = utils; | ||
const { take, put } = effects;`, | ||
import { effects as __effects, utils as __utils } from 'redux-saga'; | ||
const { createMockTask } = __utils; | ||
const { take, put } = __effects;`, | ||
}, | ||
@@ -24,4 +24,4 @@ { | ||
output: ` | ||
import createSagaMiddleware, { effects } from 'redux-saga'; | ||
const { spawn } = effects; | ||
import createSagaMiddleware, { effects as __effects } from 'redux-saga'; | ||
const { spawn } = __effects; | ||
`, | ||
@@ -28,0 +28,0 @@ }, |
8952