pacote 21.5.0 → 21.5.1
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/util/add-git-sha.js +4 -1
- package/package.json +3 -3
package/lib/util/add-git-sha.js
CHANGED
|
@@ -8,7 +8,10 @@ const addGitSha = (spec, sha) => {
|
|
|
8
8
|
return `${base}#${sha}`
|
|
9
9
|
} else {
|
|
10
10
|
// don't use new URL for this, because it doesn't handle scp urls
|
|
11
|
-
|
|
11
|
+
// strip the committish with indexOf/slice to avoid a regexp redos
|
|
12
|
+
const hashIndex = spec.rawSpec.indexOf('#')
|
|
13
|
+
const base = hashIndex === -1 ? spec.rawSpec : spec.rawSpec.slice(0, hashIndex)
|
|
14
|
+
return `${base}#${sha}`
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pacote",
|
|
3
|
-
"version": "21.5.
|
|
3
|
+
"version": "21.5.1",
|
|
4
4
|
"description": "JavaScript package downloader",
|
|
5
5
|
"author": "GitHub Inc.",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@npmcli/arborist": "^9.0.2",
|
|
30
30
|
"@npmcli/eslint-config": "^6.0.0",
|
|
31
|
-
"@npmcli/template-oss": "
|
|
31
|
+
"@npmcli/template-oss": "5.1.0",
|
|
32
32
|
"hosted-git-info": "^9.0.0",
|
|
33
33
|
"mutate-fs": "^2.1.1",
|
|
34
34
|
"nock": "^13.2.4",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"templateOSS": {
|
|
75
75
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
76
|
-
"version": "
|
|
76
|
+
"version": "5.1.0",
|
|
77
77
|
"windowsCI": false,
|
|
78
78
|
"publish": "true"
|
|
79
79
|
}
|