
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
Require all modules from the node_modules directory, using Node module resolution algorithm to discover it
Using Node module resolution algorithm, discover node_modules directory and require or require.resolve all modules in it.
acquire([opts])Require all modules in node_modules, starting from opts.basedir.
Returns object of all the modules required:
{
foo: require(path_to_foo),
bar: require(path_to_bar)
}
| Option | Type | Required? | Default |
|---|---|---|---|
| basedir | string | No | __dirname |
| depth | number | No | 1 |
| ignore | string/[string] | No | [] |
| skipFailures | boolean/function | No | false |
If opts.depth is finite, it specifies the number of node_modules directories up the directory tree to traverse into. If opts.depth is Infinity, traversal ends at the file system root.
opts.ignore specifies module names to ignore.
If opts.skipFailures is true, modules that fail to require() (e.g. plugins for Grunt) are skipped. If opts.skipFailures is a function, it is called as opts.skipFailures(moduleName, modulePath) for each failure.
acquire.resolve([opts])Require.resolve all modules in node_modules, starting from opts.basedir.
Returns object of all the modules and corresponding paths:
{
foo: path_to_foo,
bar: path_to_bar
}
npm install acquire
MIT
FAQs
Require all modules from the node_modules directory, using Node module resolution algorithm to discover it
The npm package acquire receives a total of 5 weekly downloads. As such, acquire popularity was classified as not popular.
We found that acquire 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.