Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-06-17 19:27:26 +0300
committerGar <gar+gh@danger.computer>2021-06-17 19:27:26 +0300
commitc90612cf566d563199553749900d8b05367e2532 (patch)
treef09b22900d6cdecac8b70cd08e3d473547ae38bd
parentc99b8b53c3d7a9b0daa6d4416e9c40202ddd59a2 (diff)
libnpmexec@2.0.0
* use new npxCache option
-rw-r--r--node_modules/libnpmexec/lib/cache-install-dir.js8
-rw-r--r--node_modules/libnpmexec/lib/index.js4
-rw-r--r--node_modules/libnpmexec/package.json2
-rw-r--r--package-lock.json14
-rw-r--r--package.json2
-rw-r--r--test/lib/exec.js22
6 files changed, 26 insertions, 26 deletions
diff --git a/node_modules/libnpmexec/lib/cache-install-dir.js b/node_modules/libnpmexec/lib/cache-install-dir.js
index 9e30d62a1..4fb534f7d 100644
--- a/node_modules/libnpmexec/lib/cache-install-dir.js
+++ b/node_modules/libnpmexec/lib/cache-install-dir.js
@@ -2,12 +2,12 @@ const crypto = require('crypto')
const { resolve } = require('path')
-const cacheInstallDir = ({ cache, packages }) => {
- if (!cache)
- throw new Error('Must provide a valid cache path')
+const cacheInstallDir = ({ npxCache, packages }) => {
+ if (!npxCache)
+ throw new Error('Must provide a valid npxCache path')
// only packages not found in ${prefix}/node_modules
- return resolve(cache, '_npx', getHash(packages))
+ return resolve(npxCache, getHash(packages))
}
const getHash = (packages) =>
diff --git a/node_modules/libnpmexec/lib/index.js b/node_modules/libnpmexec/lib/index.js
index 8c5181f39..57c2a148d 100644
--- a/node_modules/libnpmexec/lib/index.js
+++ b/node_modules/libnpmexec/lib/index.js
@@ -124,8 +124,8 @@ const exec = async (opts) => {
manis.some(manifest => manifestMissing({ tree, manifest }))
if (needInstall) {
- const { cache } = flatOptions
- const installDir = cacheInstallDir({ cache, packages })
+ const { npxCache } = flatOptions
+ const installDir = cacheInstallDir({ npxCache, packages })
await mkdirp(installDir)
const arb = new Arborist({
...flatOptions,
diff --git a/node_modules/libnpmexec/package.json b/node_modules/libnpmexec/package.json
index 2b3b488cf..dff91077d 100644
--- a/node_modules/libnpmexec/package.json
+++ b/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "1.2.0",
+ "version": "2.0.0",
"files": [
"lib"
],
diff --git a/package-lock.json b/package-lock.json
index 88b1797e9..5ef82e0fd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -107,7 +107,7 @@
"leven": "^3.1.0",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
- "libnpmexec": "^1.2.0",
+ "libnpmexec": "^2.0.0",
"libnpmfund": "^1.1.0",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
@@ -4635,9 +4635,9 @@
"link": true
},
"node_modules/libnpmexec": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/libnpmexec/-/libnpmexec-1.2.0.tgz",
- "integrity": "sha512-LkxnH2wsMUI4thsgUK0r+EFZ5iCjKlp21J68dFY7AzD5uaaIPqO3lqVvYbyl1Umz1R4rY9t3vFa1fF3hzo6Y2Q==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/libnpmexec/-/libnpmexec-2.0.0.tgz",
+ "integrity": "sha512-9zHswx//Lp2ao+huWF2aL+6v4haMncyxNusk6Us2fbLNnPh3+rgSkv38LJ2v8gmKS2kAnkUmQf8pHjcZ+7Z3NA==",
"inBundle": true,
"dependencies": {
"@npmcli/arborist": "^2.3.0",
@@ -13735,9 +13735,9 @@
}
},
"libnpmexec": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/libnpmexec/-/libnpmexec-1.2.0.tgz",
- "integrity": "sha512-LkxnH2wsMUI4thsgUK0r+EFZ5iCjKlp21J68dFY7AzD5uaaIPqO3lqVvYbyl1Umz1R4rY9t3vFa1fF3hzo6Y2Q==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/libnpmexec/-/libnpmexec-2.0.0.tgz",
+ "integrity": "sha512-9zHswx//Lp2ao+huWF2aL+6v4haMncyxNusk6Us2fbLNnPh3+rgSkv38LJ2v8gmKS2kAnkUmQf8pHjcZ+7Z3NA==",
"requires": {
"@npmcli/arborist": "^2.3.0",
"@npmcli/ci-detect": "^1.3.0",
diff --git a/package.json b/package.json
index a8f704792..628c44a3f 100644
--- a/package.json
+++ b/package.json
@@ -78,7 +78,7 @@
"leven": "^3.1.0",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
- "libnpmexec": "^1.2.0",
+ "libnpmexec": "^2.0.0",
"libnpmfund": "^1.1.0",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
diff --git a/test/lib/exec.js b/test/lib/exec.js
index 857a6f863..dff067619 100644
--- a/test/lib/exec.js
+++ b/test/lib/exec.js
@@ -329,7 +329,7 @@ t.test('npm exec <noargs>, run interactive shell', t => {
t.test('npm exec foo, not present locally or in central loc', t => {
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890')
+ const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -369,7 +369,7 @@ t.test('npm exec foo, not present locally or in central loc', t => {
t.test('npm exec foo, not present locally but in central loc', t => {
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890')
+ const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -409,7 +409,7 @@ t.test('npm exec foo, not present locally but in central loc', t => {
t.test('npm exec foo, present locally but wrong version', t => {
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/2badf4630f1cfaad')
+ const installDir = resolve('npx-cache-dir/2badf4630f1cfaad')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -605,7 +605,7 @@ t.test('run command with 2 packages, need install, verify sort', t => {
config.package = packages
const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -760,7 +760,7 @@ t.test('prompt when installs are needed if not already present and shell is a TT
const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -829,7 +829,7 @@ t.test('skip prompt when installs are needed if not already present and shell is
const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -896,7 +896,7 @@ t.test('skip prompt when installs are needed if not already present and shell is
const add = packages.map(p => `${p}@`).sort((a, b) => a.localeCompare(b, 'en'))
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890')
+ const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -954,7 +954,7 @@ t.test('abort if prompt rejected', t => {
config.yes = undefined
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -1012,7 +1012,7 @@ t.test('abort if prompt false', t => {
config.yes = undefined
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -1069,7 +1069,7 @@ t.test('abort if -n provided', t => {
config.yes = false
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/07de77790e5f40f2')
+ const installDir = resolve('npx-cache-dir/07de77790e5f40f2')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),
@@ -1107,7 +1107,7 @@ t.test('abort if -n provided', t => {
t.test('forward legacyPeerDeps opt', t => {
const path = t.testdir()
- const installDir = resolve('cache-dir/_npx/f7fbba6e0636f890')
+ const installDir = resolve('npx-cache-dir/f7fbba6e0636f890')
npm.localPrefix = path
ARB_ACTUAL_TREE[path] = {
children: new Map(),