fix: remove redundant mirror slash (#10204)

This commit is contained in:
Tmk authored and GitHub committed 2025-11-19 21:46:03 +01:00
1 parent 60f3a05064
commit 499ef22bd5
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
"@pnpm/node.resolver": patch
"pnpm": patch
---
Don't add an extra slash to the Node.js mirror URL [#10204](https://github.com/pnpm/pnpm/pull/10204).
+1 -1
View File
@@ -59,7 +59,7 @@ export async function resolveNodeRuntime (
}
async function readNodeAssets (fetch: FetchFromRegistry, nodeMirrorBaseUrl: string, version: string): Promise<PlatformAssetResolution[]> {
const integritiesFileUrl = `${nodeMirrorBaseUrl}/v${version}/SHASUMS256.txt`
const integritiesFileUrl = `${nodeMirrorBaseUrl}v${version}/SHASUMS256.txt`
const shasumsFileItems = await fetchShasumsFile(fetch, integritiesFileUrl)
const escaped = version.replace(/\\/g, '\\\\').replace(/\./g, '\\.')
const pattern = new RegExp(`^node-v${escaped}-([^-.]+)-([^.]+)\\.(?:tar\\.gz|zip)$`)