Skip to content

chore: bump better-sqlite3 to ^12.10.0 for Node 24 prebuilt support#34

Merged
kulesy merged 4 commits into
mainfrom
chore/bump-better-sqlite3-v12-node24
May 19, 2026
Merged

chore: bump better-sqlite3 to ^12.10.0 for Node 24 prebuilt support#34
kulesy merged 4 commits into
mainfrom
chore/bump-better-sqlite3-v12-node24

Conversation

@kulesy
Copy link
Copy Markdown
Contributor

@kulesy kulesy commented May 18, 2026

Resurrects #25 (closed unmerged on 2026-05-10) on top of the v2.0.0 ESM main.

The problem

better-sqlite3 v11.x prebuilt assets top out at NODE_MODULE_VERSION 131 (Node 23). Node 24 is ABI 137. So on a fresh npm/pnpm/yarn install with Node 24:

prebuild-install warn install No prebuilt binaries found
  (target=24.x.x runtime=node arch=x64 libc= platform=...)

…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.0 added 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.0 is the honest "floor = what we shipped against" choice.)

No source-code changes needed in this package. SqliteLevel's use of Database, prepare, exec, and iterate is unchanged between v11 and v12.

⚠️ Platform-support narrowing

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:

Node version EOL date Prebuilt in better-sqlite3@12.10.0?
Node 18 2025-04-30 ❌ (was already dropped in v12.0.0)
Node 20 LTS 2026-04-30 (18 days ago)
Node 21 2024-06-01
Node 22 LTS 2027-04-30
Node 23 2025-06-01
Node 24 LTS 2028-04-30 ✅ (the fix)
Node 25 2026-06-01
Node 26 (active)

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-level release from this PR, will see the same node-gyp fallback failure that Node 24 users currently hit. Their options are:

  1. Upgrade to Node 22 LTS (recommended — Node 20 is EOL)
  2. Install a local Python + C++ toolchain so node-gyp rebuild succeeds
  3. Stay on the previous sqlite-level version

Tina-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 .nvmrc bump from v20 to v22 in tinacms/tinacms is recommended alongside the consumption of the new sqlite-level release so the publish.yml workflow 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.0 still 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-sqlite3 resolves to 12.10.0.
  • pnpm install --frozen-lockfile — clean.
  • pnpm test66 / 66 tests pass.
  • pnpm types — clean.
  • pnpm build — clean (tsc exit 0).
  • Changeset added as minor (consumer-visible: prebuild matrix shifts; Node 18/20/23 dropped).

Trade-off summary

Before this PR (sqlite-level@2.0.0better-sqlite3@11.x) After this PR (sqlite-level@2.1.0better-sqlite3@12.10.0)
Node 24 (current LTS) install ❌ Broken (#6686) ✅ Works
Node 20 (EOL'd 2026-04-30) install ✅ Works ❌ Broken
Node 22 (LTS) install ✅ Works ✅ Works

Net: trades install support for an EOL Node line in exchange for the current LTS.

Downstream PRs blocked on this

  • tinacms/tinacms#6905 — bump tinacms's .nvmrc from v20 to v22 (Node 20 EOL)
  • tinacms/tinacms#6848 — bump sqlite-level in @tinacms/search's catalog after this releases
  • Tinacloud content-api will get a parallel direct-dep bump after this releases (replacing the earlier closed #3531)

🤖 Generated with Claude Code

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-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: 2067739

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sqlite-level Minor

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

@github-actions
Copy link
Copy Markdown
Contributor

📦 Tagged Release Published

Your tagged PR has been published! You can install the packages using their version tags:

pnpm add sqlite-level@0.0.0-20260518072106

Published Packages:

  • sqlite-level@0.0.0-20260518072106

View on npm:

Commit: 0631efbf94454c5b29f82e070a2e7bfec3c0f1b1

…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>
@github-actions
Copy link
Copy Markdown
Contributor

📦 Tagged Release Published

Your tagged PR has been published! You can install the packages using their version tags:

pnpm add sqlite-level@0.0.0-20260518072510

Published Packages:

  • sqlite-level@0.0.0-20260518072510

View on npm:

Commit: 07d7c04731f5780dd1d2054016a4dc7836559a92

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>
@github-actions
Copy link
Copy Markdown
Contributor

📦 Tagged Release Published

Your tagged PR has been published! You can install the packages using their version tags:

pnpm add sqlite-level@0.0.0-20260518073343

Published Packages:

  • sqlite-level@0.0.0-20260518073343

View on npm:

Commit: 134bfbd5d8a613b667f68ff3b90207bcb42b6588

kulesy added a commit to tinacms/tinacms that referenced this pull request May 19, 2026
## 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>
Copy link
Copy Markdown
Contributor

@18-th 18-th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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>
@kulesy kulesy changed the title chore: bump better-sqlite3 to ^12.9.0 for Node 24 prebuilt support chore: bump better-sqlite3 to ^12.10.0 for Node 24 prebuilt support May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📦 Tagged Release Published

Your tagged PR has been published! You can install the packages using their version tags:

pnpm add sqlite-level@0.0.0-20260519050140

Published Packages:

  • sqlite-level@0.0.0-20260519050140

View on npm:

Commit: 18ce207e8a9e4d244590366075c61b61eeab7484

@kulesy kulesy merged commit a6b1120 into main May 19, 2026
5 checks passed
kulesy added a commit to tinacms/tinacms that referenced this pull request May 19, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants