Repository navigation
fix(v4.1.9): support Node 22/24 — better-sqlite3 12, correct engines, test glob - #5
Open
AjayBThorat-20 wants to merge 1 commit into
Open
AjayBThorat-20 wants to merge 1 commit into
AjayBThorat-20 wants to merge 1 commit into
Conversation
… test glob better-sqlite3 11.x crashed natively at process exit on Node 24; 12.11.1 officially supports Node 20-26 (13.x would require Node >=22). engines said >=20.0.0, but uuid@14 is ESM-only and is loaded with require(), which only works from Node 20.19.0 / 22.12.0 — older 20.x/22.x installs succeeded and then crashed with ERR_REQUIRE_ESM. Now ^20.19.0 || >=22.12.0, matching knip's own range. `node --test test/unit/` stopped searching directories in Node 22, so npm test, test:coverage and prepublishOnly all failed on 22+; the scripts now pass an explicit test/unit/*.test.js glob. Also lockfile-only advisory fixes for axios, brace-expansion and smol-toml.
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 and why
Upgrading to Node 24 exposed three problems in the published 4.1.8:
better-sqlite311.x crashes at process exit (Statement::~Statement). Upgraded to 12.11.1, which officially supports Node 20–26 (13.x requires Node ≥22, which would contradict the engines range).engines.nodeallowed crashing versions:uuid@14is ESM-only and is loaded withrequire(), which only works from Node 20.19.0 / 22.12.0. The old>=20.0.0let older 20.x/22.x install and then crash withERR_REQUIRE_ESM. Now^20.19.0 || >=22.12.0(alsoknip's own range).npm testfailed on Node 22+:node --test test/unit/no longer searches directories, sotest,test:coverageandprepublishOnlyall failed. Scripts now passtest/unit/*.test.js.Plus lockfile-only advisory fixes:
axios1.20.0,brace-expansion5.0.12,smol-toml1.9.0. Version bumped to 4.1.9.How I tested it
npm run test:coverageon Node 24.21.0 — 88/88 pass, 64.56% linesnpm run test:coverageon Node 20.20.2 (cleannpm ci) — 88/88 pass, 64.56% linesnpm audit --audit-level=highcleannpm pack --dry-run— devcompass-4.1.9, 159 files🤖 Generated with Claude Code