@@ -11,3 +11,6 @@ // add a sha to a git remote url spec | ||
| // don't use new URL for this, because it doesn't handle scp urls | ||
| return spec.rawSpec.replace(/#.*$/, '') + `#${sha}` | ||
| // strip the committish with indexOf/slice to avoid a regexp redos | ||
| const hashIndex = spec.rawSpec.indexOf('#') | ||
| const base = hashIndex === -1 ? spec.rawSpec : spec.rawSpec.slice(0, hashIndex) | ||
| return `${base}#${sha}` | ||
| } | ||
@@ -14,0 +17,0 @@ } |
+3
-3
| { | ||
| "name": "pacote", | ||
| "version": "21.5.0", | ||
| "version": "21.5.1", | ||
| "description": "JavaScript package downloader", | ||
@@ -31,3 +31,3 @@ "author": "GitHub Inc.", | ||
| "@npmcli/eslint-config": "^6.0.0", | ||
| "@npmcli/template-oss": "4.29.0", | ||
| "@npmcli/template-oss": "5.1.0", | ||
| "hosted-git-info": "^9.0.0", | ||
@@ -77,3 +77,3 @@ "mutate-fs": "^2.1.1", | ||
| "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
| "version": "4.29.0", | ||
| "version": "5.1.0", | ||
| "windowsCI": false, | ||
@@ -80,0 +80,0 @@ "publish": "true" |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
76853
0.23%1606
0.19%9
-10%