Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
0
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.7 to 2.0.0-alpha.1

2

package.json
{
"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: `

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