Skip to content

Conversation

@tmkx
Copy link
Contributor

@tmkx tmkx commented Nov 19, 2025

the mirror base url already ends with a slash. if the internal mirror doesn't handle duplicate slashes, it will return a 404 error:

ERR_PNPM_FAILED_DOWNLOAD_SHASUM_FILE  Failed to fetch integrity file:
https://internal.test/mirrors/node//v24.4.1/SHASUMS256.txt (status: 404)
                                  ^^ Error

other impls:

const normalizedArch = getNormalizedArch(platform, arch, version)
return {
dirname: `${baseUrl}v${version}`,
basename: `node-v${version}-${normalizedPlatform}-${normalizedArch}`,

@tmkx tmkx requested a review from zkochan as a code owner November 19, 2025 09:07
@welcome
Copy link

welcome bot commented Nov 19, 2025

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where Node.js mirror URLs were constructed with duplicate slashes, causing 404 errors on mirror servers that don't handle double slashes gracefully. Since the nodeMirrorBaseUrl is guaranteed to end with a trailing slash (via the normalizeNodeMirror function), the extra slash when constructing the SHASUMS256.txt URL was redundant and problematic.

  • Removed redundant leading slash when constructing the Node.js mirror integrity file URL
  • Added changeset documenting the patch fix

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
env/node.resolver/src/index.ts Fixed URL construction in readNodeAssets to avoid double slash between base URL and version path
.changeset/silver-geckos-hunt.md Added changeset entry documenting the bug fix for the duplicate slash issue

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zkochan zkochan merged commit 499ef22 into pnpm:main Nov 19, 2025
17 checks passed
@tmkx tmkx deleted the fix/mirror-slash branch November 20, 2025 01:02
zkochan pushed a commit that referenced this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants