npm-run-path
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -23,3 +23,3 @@ export interface RunPathOptions { | ||
*/ | ||
readonly execPath?: string; | ||
readonly execPath?: string | URL; | ||
} | ||
@@ -49,3 +49,3 @@ | ||
*/ | ||
readonly execPath?: string; | ||
readonly execPath?: string | URL; | ||
} | ||
@@ -52,0 +52,0 @@ |
@@ -14,2 +14,3 @@ import process from 'node:process'; | ||
let previous; | ||
const execPathString = execPath instanceof URL ? url.fileURLToPath(execPath) : execPath; | ||
const cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd; | ||
@@ -26,3 +27,3 @@ let cwdPath = path.resolve(cwdString); | ||
// Ensure the running `node` binary is used. | ||
result.push(path.resolve(cwdString, execPath, '..')); | ||
result.push(path.resolve(cwdString, execPathString, '..')); | ||
@@ -29,0 +30,0 @@ return [...result, path_].join(path.delimiter); |
{ | ||
"name": "npm-run-path", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "Get your PATH prepended with locally installed binaries", | ||
@@ -15,2 +15,4 @@ "license": "MIT", | ||
"exports": "./index.js", | ||
"types": "./index.d.ts", | ||
"sideEffects": false, | ||
"engines": { | ||
@@ -17,0 +19,0 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" |
@@ -59,3 +59,3 @@ # npm-run-path | ||
Type: `string`\ | ||
Type: `string | URL`\ | ||
Default: `process.execPath` | ||
@@ -101,13 +101,1 @@ | ||
- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary | ||
--- | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-npm-run-path?utm_source=npm-npm-run-path&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94
7739
100