@talend/babel-plugin-import-from-index
Advanced tools
Comparing version 1.5.1 to 1.6.0
# @talend/babel-plugin-import-from-index | ||
## 1.6.0 | ||
### Minor Changes | ||
- 673984929: add missing deps, fix eslint config (circular dependency) and fix lint issues | ||
## 1.5.1 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@talend/babel-plugin-import-from-index", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "Transform default imports from specific path to named import from index", | ||
@@ -17,13 +17,16 @@ "main": "src/index.js", | ||
"scripts": { | ||
"lint": "eslint ./src", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"semver": "^7.3.7" | ||
"semver": "^7.5.4" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.2", | ||
"@babel/preset-env": "^7.18.2", | ||
"babel-jest": "^26.6.3", | ||
"@babel/core": "^7.23.3", | ||
"@babel/eslint-parser": "^7.23.3", | ||
"@babel/preset-env": "^7.23.3", | ||
"babel-jest": "^29.7.0", | ||
"babel-plugin-tester": "^10.1.0", | ||
"jest": "^26.6.3" | ||
"eslint": "^8.53.0", | ||
"jest": "^29.7.0" | ||
}, | ||
@@ -30,0 +33,0 @@ "jest": { |
@@ -11,3 +11,3 @@ const dirname = require('path').dirname; | ||
let pjson; | ||
while(!pjson) { | ||
while (!pjson) { | ||
const pjsonPath = `${currentPath}/package.json`; | ||
@@ -22,3 +22,3 @@ if (fs.existsSync(pjsonPath)) { | ||
return require(pjson).version; | ||
} catch(error) { | ||
} catch (error) { | ||
console.error(`${packageName} NOT FOUND`, error); | ||
@@ -85,4 +85,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]) { | ||
@@ -89,0 +88,0 @@ importSpecifiers[packageName] = []; |
import pluginTester from 'babel-plugin-tester'; | ||
import babelPlugin from '.'; | ||
@@ -32,9 +33,8 @@ | ||
code: ` | ||
import _ from 'lodash'; | ||
_.toUpper('foo');`, | ||
import _ from 'lodash'; | ||
_.toUpper('foo');`, | ||
output: ` | ||
import _ from 'lodash'; | ||
import _ from 'lodash'; | ||
_.toUpper('foo');`, | ||
_.toUpper('foo');`, | ||
}, | ||
@@ -49,2 +49,3 @@ { | ||
import React from 'react'; | ||
import { SidePanel, Actions, ActionButton, ActionDropdown, List } from '@talend/react-components';`, | ||
@@ -63,2 +64,3 @@ }, | ||
import React from 'react'; | ||
import { SidePanel, ModelViewer as ModelViewerComponent } from '@talend/react-components';`, | ||
@@ -65,0 +67,0 @@ }, |
11409
7
299
7
Updatedsemver@^7.5.4