Skip to content

Add node-gyp-build-major parameter to support v4 naming convention#90

Merged
szegedi merged 5 commits intomainfrom
support-node-gyp-build-v4
Mar 9, 2026
Merged

Add node-gyp-build-major parameter to support v4 naming convention#90
szegedi merged 5 commits intomainfrom
support-node-gyp-build-v4

Conversation

@szegedi
Copy link
Contributor

@szegedi szegedi commented Mar 4, 2026

Summary

  • Adds a node-gyp-build-major workflow input (default: 3) to opt into the v4 prebuild naming convention
  • node-gyp-build v4 changed from directory-encoded libc (linuxglibc-arm64/node-115.node) to tag-based filenames (linux-arm64/dd_pprof.node.abi115.node)
  • When set to 4, the action generates prebuilds with the new convention:
    • Directory: prebuilds/${platform}-${arch}/ (no libc in dir name)
    • Filename: ${TARGET_NAME}[.musl].node.[napi|abi${N}].node (libc encoded as .musl tag; glibc is the default and needs no tag)
  • Artifact upload path is broadened to prebuilds/**/* for v4 (since directory names no longer match job names)
  • All existing behavior is unchanged when node-gyp-build-major is not set (defaults to 3)

Motivation

Needed by pprof-nodejs#284 which bumps node-gyp-build from 3.x to 4.x.

Test plan

  • Verify existing builds still pass with default node-gyp-build-major: 3
  • Verify pprof-nodejs PR #284 passes with node-gyp-build-major: 4

🤖 Generated with Claude Code

node-gyp-build v4 changed prebuild naming from:
  prebuilds/${platform}${libc}-${arch}/node-${abi}.node
to a tag-based convention:
  prebuilds/${platform}-${arch}/${name}[.musl].node.[napi|abi${N}].node

Add NODE_GYP_BUILD_MAJOR (default: 3) to prebuild/index.js, exposed as
node-gyp-build-major workflow input. When set to 4:
- Directory: platform-arch (no libc suffix; glibc is assumed by default)
- Filename: name[.musl].node.[napi|abi${N}].node (libc encoded as tag)
- Artifact upload uses prebuilds/**/* to match the new directory names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@szegedi szegedi requested a review from a team as a code owner March 4, 2026 17:21
szegedi and others added 4 commits March 4, 2026 18:28
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@szegedi szegedi merged commit e488d9d into main Mar 9, 2026
185 checks passed
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