New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-remove-imports

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-remove-imports - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

11

lib/index.js

@@ -20,11 +20,7 @@ "use strict";

if (node.arguments.length !== 1) {
return;
}
var argument = node.arguments[0];
var moduleId = argument.value;
var options = state.opts || {};
var options = state.opts;
if (!testMatches(moduleId, options.test)) {
if (options.test && !testMatches(moduleId, options.test)) {
return;

@@ -46,4 +42,3 @@ }

var source = node.source;
var _state$opts = state.opts,
opts = _state$opts === void 0 ? {} : _state$opts;
var opts = state.opts;

@@ -50,0 +45,0 @@ if (opts.removeAll) {

{
"name": "babel-plugin-transform-remove-imports",
"version": "1.5.4",
"version": "1.5.5",
"description": "Remove the specified import declaration when you use the babel transform to build the package.",

@@ -36,11 +36,11 @@ "repository": "https://github.com/uiwjs/babel-plugin-transform-remove-imports",

"devDependencies": {
"@babel/cli": "7.13.16",
"@babel/core": "7.14.2",
"@babel/cli": "7.14.3",
"@babel/core": "7.14.3",
"@babel/plugin-proposal-class-properties": "7.13.0",
"@babel/plugin-proposal-do-expressions": "7.14.0",
"@babel/plugin-proposal-export-default-from": "7.12.13",
"@babel/preset-env": "7.14.2",
"@babel/preset-env": "7.14.4",
"@babel/preset-react": "7.13.13",
"babel-core": "7.0.0-bridge.0",
"jest": "26.6.3"
"jest": "27.0.4"
},

@@ -47,0 +47,0 @@ "files": [

@@ -70,9 +70,7 @@ babel-plugin-transform-remove-imports

// Input Code
const core = require('@babel/core');
useCore(require('@babel/core'));
require('@babel/core');
require('jest');
const jest = require('jest');
// Output ↓ ↓ ↓ ↓ ↓ ↓
require('jest');
var jest = require('jest');
```

@@ -83,6 +81,5 @@

```diff
- const core = require('@babel/core');
- useCore(require('@babel/core'));
- require('@babel/core');
require('jest');
- const jest = require('jest');
+ var jest = require('jest');
```

@@ -89,0 +86,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc