feat: adding support for Node 24 and Node 26#24
Open
erunion wants to merge 3 commits into
Open
Conversation
- Swap @axosoft/nan for upstream nan@^2.28.0 via npm alias (fork was stale at 2.22.0-gk.1; upstream 2.27+ is required for Node 26 / V8 14) - Replace removed v8::Context::GetIsolate() with v8::Isolate::GetCurrent() in templates (V8 14.x removal, Node 26) - Widen engines to ^22 || ^24 || >=26 - Expand test and publish matrices to Node 22/24/26; drop hardcoded -std=c++17 overrides so the gyp-derived C++ standard applies per version - Generalize publish artifact merging across node versions - Move Alpine Dockerfile to floating -alpine tag (no 24/26-alpine3.19 tags) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Node 24+ headers use C++20 std::source_location, which requires clang >= 16; ubuntu 22.04 ships clang 14. Install clang 18 from apt.llvm.org instead of moving to a newer runner image so Linux prebuilds keep the glibc 2.35 baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
erunion
marked this pull request as ready for review
July 14, 2026 19:52
jboyens
approved these changes
Jul 14, 2026
domharrington
approved these changes
Jul 15, 2026
Co-authored-by: Dom Harrington <domharrington@users.noreply.github.com>
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.
What
Adds Node 24 (Active LTS) and Node 26 (current) support to
@readme/nodegit: tests run on and prebuilds ship for Node 22, 24, and 26.Changes
@axosoft/nanfor upstreamnan@^2.28.0via npm alias. The fork is stale at2.22.0-gk.1; upstream nan ≥2.27.0 is required for Node 26 / V8 14.x. The alias keeps therequire('@axosoft/nan')include-path lookup in the binding.gyp template working unchanged, minimizing the diff vs upstream nodegit for future merges. The fork's-gkpatches are Electron/cppgc-specific and unused by this repo.v8::Context::GetIsolate()no longer exists on Node 26. Replaced theNan::GetCurrentContext()->GetIsolate()pattern withv8::Isolate::GetCurrent()at four JS-thread call sites ingenerate/templates/. This was the only compile fix Node 26 needed.^22 || ^24 || >=26(even/LTS lines only).tests.ymlandpublish.ymlnow run Node 22/24/26. Removed hardcodedCXXFLAGS: -std=c++17env overrides — binding.gyp already emits the correct-std=c++<ver>per running Node (C++20 on 24/26), and the override would fight it.-node22artifact names to a glob over allprebuild-*artifacts. ABI-tagged prebuild filenames don't collide, so all versions merge into the same platform dirs.node:${NODE_VERSION}-alpine3.19has no 24/26 tags; moved to the floating-alpinetag, bumped the default from 20 to 22, and dropped the-std=c++17portion ofCXXFLAGSso the gyp-derived standard applies.Verification (local, macOS arm64)
Clean build (
rm -rf build node_modules && npm install) + full mocha suite on each version:The 7 failures are byte-identical across all three versions and are pre-existing local-environment issues, not regressions: three require SSH test credentials (
test/id_rsais only checked in encrypted; CI decodes it) and four fail on local git default-branch config (no reference found for shorthand 'master'). CI has the SSH/git setup these need.Before release
docker build --build-arg NODE_VERSION=26 -f scripts/Dockerfile.alpine .workflow_dispatchrun of publish.yml and confirmfind ./prebuildsshows 18.nodefiles (3 versions × 6 platform/libc targets) before taggingv3.3.0🤖 Generated with Claude Code