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:
authorisaacs <i@izs.me>2019-06-29 02:32:38 +0300
committerisaacs <i@izs.me>2019-06-30 06:23:54 +0300
commit0421930693ba54d909e65fd77f1db845404b2cac (patch)
treec1067f7e7937ebff039bd4f8cb4635e6c19f5a10 /node_modules/pacote
parent8bd8e909f0699654e8ae5711e3421ad8edfcdcea (diff)
pacote@9.5.1
Diffstat (limited to 'node_modules/pacote')
-rw-r--r--node_modules/pacote/CHANGELOG.md12
-rw-r--r--node_modules/pacote/lib/util/git.js10
-rw-r--r--node_modules/pacote/lib/with-tarball-stream.js2
-rw-r--r--node_modules/pacote/package.json28
4 files changed, 33 insertions, 19 deletions
diff --git a/node_modules/pacote/CHANGELOG.md b/node_modules/pacote/CHANGELOG.md
index 1c8feb9a7..433c0f470 100644
--- a/node_modules/pacote/CHANGELOG.md
+++ b/node_modules/pacote/CHANGELOG.md
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="9.5.1"></a>
+## [9.5.1](https://github.com/zkat/pacote/compare/v9.5.0...v9.5.1) (2019-06-17)
+
+
+### Bug Fixes
+
+* **audit:** npm audit fix ([127a28b](https://github.com/zkat/pacote/commit/127a28b))
+* **errors:** Fix "TypeError: err.code.match is not a function" error ([#170](https://github.com/zkat/pacote/issues/170)) ([92f5e4c](https://github.com/zkat/pacote/commit/92f5e4c))
+* **git:** limit retry times, avoid unlimited retries ([#172](https://github.com/zkat/pacote/issues/172)) ([8bbd051](https://github.com/zkat/pacote/commit/8bbd051))
+
+
+
<a name="9.5.0"></a>
# [9.5.0](https://github.com/zkat/pacote/compare/v9.4.1...v9.5.0) (2019-02-18)
diff --git a/node_modules/pacote/lib/util/git.js b/node_modules/pacote/lib/util/git.js
index 997404dd2..7991833ab 100644
--- a/node_modules/pacote/lib/util/git.js
+++ b/node_modules/pacote/lib/util/git.js
@@ -40,8 +40,10 @@ const GIT_TRANSIENT_ERRORS = [
const GIT_TRANSIENT_ERROR_RE = new RegExp(GIT_TRANSIENT_ERRORS)
-function shouldRetry (error) {
- return GIT_TRANSIENT_ERROR_RE.test(error)
+const GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER = 3
+
+function shouldRetry (error, number) {
+ return GIT_TRANSIENT_ERROR_RE.test(error) && (number < GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER)
}
const GIT_ = 'GIT_'
@@ -188,7 +190,7 @@ function execGit (gitArgs, gitOpts, opts) {
opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number)
}
return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts)).catch((err) => {
- if (shouldRetry(err)) {
+ if (shouldRetry(err, number)) {
retry(err)
} else {
throw err
@@ -219,7 +221,7 @@ function spawnGit (gitArgs, gitOpts, opts) {
child.stderr.on('data', d => { stderr += d })
return finished(child, true).catch(err => {
- if (shouldRetry(stderr)) {
+ if (shouldRetry(stderr, number)) {
retry(err)
} else {
err.stderr = stderr
diff --git a/node_modules/pacote/lib/with-tarball-stream.js b/node_modules/pacote/lib/with-tarball-stream.js
index abeba738a..0d84696d6 100644
--- a/node_modules/pacote/lib/with-tarball-stream.js
+++ b/node_modules/pacote/lib/with-tarball-stream.js
@@ -107,7 +107,7 @@ function withTarballStream (spec, opts, streamHandler) {
// Retry once if we have a cache, to clear up any weird conditions.
// Don't retry network errors, though -- make-fetch-happen has already
// taken care of making sure we're all set on that front.
- if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) {
+ if (opts.cache && err.code && !String(err.code).match(/^E\d{3}$/)) {
if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
opts.log.warn('tarball', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`)
}
diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json
index 896afe5a7..2fd3d4151 100644
--- a/node_modules/pacote/package.json
+++ b/node_modules/pacote/package.json
@@ -1,21 +1,21 @@
{
- "_from": "pacote@latest",
- "_id": "pacote@9.5.0",
+ "_from": "pacote@^9.5.1",
+ "_id": "pacote@9.5.1",
"_inBundle": false,
- "_integrity": "sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg==",
+ "_integrity": "sha512-Zqvczvf/zZ7QNosdE9uTC7SRuvSs9tFqRkF6cJl+2HH7COBnx4BRAGpeXJlrbN+mM0CMHpbi620xdEHhCflghA==",
"_location": "/pacote",
"_phantomChildren": {
"safe-buffer": "5.1.2"
},
"_requested": {
- "type": "tag",
+ "type": "range",
"registry": true,
- "raw": "pacote@latest",
+ "raw": "pacote@^9.5.1",
"name": "pacote",
"escapedName": "pacote",
- "rawSpec": "latest",
+ "rawSpec": "^9.5.1",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "^9.5.1"
},
"_requiredBy": [
"#USER",
@@ -23,10 +23,10 @@
"/libcipm",
"/libnpm"
],
- "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz",
- "_shasum": "85f3013a3f6dd51c108b0ccabd3de8102ddfaeda",
- "_spec": "pacote@latest",
- "_where": "/Users/zkat/Documents/code/work/npm",
+ "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.1.tgz",
+ "_shasum": "adb0d23daeef6d0b813ab5891d0c6459ccec998d",
+ "_spec": "pacote@^9.5.1",
+ "_where": "/Users/isaacs/dev/npm/cli",
"author": {
"name": "Kat Marchán",
"email": "kzm@sykosomatic.org"
@@ -79,12 +79,12 @@
"devDependencies": {
"nock": "^10.0.3",
"npmlog": "^4.1.2",
- "nyc": "^13.1.0",
+ "nyc": "^14.1.1",
"require-inject": "^1.4.3",
"standard": "^12.0.1",
"standard-version": "^4.4.0",
"tacks": "^1.2.7",
- "tap": "^12.1.0",
+ "tap": "^12.7.0",
"tar-stream": "^1.6.2",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.7"
@@ -116,5 +116,5 @@
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
- "version": "9.5.0"
+ "version": "9.5.1"
}