pacote 13.0.3 → 13.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/bin.js CHANGED
@@ -110,7 +110,7 @@ const parseArg = arg => {
110
110
  const k = split.shift()
111
111
  const v = split.join('=')
112
112
  const no = /^no-/.test(k) && !v
113
- const key = (no ? k.substr(3) : k)
113
+ const key = (no ? k.slice(3) : k)
114
114
  .replace(/^tag$/, 'defaultTag')
115
115
  .replace(/-([a-z])/g, (_, c) => c.toUpperCase())
116
116
  const value = v ? v.replace(/^~/, process.env.HOME) : !no
package/lib/fetcher.js CHANGED
@@ -325,18 +325,18 @@ class FetcherBase {
325
325
  }
326
326
  return this.resolve().then(() => retry(tryAgain =>
327
327
  streamHandler(this[_istream](this[_tarballFromResolved]()))
328
- .catch(er => {
328
+ .catch(streamErr => {
329
329
  // Most likely data integrity. A cache ENOENT error is unlikely
330
330
  // here, since we're definitely not reading from the cache, but it
331
331
  // IS possible that the fetch subsystem accessed the cache, and the
332
332
  // entry got blown away or something. Try one more time to be sure.
333
- if (this.isRetriableError(er)) {
333
+ if (this.isRetriableError(streamErr)) {
334
334
  log.warn('tarball', `tarball data for ${
335
335
  this.spec
336
336
  } (${this.integrity}) seems to be corrupted. Trying again.`)
337
- return this.cleanupCached().then(() => tryAgain(er))
337
+ return this.cleanupCached().then(() => tryAgain(streamErr))
338
338
  }
339
- throw er
339
+ throw streamErr
340
340
  }), { retries: 1, minTimeout: 0, maxTimeout: 0 }))
341
341
  }
342
342
 
@@ -2,7 +2,7 @@ const removeTrailingSlashes = (input) => {
2
2
  // in order to avoid regexp redos detection
3
3
  let output = input
4
4
  while (output.endsWith('/')) {
5
- output = output.substr(0, output.length - 1)
5
+ output = output.slice(0, -1)
6
6
  }
7
7
  return output
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacote",
3
- "version": "13.0.3",
3
+ "version": "13.0.6",
4
4
  "description": "JavaScript package downloader",
5
5
  "author": "GitHub Inc.",
6
6
  "bin": {
@@ -14,25 +14,27 @@
14
14
  "preversion": "npm test",
15
15
  "postversion": "npm publish",
16
16
  "prepublishOnly": "git push origin --follow-tags",
17
- "lint": "eslint '**/*.js'",
18
- "postlint": "npm-template-check",
17
+ "lint": "eslint \"**/*.js\"",
18
+ "postlint": "template-oss-check",
19
19
  "lintfix": "npm run lint -- --fix",
20
20
  "posttest": "npm run lint",
21
- "template-copy": "npm-template-copy --force"
21
+ "template-oss-apply": "template-oss-apply --force"
22
22
  },
23
23
  "tap": {
24
24
  "timeout": 300,
25
25
  "coverage-map": "map.js"
26
26
  },
27
27
  "devDependencies": {
28
- "@npmcli/template-oss": "^2.7.1",
28
+ "@npmcli/eslint-config": "^3.0.1",
29
+ "@npmcli/template-oss": "3.2.2",
30
+ "hosted-git-info": "^5.0.0",
29
31
  "mutate-fs": "^2.1.1",
30
32
  "npm-registry-mock": "^1.3.1",
31
- "tap": "^15.1.6"
33
+ "tap": "^16.0.1"
32
34
  },
33
35
  "files": [
34
- "bin",
35
- "lib"
36
+ "bin/",
37
+ "lib/"
36
38
  ],
37
39
  "keywords": [
38
40
  "packages",
@@ -42,32 +44,36 @@
42
44
  "dependencies": {
43
45
  "@npmcli/git": "^3.0.0",
44
46
  "@npmcli/installed-package-contents": "^1.0.7",
45
- "@npmcli/promise-spawn": "^1.2.0",
46
- "@npmcli/run-script": "^3.0.0",
47
- "cacache": "^15.3.0",
47
+ "@npmcli/promise-spawn": "^3.0.0",
48
+ "@npmcli/run-script": "^3.0.1",
49
+ "cacache": "^16.0.0",
48
50
  "chownr": "^2.0.0",
49
51
  "fs-minipass": "^2.1.0",
50
52
  "infer-owner": "^1.0.4",
51
53
  "minipass": "^3.1.6",
52
54
  "mkdirp": "^1.0.4",
53
55
  "npm-package-arg": "^9.0.0",
54
- "npm-packlist": "^3.0.0",
56
+ "npm-packlist": "^4.0.0",
55
57
  "npm-pick-manifest": "^7.0.0",
56
- "npm-registry-fetch": "^13.0.0",
58
+ "npm-registry-fetch": "^13.0.1",
57
59
  "proc-log": "^2.0.0",
58
60
  "promise-retry": "^2.0.1",
59
- "read-package-json": "^4.1.1",
61
+ "read-package-json": "^5.0.0",
60
62
  "read-package-json-fast": "^2.0.3",
61
63
  "rimraf": "^3.0.2",
62
- "ssri": "^8.0.1",
64
+ "ssri": "^9.0.0",
63
65
  "tar": "^6.1.11"
64
66
  },
65
67
  "engines": {
66
- "node": "^12.13.0 || ^14.15.0 || >=16"
68
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "https://github.com/npm/pacote.git"
67
73
  },
68
- "repository": "git@github.com:npm/pacote",
69
74
  "templateOSS": {
70
- "version": "2.7.1",
75
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
76
+ "version": "3.2.2",
71
77
  "windowsCI": false
72
78
  }
73
79
  }