Skip to content

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
mainfrom
fix/node24-support-4.1.9
Open

AjayBThorat-20 wants to merge 1 commit into
mainfrom
fix/node24-support-4.1.9

Conversation

@AjayBThorat-20

Copy link
Copy Markdown
Owner

What and why

Upgrading to Node 24 exposed three problems in the published 4.1.8:

  • Native crash on Node 24: better-sqlite3 11.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.node allowed crashing versions: uuid@14 is ESM-only and is loaded with require(), which only works from Node 20.19.0 / 22.12.0. The old >=20.0.0 let older 20.x/22.x install and then crash with ERR_REQUIRE_ESM. Now ^20.19.0 || >=22.12.0 (also knip's own range).
  • npm test failed on Node 22+: node --test test/unit/ no longer searches directories, so test, test:coverage and prepublishOnly all failed. Scripts now pass test/unit/*.test.js.

Plus lockfile-only advisory fixes: axios 1.20.0, brace-expansion 5.0.12, smol-toml 1.9.0. Version bumped to 4.1.9.

How I tested it

  • npm run test:coverage on Node 24.21.0 — 88/88 pass, 64.56% lines
  • npm run test:coverage on Node 20.20.2 (clean npm ci) — 88/88 pass, 64.56% lines
  • npm audit --audit-level=high clean
  • npm pack --dry-run — devcompass-4.1.9, 159 files

🤖 Generated with Claude Code

… 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.
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.

1 participant