
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Simple module to detect unused dependencies and missing dependencies and functions to automatically install/remove those.
Simple module to detect unused dependencies and missing dependencies and functions to automatically install/remove those.
Uses yarn if you have yarn. (Detected by project's yarn.lock
)
AutoPM is run by default in DevScript.
# global
npm i -g autopm
# npm
npm i autopm
# yarn
yarn add autopm
import AutoPM from "autopm";
//* Automatically checks the process.cwd() if not specified
const aPM = new AutoPM();
//* Console log all used dependencies.
console.log(aPM.usedModules);
//* Console log all unused dependencies.
//* (Installed but never imported / required.)
console.log(aPM.unusedModules);
//* Console log all imported dependencies that dont exist at all.
//* (Imported / required but they don't exist on NPM.)
console.log(aPM.unknownModules);
//* Console log all missing dependencies.
//* (Imported / required but they aren't installed.)
console.log(aPM.missingModules);
//* Console log all outdated dependencies.
console.log(aPM.outdatedModules);
//* Console log all deprecated dependencies.
console.log(aPM.deprecatedModules);
//* Promise<void> Re-check the folder
aPM.recheck();
//* Promise<void> Installs missing dependencies.
aPM.installMissing();
//* Promise<void> Uninstalls unused dependencies.
aPM.uninstallUnused();
//* Promise<void> Upgrades given dependencies to given versions.
//* (First array is normal dependencies, second array is devDependencies.)
aPM.upgradeModulesToVersions([
{
module: "axios",
version: "0.21.0"
}
], [
{
module: "@types/chrome",
version: "0.0.100"
}
]);
//* Promise<void> Upgrades all outdated dependencies to the latest version.
aPM.upgradeAllOutdatedToLatest();
//* Promise<void> Upgrades all deprecated dependencies to the latest version.
aPM.upgradeAllDeprecatedToLatest();
//* Console logs all changed dependencies between now and the last recheck.
console.log(aPM.changedModules);
Simply include the setting while creating the AutoPM instance.
const aPM = new AutoPM({ path: "D:\Coding\AutoPM", exclude: ["@types/chrome"] });
Settings | Type | Description | Default |
---|---|---|---|
path | string | Path to the directory. | process.cwd() |
exclude | Array | Modules to exlcude from unusedModules. |
FAQs
Simple module to detect unused dependencies and missing dependencies and functions to automatically install/remove those.
The npm package autopm receives a total of 119 weekly downloads. As such, autopm popularity was classified as not popular.
We found that autopm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.