diff --git a/node_modules/@npmcli/git/lib/clone.js b/node_modules/@npmcli/git/lib/clone.js index 0b88c79f3f7da..1fea5acc84621 100644 --- a/node_modules/@npmcli/git/lib/clone.js +++ b/node_modules/@npmcli/git/lib/clone.js @@ -24,7 +24,7 @@ const { basename, resolve } = require('path') const revs = require('./revs.js') const spawn = require('./spawn.js') -const { isWindows, escapePath } = require('./utils.js') +const { isWindows } = require('./utils.js') const pickManifest = require('npm-pick-manifest') const fs = require('fs') @@ -112,7 +112,7 @@ const branch = (repo, revDoc, target, opts) => { '-b', revDoc.ref, repo, - escapePath(target, opts), + target, '--recurse-submodules' ] if (maybeShallow(repo, opts)) { args.push('--depth=1') } @@ -125,7 +125,7 @@ const plain = (repo, revDoc, target, opts) => { const args = [ 'clone', repo, - escapePath(target, opts), + target, '--recurse-submodules' ] if (maybeShallow(repo, opts)) { args.push('--depth=1') } @@ -151,7 +151,7 @@ const unresolved = (repo, ref, target, opts) => { // can't do this one shallowly, because the ref isn't advertised // but we can avoid checking out the working dir twice, at least const lp = isWindows(opts) ? ['--config', 'core.longpaths=true'] : [] - const cloneArgs = ['clone', '--mirror', '-q', repo, escapePath(target + '/.git', opts)] + const cloneArgs = ['clone', '--mirror', '-q', repo, target + '/.git'] const git = (args) => spawn(args, { ...opts, cwd: target }) return mkdirp(target) .then(() => git(cloneArgs.concat(lp))) diff --git a/node_modules/@npmcli/git/lib/opts.js b/node_modules/@npmcli/git/lib/opts.js index 6db9e9abeed4b..144e0a3aaf03f 100644 --- a/node_modules/@npmcli/git/lib/opts.js +++ b/node_modules/@npmcli/git/lib/opts.js @@ -7,5 +7,6 @@ const gitEnv = { module.exports = (opts = {}) => ({ stdioString: true, ...opts, + shell: false, env: opts.env || { ...gitEnv, ...process.env } }) diff --git a/node_modules/@npmcli/git/lib/utils.js b/node_modules/@npmcli/git/lib/utils.js index 82610a73a2b33..fcd9578a19597 100644 --- a/node_modules/@npmcli/git/lib/utils.js +++ b/node_modules/@npmcli/git/lib/utils.js @@ -1,16 +1,3 @@ -const { basename } = require('path') - const isWindows = opts => (opts.fakePlatform || process.platform) === 'win32' -// wrap the target in quotes for Windows when using cmd(.exe) as a shell to -// avoid clone failures for paths with spaces -const escapePath = (gitPath, opts) => { - const isCmd = opts.shell && (basename(opts.shell.toLowerCase(), '.exe') === 'cmd') - if (isWindows(opts) && isCmd && !gitPath.startsWith('"')) { - return `"${gitPath}"` - } - return gitPath -} - -exports.escapePath = escapePath exports.isWindows = isWindows diff --git a/node_modules/@npmcli/git/lib/which.js b/node_modules/@npmcli/git/lib/which.js index d4e113126805d..a2f690e1bce80 100644 --- a/node_modules/@npmcli/git/lib/which.js +++ b/node_modules/@npmcli/git/lib/which.js @@ -1,4 +1,3 @@ -const { escapePath } = require('./utils.js') const which = require('which') let gitPath @@ -13,5 +12,5 @@ module.exports = (opts = {}) => { if (!gitPath || opts.git === false) { return Object.assign(new Error('No git binary found in $PATH'), { code: 'ENOGIT' }) } - return escapePath(gitPath, opts) + return gitPath } diff --git a/node_modules/@npmcli/git/package.json b/node_modules/@npmcli/git/package.json index c949936f841cd..9b368c31e262d 100644 --- a/node_modules/@npmcli/git/package.json +++ b/node_modules/@npmcli/git/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/git", - "version": "2.0.7", + "version": "2.0.8", "main": "lib/index.js", "files": [ "lib/*.js" @@ -19,7 +19,8 @@ "prepublishOnly": "git push origin --follow-tags", "preversion": "npm test", "snap": "tap", - "test": "tap" + "test": "tap", + "posttest": "npm run lint" }, "tap": { "check-coverage": true, diff --git a/package-lock.json b/package-lock.json index 209d24735e937..cd1a9e99870cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -73,7 +73,181 @@ "treeverse", "validate-npm-package-name", "which", - "write-file-atomic" + "write-file-atomic", + "@npmcli/disparity-colors", + "@npmcli/git", + "@npmcli/installed-package-contents", + "@npmcli/map-workspaces", + "@npmcli/metavuln-calculator", + "@npmcli/move-file", + "@npmcli/name-from-folder", + "@npmcli/node-gyp", + "@npmcli/promise-spawn", + "@tootallnate/once", + "agent-base", + "agentkeepalive", + "aggregate-error", + "ajv", + "ansi-regex", + "ansi-styles", + "aproba", + "are-we-there-yet", + "asap", + "asn1", + "assert-plus", + "asynckit", + "aws-sign2", + "aws4", + "balanced-match", + "bcrypt-pbkdf", + "bin-links", + "binary-extensions", + "brace-expansion", + "builtins", + "caseless", + "cidr-regex", + "clean-stack", + "clone", + "cmd-shim", + "code-point-at", + "color-convert", + "color-name", + "colors", + "combined-stream", + "common-ancestor-path", + "concat-map", + "console-control-strings", + "core-util-is", + "dashdash", + "debug", + "debuglog", + "defaults", + "delayed-stream", + "delegates", + "depd", + "dezalgo", + "diff", + "ecc-jsbn", + "emoji-regex", + "encoding", + "env-paths", + "err-code", + "extend", + "extsprintf", + "fast-deep-equal", + "fast-json-stable-stringify", + "forever-agent", + "form-data", + "fs-minipass", + "fs.realpath", + "function-bind", + "gauge", + "getpass", + "har-schema", + "har-validator", + "has", + "has-flag", + "has-unicode", + "http-cache-semantics", + "http-proxy-agent", + "http-signature", + "https-proxy-agent", + "humanize-ms", + "iconv-lite", + "ignore-walk", + "imurmurhash", + "indent-string", + "infer-owner", + "inflight", + "inherits", + "ip", + "ip-regex", + "is-core-module", + "is-fullwidth-code-point", + "is-lambda", + "is-typedarray", + "isarray", + "isexe", + "isstream", + "jsbn", + "json-schema", + "json-schema-traverse", + "json-stringify-nice", + "json-stringify-safe", + "jsonparse", + "jsprim", + "just-diff", + "just-diff-apply", + "lru-cache", + "mime-db", + "mime-types", + "minimatch", + "minipass-collect", + "minipass-fetch", + "minipass-flush", + "minipass-json-stream", + "minipass-sized", + "minizlib", + "mute-stream", + "normalize-package-data", + "npm-bundled", + "npm-install-checks", + "npm-normalize-package-bin", + "npm-packlist", + "number-is-nan", + "oauth-sign", + "object-assign", + "once", + "p-map", + "path-is-absolute", + "path-parse", + "performance-now", + "process-nextick-args", + "promise-all-reject-late", + "promise-call-limit", + "promise-inflight", + "promise-retry", + "promzard", + "psl", + "punycode", + "qs", + "read-cmd-shim", + "readable-stream", + "request", + "resolve", + "retry", + "safe-buffer", + "safer-buffer", + "set-blocking", + "signal-exit", + "smart-buffer", + "socks", + "socks-proxy-agent", + "spdx-correct", + "spdx-exceptions", + "spdx-expression-parse", + "spdx-license-ids", + "sshpk", + "string_decoder", + "string-width", + "stringify-package", + "strip-ansi", + "supports-color", + "tunnel-agent", + "tweetnacl", + "typedarray-to-buffer", + "unique-filename", + "unique-slug", + "uri-js", + "util-deprecate", + "uuid", + "validate-npm-package-license", + "verror", + "walk-up-path", + "wcwidth", + "wide-align", + "wrappy", + "yallist" ], "license": "Artistic-2.0", "dependencies": { @@ -783,9 +957,9 @@ } }, "node_modules/@npmcli/git": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.7.tgz", - "integrity": "sha512-HUSqNDWYsTpboc7yV1C4yPd/jbaGXfWVmGoTyB+h3QQSKMpYPzTXLrqUMpz+LEA6Dt9usUeRtjytwcrfoBMJpg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.8.tgz", + "integrity": "sha512-LPnzyBZ+1p7+JzHVwwKycMF8M3lr1ze3wxGRnxn/QxJtk++Y3prSJQrdBDGCxJyRpFsup6J3lrRBVYBhJVrM8Q==", "inBundle": true, "dependencies": { "@npmcli/promise-spawn": "^1.3.2", @@ -10986,9 +11160,9 @@ } }, "@npmcli/git": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.7.tgz", - "integrity": "sha512-HUSqNDWYsTpboc7yV1C4yPd/jbaGXfWVmGoTyB+h3QQSKMpYPzTXLrqUMpz+LEA6Dt9usUeRtjytwcrfoBMJpg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.8.tgz", + "integrity": "sha512-LPnzyBZ+1p7+JzHVwwKycMF8M3lr1ze3wxGRnxn/QxJtk++Y3prSJQrdBDGCxJyRpFsup6J3lrRBVYBhJVrM8Q==", "requires": { "@npmcli/promise-spawn": "^1.3.2", "lru-cache": "^6.0.0",