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-05-06 20:16:44 +0300
committerGar <gar+gh@danger.computer>2021-05-06 20:16:46 +0300
commit87c2303eaa6edfa5309da0a30f5ad291b6d57640 (patch)
treeb14c4e99633b9375a62d1deb67256a4ae71a7280 /node_modules
parent81c1dfaaaf918229316a975aa8075769ffafdb6d (diff)
@npmcli/git@2.0.9
* fix(clone): Do not allow git replacement objects by default
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/@npmcli/git/lib/clone.js2
-rw-r--r--node_modules/@npmcli/git/lib/spawn.js11
-rw-r--r--node_modules/@npmcli/git/package.json4
3 files changed, 11 insertions, 6 deletions
diff --git a/node_modules/@npmcli/git/lib/clone.js b/node_modules/@npmcli/git/lib/clone.js
index 1fea5acc8..6754fd760 100644
--- a/node_modules/@npmcli/git/lib/clone.js
+++ b/node_modules/@npmcli/git/lib/clone.js
@@ -30,7 +30,7 @@ const pickManifest = require('npm-pick-manifest')
const fs = require('fs')
const mkdirp = require('mkdirp')
-module.exports = (repo, ref = 'HEAD', target = null, /* istanbul ignore next */ opts = {}) =>
+module.exports = (repo, ref = 'HEAD', target = null, opts = {}) =>
revs(repo, opts).then(revs => clone(
repo,
revs,
diff --git a/node_modules/@npmcli/git/lib/spawn.js b/node_modules/@npmcli/git/lib/spawn.js
index cee3a7baf..337164a9a 100644
--- a/node_modules/@npmcli/git/lib/spawn.js
+++ b/node_modules/@npmcli/git/lib/spawn.js
@@ -10,6 +10,11 @@ module.exports = (gitArgs, opts = {}) => {
if (gitPath instanceof Error) { return Promise.reject(gitPath) }
+ // undocumented option, mostly only here for tests
+ const args = opts.allowReplace || gitArgs[0] === '--no-replace-objects'
+ ? gitArgs
+ : ['--no-replace-objects', ...gitArgs]
+
const log = opts.log || procLog
let retry = opts.retry
if (retry === null || retry === undefined) {
@@ -22,11 +27,11 @@ module.exports = (gitArgs, opts = {}) => {
}
return promiseRetry((retry, number) => {
if (number !== 1) {
- log.silly('pacote', `Retrying git command: ${
- gitArgs.join(' ')} attempt # ${number}`)
+ log.silly('git', `Retrying git command: ${
+ args.join(' ')} attempt # ${number}`)
}
- return spawn(gitPath, gitArgs, makeOpts(opts))
+ return spawn(gitPath, args, makeOpts(opts))
.catch(er => {
if (!shouldRetry(er.stderr, number)) {
throw er
diff --git a/node_modules/@npmcli/git/package.json b/node_modules/@npmcli/git/package.json
index 9b368c31e..0fe94686e 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.8",
+ "version": "2.0.9",
"main": "lib/index.js",
"files": [
"lib/*.js"
@@ -29,7 +29,7 @@
"devDependencies": {
"slash": "^3.0.0",
"standard": "^16.0.3",
- "tap": "^14.11.0"
+ "tap": "^15.0.6"
},
"dependencies": {
"@npmcli/promise-spawn": "^1.3.2",