Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
babel-visit-cjs-deps
Advanced tools
const babylon = require('babylon');
const traverse = require('babel-traverse').default;
const extractCjsDeps = require('babel-visit-cjs-deps');
const resolves = [];
const deps = [];
const ast = babylon.parse(`
require('x');
require('x/' + 'b');
require.resolve('asdf/');
`, { allowReturnOutsideFunction: true });
traverse(ast, extractCjsDeps({ deps, resolves }));
deps; // ['x', 'x/']
resolves; // ['adsf/']
Currently no support for dynamic requires.
No actual transformations are performed at all.
MIT
FAQs
Babel plugin to extract CJS require dependencies
The npm package babel-visit-cjs-deps receives a total of 1 weekly downloads. As such, babel-visit-cjs-deps popularity was classified as not popular.
We found that babel-visit-cjs-deps 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.