Add CI workflow and support Node 24#5
Open
duncaan wants to merge 6 commits into
Open
Conversation
Set up GitHub Actions so the addon build and tests run on every push and PR. Several fixes were needed to make the pipeline actually work: - .gitignore: `.*` was silently ignoring the entire .github directory, so no workflow could ever be committed. Add a `!.github` exception. - Workflow: the committed test.yaml never installed deps or built the native addon and ran the long-dead `expresso` runner via `make test`. Now runs `npm ci` (npm auto-triggers node-gyp) then `npm test` across Node 20/22/24. - Replace corrupt yarn.lock (each entry had two integrity hashes on one line, invalid yarn v1 syntax that crashed `yarn install`) with a clean package-lock.json. - Makefile: drop `expresso`, defer to `npm test`. - src/hash_ring: fix bucket-name buffer overflow (+1 for NUL), replace fixed 30-byte sprintf buffer with std::string, add <cstdint> include. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Correct package name (@movable/hash_ring).
- Drop obsolete node-waf / node-gyp configure build steps; install now
compiles via node-gyp automatically.
- Fix example: correct require path, use { HashRing }, document
getNode/getBuckets and the precision arg.
- Tests run via `npm test` (mocha), not `node test/...` or expresso.
- Point clone URL and links at movableink.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
node-addon-api@3 fails to compile against Node 24 headers on Linux/g++ (TypedThreadSafeFunction parse errors in napi.h), breaking CI. Bump to ^8.0.0, which supports current Node. Raise engines floor to Node >=18 (node-addon-api@8 requirement). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
md5.cc computed a pointer's address via `data - (md5_byte_t *)0` to test 4-byte alignment. Subtracting a null pointer is undefined behavior (clang -Wnull-pointer-subtraction). Use `(uintptr_t)data & 3` instead; same check, no UB, no warning. Add <stdint.h> for uintptr_t. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nicksteffens
approved these changes
Jul 10, 2026
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.
Sets up GitHub Actions CI so the native addon build and test suite run on every push and PR. Story: sc-209915.
What
.github/workflows/test.yaml) — builds addon + runs tests on Node 20/22/24.Fixes needed to make CI actually work
.*was silently ignoring the entire.github/directory, so no workflow could ever be committed. Added!.githubexception. (This is why workflows were not showing up in git.)test.yamlnever installed deps or built the native addon, and ran the long-deadexpressorunner viamake test. Now runsnpm ci(npm auto-triggersnode-gyp) thennpm test.yarn.lockwas corrupt (each entry had two integrity hashes on one line, invalid yarn v1 syntax that crashedyarn install). Replaced with a cleanpackage-lock.json; switched CI to npm.expresso, defers tonpm test.Native fixes (were uncommitted in working tree)
length + 1for the NUL terminator.sprintfbuffer withstd::string.<cstdint>include.Verification
Fresh
npm ci+npm testlocally → 10 passing, addon builds clean.🤖 Generated with Claude Code