
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
babel-collect-imports
Advanced tools
Recursively collect all the internal and external dependencies from an entry point
Recursively collect all the internal and external dependencies from an entry point
yarn add babel-collect-imports
const { collectImportsSync } = require('babel-collect-imports');
let { internal, external } = collectImportsSync('path/to/entry.js');
// { internal: ['path/to/entry.js', 'path/to/import.js', 'path/to/other/import.js'],
// external: ['lodash', 'react'] }
When it discovers an "internal" dependency (one that is not a node package), it will follow the import and continue collecting dependencies.
collectImportsSync(entry, parserOpts?, resolveOpts?)It's all about the starting dot:
import internal from './internal-because-it-starts-with-a-dot';
import external from 'external-because-it-does-not-start-with-a-dot';
Your custom aliasing is bad and you should feel bad. Try playing with
resolveOpts.
FAQs
Recursively collect all the internal and external dependencies from an entry point
The npm package babel-collect-imports receives a total of 6 weekly downloads. As such, babel-collect-imports popularity was classified as not popular.
We found that babel-collect-imports 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.