babel-plugin-filter-imports
Advanced tools
Comparing version 0.3.1 to 1.0.0
{ | ||
"name": "babel-plugin-filter-imports", | ||
"version": "0.3.1", | ||
"version": "1.0.0", | ||
"description": "A babel transform for filtering out imports", | ||
"main": "index.js", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"index.js" | ||
"lib", | ||
"src" | ||
], | ||
"scripts": { | ||
"test": "mocha" | ||
"clean": "rimraf lib", | ||
"build": "babel src -d lib", | ||
"lint": "prettier --list-different \"src/**/*.js\" \"test/test.js\" && eslint \"src/**/*.js\" \"test/test.js\"", | ||
"lint:fix": "prettier --write \"src/**/*.js\" \"test/test.js\" && eslint --fix \"src/**/*.js\" \"test/test.js\"", | ||
"test": "mocha --compilers js:babel-register", | ||
"test:watch": "npm run test -- --watch" | ||
}, | ||
@@ -26,6 +32,18 @@ "repository": { | ||
"homepage": "https://github.com/ember-cli/babel-plugin-filter-imports", | ||
"dependencies": { | ||
"babel-types": "^6.26.0", | ||
"lodash": "^4.17.4" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.9.1", | ||
"mocha": "^3.0.0" | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^7.2.3", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-register": "^6.26.0", | ||
"eslint": "^4.6.1", | ||
"eslint-config-prettier": "^2.4.0", | ||
"eslint-plugin-prettier": "^2.2.0", | ||
"mocha": "^3.5.0", | ||
"prettier": "^1.6.1", | ||
"rimraf": "^2.6.1" | ||
} | ||
} |
# babel-plugin-filter-imports | ||
[![Build Status](https://travis-ci.org/ember-cli/babel-plugin-filter-imports.svg?branch=master)](https://travis-ci.org/ember-cli/babel-plugin-filter-imports) | ||
[![npm](https://img.shields.io/npm/v/babel-plugin-filter-imports.svg?style=flat)](https://www.npmjs.com/package/babel-plugin-filter-imports) | ||
@@ -16,3 +17,5 @@ *This plugin is for Babel 6. If you need to support Babel 5 use the [v0.2.x](https://github.com/ember-cli/babel-plugin-filter-imports/tree/v0.2.x) branch.* | ||
"plugins": [["filter-imports", { | ||
"debugging-tools": [ "warn" ] | ||
"imports": { | ||
"debugging-tools": [ "warn" ] | ||
} | ||
}]] | ||
@@ -38,4 +41,2 @@ } | ||
```js | ||
import { warn } from 'debugging-tools'; | ||
function join(args, sep) { | ||
@@ -50,3 +51,30 @@ if (arguments.length > 2) { | ||
- `options` `[Object]`: An object whose keys are names of modules. | ||
- `options[moduleName]` `[String]`: An array of names of imports from `moduleName` to be removed. You can include `'default'` for default export and `'*'` for a namespace export. | ||
- `options[keepImports]` `[Boolean]`: An flag that indicates imports removal from header. | ||
- `options[imports]` `[Object]`: An object whose keys are names of modules. | ||
- `options[imports][moduleName]` `[String]`: An array of names of imports from `moduleName` to be removed. You can include `'default'` for default export and `'*'` for a namespace export. | ||
## Upgrade to `1.x` | ||
There were breaking changes in the plugin configuration, you must update it to work correctly. | ||
##### Before `1.x` | ||
```json | ||
{ | ||
"plugins": [["filter-imports", { | ||
"debugging-tools": [ "warn" ] | ||
}]] | ||
} | ||
``` | ||
##### After | ||
```json | ||
{ | ||
"plugins": [["filter-imports", { | ||
"imports": { | ||
"debugging-tools": [ "warn" ] | ||
} | ||
}]] | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8636
7
59
0
77
2
10
1
+ Addedbabel-types@^6.26.0
+ Addedlodash@^4.17.4
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedto-fast-properties@1.0.3(transitive)