
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
babel-plugin-onex-utils
Advanced tools
onex-utils工具库的babel插件,挑选出你使用onex-utils的模块,剔除未使用的模块,减小项目引用
$ npm i --save onex-utils
$ npm i --save-dev babel-plugin-onex-utils @babel/cli @babel/preset-env
Transforms
import { capitalize, map } from 'onex-utils';
map([], capitalize);
roughly to
"use strict";
var _map2 = _interopRequireDefault(require("onex-utils/build/utils/map"));
var _capitalize2 = _interopRequireDefault(require("onex-utils/build/utils/capitalize"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
(0, _map2["default"])([], _capitalize2["default"]);
.babelrc
{
"plugins": ["onex-utils"],
"presets": [["@babel/env", { "targets": { "node": 6 } }]]
}
Babel API
require('babel-core').transform('code', {
'plugins': ['onex-utils'],
'presets': [['@babel/env', { 'targets': { 'node': 6 } }]]
})
webpack.config.js
'module': {
'loaders': [{
'loader': 'babel-loader',
'test': /\.js$/,
'exclude': /node_modules/,
'query': {
'plugins': ['onex-utils'],
'presets': [['@babel/env', { 'targets': { 'node': 6 } }]]
}
}]
}
ast语法树中Program节点分析整个import语句中引用import中每个local节点的,获取到对应的节点和引用,然后遍历这些引用,通过@babel/helper-module-imports创建新形式的import,并替换原有的语法ImportDeclaration过程删除对应的默认引用export形式的导出,首先将其转化成单个依赖的import语句,然后在进行变量导出FAQs
> TODO: description
The npm package babel-plugin-onex-utils receives a total of 2 weekly downloads. As such, babel-plugin-onex-utils popularity was classified as not popular.
We found that babel-plugin-onex-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.