fix(mirror): handle osx-*-tar naming in Node.js index.json#227
Merged
CalvinAllen merged 1 commit intomainfrom Feb 9, 2026
Merged
fix(mirror): handle osx-*-tar naming in Node.js index.json#227CalvinAllen merged 1 commit intomainfrom
CalvinAllen merged 1 commit intomainfrom
Conversation
Node.js index.json uses "osx-x64-tar" and "osx-arm64-tar" for macOS entries (since v15+), but the mirror script only mapped "darwin-x64" and "darwin-arm64" which don't appear in the index. This caused all darwin platform binaries to be skipped during mirroring, even though the actual tarballs exist on nodejs.org. Add osx-*-tar mappings to both mapFileToPlatform() and getArchiveName(), keeping the legacy darwin-* cases for backwards compatibility. Closes #223
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.jsonusesosx-x64-tarandosx-arm64-tarfor macOS entries (since v15+), but the mirror script only mappeddarwin-x64anddarwin-arm64— names that don't appear in the indexnodejs.org/dist/osx-*-tarmappings to bothmapFileToPlatform()andgetArchiveName(), keeping the legacydarwin-*cases for backwards compatibilityRoot Cause
The
filesarray innodejs.org/dist/index.jsonuses the naming conventionosx-x64-tar/osx-arm64-tarfor macOS tarballs. The mirror script's switch statement only matcheddarwin-x64/darwin-arm64, which aren't used in the index. The actual archive filenames on disk still usedarwin-(e.g.,node-v22.22.0-darwin-arm64.tar.gz), sogetArchiveName()correctly mapsosx-arm64-tarto thedarwin-arm64filename.Impact
After merging and running the mirror sync workflow, this will populate darwin-arm64 and darwin-amd64 builds for all Node.js versions v15+, fixing:
Closes #223
Test plan
go build ./...passes inscripts/mirror-binaries/go vet ./...passes--sync-onlyto populate missing darwin binaries