Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
is-install-needed
Advanced tools
A simple devtool that tells you if you need to run install or not. It does so by checking if the lock file of your preferred package manager has changed. Supports the most popular package managers out there: npm, yarn and pnpm.
Install the is-install-needed
package with your preferred package manager.
Add is-install-needed --postinstall
to your postscript to automatically write a check file after install.
$ is-install-needed
It will automatically look for yarn.lock, package-lock.json and shrinkwrap.yaml when no preferred package manager is provided.
Flag | Available options | Description |
---|---|---|
--prefer | npm, yarn or pnpm | Preferred package manager |
--cwd | <path> | Current working directory |
--postinstall | Postinstall script |
import { isInstallNeeded } from 'is-install-needed';
async () => {
const isNeeded = await isInstallNeeded();
if (result) {
console.error('You need to run install');
process.exit(1);
}
};
import { findClosestLockfile } from 'is-install-needed';
async () => {
const lockfile = await findClosestLockfile();
console.log(lockfile); // > /path/to/package/.yarn.lock
};
FAQs
Tool to check if runnning npm/yarn install is necessary
The npm package is-install-needed receives a total of 1 weekly downloads. As such, is-install-needed popularity was classified as not popular.
We found that is-install-needed 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.