libnpmexec
Advanced tools
Comparing version 4.0.10 to 4.0.11
@@ -66,2 +66,5 @@ 'use strict' | ||
const manifest = await getManifest(spec, flatOptions) | ||
if (spec.type === 'directory') { | ||
return { manifest } | ||
} | ||
const nodesByManifest = tree.inventory.query('packageName', manifest.name) | ||
@@ -93,6 +96,6 @@ for (const node of nodesByManifest) { | ||
scriptShell = isWindows ? process.env.ComSpec || 'cmd' : 'sh', | ||
yes = undefined, | ||
...flatOptions | ||
} = opts | ||
let yes = opts.yes | ||
const run = () => runScript({ | ||
@@ -134,2 +137,12 @@ args, | ||
// Resolve any directory specs so that the npx directory is unique to the | ||
// resolved directory, not the potentially relative one (i.e. "npx .") | ||
for (const i in packages) { | ||
const pkg = packages[i] | ||
const spec = npa(pkg) | ||
if (spec.type === 'directory') { | ||
packages[i] = spec.fetchSpec | ||
} | ||
} | ||
const localArb = new Arborist({ ...flatOptions, path }) | ||
@@ -159,2 +172,6 @@ const localTree = await localArb.loadActual() | ||
if (spec.type === 'directory') { | ||
yes = true | ||
} | ||
args[0] = getBinFromManifest(commandManifest) | ||
@@ -183,3 +200,11 @@ | ||
const hash = crypto.createHash('sha512') | ||
.update(packages.sort((a, b) => a.localeCompare(b, 'en')).join('\n')) | ||
.update(packages.map(p => { | ||
// Keeps the npx directory unique to the resolved directory, not the | ||
// potentially relative one (i.e. "npx .") | ||
const spec = npa(p) | ||
if (spec.type === 'directory') { | ||
return spec.fetchSpec | ||
} | ||
return p | ||
}).sort((a, b) => a.localeCompare(b, 'en')).join('\n')) | ||
.digest('hex') | ||
@@ -186,0 +211,0 @@ .slice(0, 16) |
@@ -76,2 +76,3 @@ const chalk = require('chalk') | ||
stdio: 'inherit', | ||
scriptShell, | ||
}) | ||
@@ -78,0 +79,0 @@ } finally { |
{ | ||
"name": "libnpmexec", | ||
"version": "4.0.10", | ||
"version": "4.0.11", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "bin/", |
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
16408
360