Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: do not alter file ownership #5704

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
1 change: 0 additions & 1 deletion package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -13865,7 +13865,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",
Expand Down
4 changes: 2 additions & 2 deletions workspaces/libnpmexec/lib/file-exists.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions workspaces/libnpmexec/lib/index.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion workspaces/libnpmexec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down