Skip to content

fix(mirror): handle osx-*-tar naming in Node.js index.json#227

Merged
CalvinAllen merged 1 commit intomainfrom
feat/mirror/node-osx-platform-mapping
Feb 9, 2026
Merged

fix(mirror): handle osx-*-tar naming in Node.js index.json#227
CalvinAllen merged 1 commit intomainfrom
feat/mirror/node-osx-platform-mapping

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • 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 — names that 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/dist/
  • Added osx-*-tar mappings to both mapFileToPlatform() and getArchiveName(), keeping the legacy darwin-* cases for backwards compatibility

Root Cause

The files array in nodejs.org/dist/index.json uses the naming convention osx-x64-tar / osx-arm64-tar for macOS tarballs. The mirror script's switch statement only matched darwin-x64 / darwin-arm64, which aren't used in the index. The actual archive filenames on disk still use darwin- (e.g., node-v22.22.0-darwin-arm64.tar.gz), so getArchiveName() correctly maps osx-arm64-tar to the darwin-arm64 filename.

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:

  • 493+ versions currently missing macOS builds in the manifest
  • Integration test failures for "Migrate Node.js from System (macOS)"

Closes #223

Test plan

  • Verify go build ./... passes in scripts/mirror-binaries/
  • Verify go vet ./... passes
  • After merge, run mirror-sync workflow with --sync-only to populate missing darwin binaries
  • Run manifest generation to update embedded manifests
  • Re-run integration tests to confirm macOS migration passes

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
@CalvinAllen CalvinAllen merged commit 9f3b282 into main Feb 9, 2026
2 checks passed
@CalvinAllen CalvinAllen deleted the feat/mirror/node-osx-platform-mapping branch February 9, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(mirror): probe for Node.js binaries instead of relying on index.json

1 participant