chore: bump better-sqlite3 to ^12.10.0 for Node 24 prebuilt support#34
Conversation
Resurrects #25 (closed unmerged) on top of v2.0.0. better-sqlite3 v11.x release assets top out at NODE_MODULE_VERSION 131 (Node 23) — no Node-24 (ABI 137) prebuilts. v12.x adds Node 24 to the build matrix while dropping EOL Node 18. No API changes needed for SqliteLevel — Database / prepare / exec / iterate are unchanged. Fixes the user-facing Node 24 install failure tracked in tinacms/tinacms#6686 and the broader rollout in tinacms/tinacms#6848. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 2067739 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📦 Tagged Release PublishedYour tagged PR has been published! You can install the packages using their version tags: pnpm add sqlite-level@0.0.0-20260518072106Published Packages:
View on npm: Commit: |
…12.10.0 better-sqlite3@12.10.0 removed Node 20 and Node 23 prebuilds (Node 20 went EOL 2026-04-30, Node 23 EOL 2025-06-01). Surface that explicitly in the changeset so consumers reading the changelog see the platform narrowing before they upgrade. No code or dep changes — changeset edit only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📦 Tagged Release PublishedYour tagged PR has been published! You can install the packages using their version tags: pnpm add sqlite-level@0.0.0-20260518072510Published Packages:
View on npm: Commit: |
Drop the libc annotations on rollup deps and the prebuild-install \"deprecated\" note that pnpm picked up during the v12 install. Both are pnpm-lockfile-schema metadata refresh, not caused by the better-sqlite3 bump itself. Resulting lockfile diff vs main is now just the 3 better-sqlite3 references (importers section, package definition, snapshot). Verified: pnpm install --frozen-lockfile clean, pnpm test 66/66, pnpm types clean, pnpm build clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📦 Tagged Release PublishedYour tagged PR has been published! You can install the packages using their version tags: pnpm add sqlite-level@0.0.0-20260518073343Published Packages:
View on npm: Commit: |
## Context Node 20 reached its official end-of-life on **2026-04-30** ([Node.js release schedule](https://endoflife.date/nodejs)). The contributor and CI default in this repo (\`.nvmrc\`) still points to Node 20, 18 days after EOL. ## What Single one-line change: \`.nvmrc\` from \`v20\` to \`v22\`. ## Why now Two reasons compounding: 1. **Node 20 is no longer receiving security patches.** Anyone running \`nvm use\` / \`fnm use\` in this repo today gets an EOL Node version. The repo's own end-user verification CI ([\`build-starter-templates.yml\`](.github/workflows/build-starter-templates.yml)) already runs against Node 22 / 24 / 25 — Node 20 is excluded from the user-facing matrix. The \`.nvmrc\` was just lagging. 2. **Coordinated with [tinacms/sqlite-level#34](tinacms/sqlite-level#34 That PR bumps \`better-sqlite3\` from \`^11.8.1\` to \`^12.9.0\` (resolves to 12.10.0) to fix [#6686](#6686) on Node 24. \`better-sqlite3@12.10.0\` [explicitly dropped Node 20 prebuilds](https://github.com/WiseLibs/better-sqlite3/releases/tag/v12.10.0): *"Add support for Node.js v26 prebuilds and remove EOL builds (Node.js v20, v23)"*. Once sqlite-level publishes from #34 and \`@tinacms/search\` consumes it via [#6848](#6848), the [\`publish.yml\`](.github/workflows/publish.yml) workflow — which uses \`node-version-file: .nvmrc\` — would hit a \`node-gyp rebuild\` attempt and fail without a local Python + C++ toolchain in the runner image. This bump prevents that. ## Workflows affected Workflows that use \`node-version-file: '.nvmrc'\` (and will now run on Node 22): - \`.github/workflows/publish.yml\` - \`.github/workflows/main.yml\` - \`.github/workflows/e2e.yml\` - \`.github/workflows/playwright-next-kitchen-sink.yml\` - \`.github/workflows/playwright-react-kitchen-sink.yml\` - \`.github/workflows/playwright-astro-kitchen-sink.yml\` - \`.github/workflows/playwright-hugo-kitchen-sink.yml\` Workflows with their own explicit \`node-version\` matrices are unaffected (\`build-starter-templates.yml\` already runs 22 / 24 / 25). ## Out of scope - \`packages/create-tina-app/package.json\` declares \`engines.node: ">=18.18.0"\`. That's the *user-facing* floor for scaffolding new projects and is a separate decision — not changed here. Worth revisiting in a future PR. - This does **not** change any production runtime targets. Tina packages themselves don't declare \`engines\` and are Node-version-agnostic at runtime. ## Test plan - [ ] CI workflows pass on Node 22 (will run automatically when PR opens) - [ ] No lockfile or package.json changes needed — this is purely the \`.nvmrc\` hint file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pinning the floor to the version we actually tested and resolved against. The previous ^12.9.0 was inherited from #25 with no strong reason; consumers always resolve to the highest matching version (12.10.0) anyway, so the floor only matters for honest signalling. Updates package.json, lockfile importer spec, and the changeset text. No behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📦 Tagged Release PublishedYour tagged PR has been published! You can install the packages using their version tags: pnpm add sqlite-level@0.0.0-20260519050140Published Packages:
View on npm: Commit: |
…install fix) (#6920) Closes #6848. Fixes #6686. ## What Bumps the `sqlite-level` workspace catalog entry from `^2.0.0` to `^2.1.0`. `@tinacms/search` is the only consumer (`pnpm-workspace.yaml` catalog → `packages/@tinacms/search/package.json: "sqlite-level": "catalog:"`). The new `sqlite-level@2.1.0` pulls in `better-sqlite3@12.10.0`, which is the **first `better-sqlite3` release line to ship Node 24 (`NODE_MODULE_VERSION 137`) prebuilt binaries**. Older v11.x prebuilds top out at ABI 131 (Node 23), so a fresh `npm install` on Node 24 fell back to `node-gyp rebuild` and failed without a local Python + C++ toolchain — that's the user-facing pain in #6686. Changeset attached as a **patch** bump on `@tinacms/search` so the next release ships the fix downstream (tinacloud, examples, end users). ## Trail of context - **[tinacms/sqlite-level#34](tinacms/sqlite-level#34 — bumped sqlite-level's own `better-sqlite3` from `^11.8.1` to `^12.10.0`; merged + published as `sqlite-level@2.1.0` on 2026-05-19. - **#6838** (closed-merged) — was the *previous* step: bumped sqlite-level v1 → v2 to fix the CJS / ESM namespace-import workaround. That fixed the import gymnastics but **not** the Node 24 install (both v1.2.1 and v2.0.0 still pinned `better-sqlite3@^11.8.1` underneath). - **This PR** — completes the fix by bumping to sqlite-level@2.1.0, which is the first version that actually transitively brings in `better-sqlite3@12`. ## Platform-support narrowing `better-sqlite3@12.10.0` [explicitly dropped Node 20 and Node 23 prebuilds](https://github.com/WiseLibs/better-sqlite3/releases/tag/v12.10.0): > *"Add support for Node.js v26 prebuilds and remove EOL builds (Node.js v20, v23)"* Both removed Node lines are EOL by the Node.js release schedule (Node 20 reached EOL 2026-04-30, Node 23 on 2025-06-01). End users on Node 20 hitting a fresh install will get the same `node-gyp` fallback that Node 24 users currently hit — recommended path is to upgrade to Node 22 LTS. The TinaCMS-published end-user CI matrix (`build-starter-templates.yml`) already runs against Node 22 / 24 / 25 only. ## Verification Ran on this branch: - [x] `pnpm install` clean; `pnpm-lock.yaml` resolves `sqlite-level@2.1.0` and `better-sqlite3@12.10.0` (single entry each — no duplicates). - [x] `pnpm --filter @tinacms/search test` — **124 / 124 tests pass**. - [x] `pnpm --filter @tinacms/search build` — clean. ## Coordination - **[tinacms/tinacloud#TBD](https://github.com/tinacms/tinacloud/pulls?q=sqlite-level)** — parallel direct-dep bump in `tina-content-api`. Independent of this PR. - **[#6905](#6905) + [#6908](#6908 — the `.nvmrc` v20→v22→v22.20.0 sequence for the publish workflow. Should land before this PR's release publishes so `publish.yml` keeps installing cleanly on Node 22. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resurrects #25 (closed unmerged on 2026-05-10) on top of the v2.0.0 ESM main.
The problem
better-sqlite3v11.x prebuilt assets top out atNODE_MODULE_VERSION 131(Node 23). Node 24 is ABI 137. So on a freshnpm/pnpm/yarn installwith Node 24:…and install falls back to
node-gyp rebuild, which needs a local Python + a C++ toolchain (MSVC on Windows, Xcode CLT on macOS, build-essential on Linux). On a clean Windows dev box neither exists → install fails.This is exactly the failure mode reported in tinacms/tinacms#6686.
The fix
better-sqlite3@12.0.0added Node 24 (node-v137) to its prebuild matrix and dropped EOL Node 18 — see the v12.0.0 release notes. Pinning^12.10.0— the version this PR's lockfile actually resolves to and which CI verified passes tests + build. (#25 had used^12.9.0, inherited from what @galsakuri tested locally;^12.10.0is the honest "floor = what we shipped against" choice.)No source-code changes needed in this package.
SqliteLevel's use ofDatabase,prepare,exec, anditerateis unchanged between v11 and v12.better-sqlite3@12.10.0's release notes call out: "Add support for Node.js v26 prebuilds and remove EOL builds (Node.js v20, v23)". So the post-merge prebuild matrix is:better-sqlite3@12.10.0?In practice, every Node major that loses prebuild support here is already EOL by the Node.js release schedule. But it does mean: a consumer on Node 20 today, hitting install for the first time after a
sqlite-levelrelease from this PR, will see the samenode-gypfallback failure that Node 24 users currently hit. Their options are:node-gyp rebuildsucceedssqlite-levelversionTina-first-party consumers (
tina-content-api, TinaCMS workspaces' build matrix[22, 24, 25],tina-self-hosted-demo) all target Node 22+ and are unaffected. A coordinated.nvmrcbump fromv20tov22in tinacms/tinacms is recommended alongside the consumption of the newsqlite-levelrelease so thepublish.ymlworkflow keeps installing cleanly — opened as tinacms/tinacms#6905.Why the original PR was closed without merging
PR #25 was opened 2026-04-19, closed 2026-05-10 with no human comments. The ESM-migration v2.0.0 release went out 4 days later (2026-05-14) without picking up this change, so
sqlite-level@2.0.0still ships the v11 pin — meaning the Node 24 install failure has not been fixed on npm yet, despite #6686 being treated by downstream issues as "resolved by the v2 bump."Verification
pnpm install— clean.better-sqlite3resolves to 12.10.0.pnpm install --frozen-lockfile— clean.pnpm test— 66 / 66 tests pass.pnpm types— clean.pnpm build— clean (tscexit 0).Trade-off summary
sqlite-level@2.0.0→better-sqlite3@11.x)sqlite-level@2.1.0→better-sqlite3@12.10.0)Net: trades install support for an EOL Node line in exchange for the current LTS.
Downstream PRs blocked on this
.nvmrcfrom v20 to v22 (Node 20 EOL)sqlite-levelin@tinacms/search's catalog after this releases🤖 Generated with Claude Code