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:
authornlf <quitlahok@gmail.com>2022-10-17 23:47:28 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-10-18 00:11:31 +0300
commit58065bc679e6968742b5b15fa2fb82dd9e8ae988 (patch)
treed39567dbbc0d8ff4d354917359e0c7cca3ca7921
parent475e9b6c0c978a104dd2ee47bde22b0a031a95f9 (diff)
feat: do not alter file ownership
BREAKING CHANGE: this package no longer attempts to change file ownership automatically
-rw-r--r--DEPENDENCIES.md1
-rw-r--r--package-lock.json1
-rw-r--r--workspaces/libnpmexec/lib/file-exists.js4
-rw-r--r--workspaces/libnpmexec/lib/index.js4
-rw-r--r--workspaces/libnpmexec/package.json1
5 files changed, 4 insertions, 7 deletions
diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md
index aa54179c1..acb886718 100644
--- a/DEPENDENCIES.md
+++ b/DEPENDENCIES.md
@@ -544,7 +544,6 @@ graph LR;
libnpmexec-->bin-links;
libnpmexec-->chalk;
libnpmexec-->minify-registry-metadata;
- libnpmexec-->mkdirp-infer-owner;
libnpmexec-->mkdirp;
libnpmexec-->npm-package-arg;
libnpmexec-->npmcli-arborist["@npmcli/arborist"];
diff --git a/package-lock.json b/package-lock.json
index f4c108fcd..6ead07e40 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13862,7 +13862,6 @@
"@npmcli/fs": "^2.1.1",
"@npmcli/run-script": "^4.2.0",
"chalk": "^4.1.0",
- "mkdirp-infer-owner": "^2.0.0",
"npm-package-arg": "^9.0.1",
"npmlog": "^6.0.2",
"pacote": "^14.0.0",
diff --git a/workspaces/libnpmexec/lib/file-exists.js b/workspaces/libnpmexec/lib/file-exists.js
index e5cd474da..0a8d79e83 100644
--- a/workspaces/libnpmexec/lib/file-exists.js
+++ b/workspaces/libnpmexec/lib/file-exists.js
@@ -1,10 +1,10 @@
const { resolve } = require('path')
-const fs = require('@npmcli/fs')
+const { stat } = require('fs/promises')
const walkUp = require('walk-up-path')
const fileExists = async (file) => {
try {
- const res = await fs.stat(file)
+ const res = await stat(file)
return res.isFile()
} catch {
return false
diff --git a/workspaces/libnpmexec/lib/index.js b/workspaces/libnpmexec/lib/index.js
index 45c75d471..197331760 100644
--- a/workspaces/libnpmexec/lib/index.js
+++ b/workspaces/libnpmexec/lib/index.js
@@ -1,12 +1,12 @@
'use strict'
+const { mkdir } = require('fs/promises')
const { promisify } = require('util')
const Arborist = require('@npmcli/arborist')
const ciDetect = require('@npmcli/ci-detect')
const crypto = require('crypto')
const log = require('proc-log')
-const mkdirp = require('mkdirp-infer-owner')
const npa = require('npm-package-arg')
const npmlog = require('npmlog')
const pacote = require('pacote')
@@ -205,7 +205,7 @@ const exec = async (opts) => {
.digest('hex')
.slice(0, 16)
const installDir = resolve(npxCache, hash)
- await mkdirp(installDir)
+ await mkdir(installDir, { recursive: true })
const npxArb = new Arborist({
...flatOptions,
path: installDir,
diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json
index f5d941356..0679e190f 100644
--- a/workspaces/libnpmexec/package.json
+++ b/workspaces/libnpmexec/package.json
@@ -63,7 +63,6 @@
"@npmcli/fs": "^2.1.1",
"@npmcli/run-script": "^4.2.0",
"chalk": "^4.1.0",
- "mkdirp-infer-owner": "^2.0.0",
"npm-package-arg": "^9.0.1",
"npmlog": "^6.0.2",
"pacote": "^14.0.0",