Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
babel-plugin-filter-imports
Advanced tools
This plugin is for Babel 6. If you need to support Babel 5 use the v0.2.x branch.
This babel plugin is used to removed references to imports within a module. This can be useful for removing debugging statements when doing a production build of your code. It is often used in conjunction with other tools like Uglify that perform dead code elimination.
Given the .babelrc
{
"plugins": [["filter-imports", {
"imports": {
"debugging-tools": [ "warn" ]
}
}]]
}
the module
import { warn } from 'debugging-tools';
function join(args, sep) {
if (arguments.length > 2) {
warn("join expects at most 2 arguments");
}
return args.join(sep);
}
will be transformed to
function join(args, sep) {
if (arguments.length > 2) {
}
return args.join(sep);
}
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.1.x
There were breaking changes in the plugin configuration, you must update it to work correctly.
1.x
{
"plugins": [["filter-imports", {
"debugging-tools": [ "warn" ]
}]]
}
{
"plugins": [["filter-imports", {
"imports": {
"debugging-tools": [ "warn" ]
}
}]]
}
v1.0.0 (2017-09-08)
Merged pull requests:
FAQs
A babel transform for filtering out imports
The npm package babel-plugin-filter-imports receives a total of 45,602 weekly downloads. As such, babel-plugin-filter-imports popularity was classified as popular.
We found that babel-plugin-filter-imports demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.