Gathering detailed insights and metrics for npm-run-path-compat
Gathering detailed insights and metrics for npm-run-path-compat
Gathering detailed insights and metrics for npm-run-path-compat
Gathering detailed insights and metrics for npm-run-path-compat
Get your PATH prepended with locally installed binaries
npm install npm-run-path-compat
Typescript
Module System
Node Version
NPM Version
65
Supply Chain
89.9
Quality
74.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
164,121
Last Day
20
Last Week
332
Last Month
980
Last Year
7,290
MIT License
13 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Sep 08, 2023
Minified
Minified + Gzipped
Latest Version
2.0.3
Package Id
npm-run-path-compat@2.0.3
Size
2.19 kB
NPM Version
2.15.1
Node Version
0.12.17
Cumulative downloads
Total Downloads
Last Day
-60%
20
Compared to previous day
Last Week
86.5%
332
Compared to previous week
Last Month
71.6%
980
Compared to previous month
Last Year
-45.3%
7,290
Compared to previous year
2
Get your PATH prepended with locally installed binaries
In npm run scripts you can execute locally installed binaries by name. This enables the same outside npm.
This is a fork with support for older node versions.
$ npm install --save npm-run-path-compat
1const childProcess = require('child_process'); 2const npmRunPath = require('npm-run-path-compat'); 3 4console.log(process.env.PATH); 5//=> '/usr/local/bin' 6 7console.log(npmRunPath()); 8//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' 9 10// `foo` is a locally installed binary 11childProcess.execFileSync('foo', { 12 env: npmRunPath.env() 13});
Type: string
Default: process.cwd()
Working directory.
Type: string
Default: PATH
PATH to be appended.
Set it to an empty string to exclude the default PATH.
Type: string
Default: process.cwd()
Working directory.
Type: Object
Accepts an object of environment variables, like process.env
, and modifies the PATH using the correct PATH key. Use this if you're modifying the PATH for use in the child_process
options.
MIT © Sindre Sorhus MIT © Julian Gruber
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More