Repository navigation
sqlite: enable common flags - #57621
Conversation
|
Review requested:
|
|
Not sure whether this will be a problem, but this increases the binary size by 600KB. |
e4b93b9 to
9590dee
Compare
cjihrig
left a comment
There was a problem hiding this comment.
Not saying whether or not we should land this, but https://github.com/nodejs/node/blob/main/deps/sqlite/unofficial.gni should be updated, and there should be at least one test for each new API to prevent regressions.
Good point. Also, I think it would be good to have some benchmarks on sqlite implementations. |
9590dee to
0c1ec86
Compare
@cjihrig , what's the difference between .gyp and .gni file? |
0c1ec86 to
31c5aa5
Compare
They are for two different build systems. The .gyp file is used by the official build. The .gni file is used by the unofficial GN build. |
Thank you! |
Why not? And why not the Geopoly extension? |
For |
On the other hand, the issue mentions the SQLite Amalgamation. I think we could have RBU enabled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57621 +/- ##
==========================================
+ Coverage 90.22% 90.23% +0.01%
==========================================
Files 630 630
Lines 185054 185055 +1
Branches 36254 36219 -35
==========================================
+ Hits 166963 166985 +22
- Misses 11032 11037 +5
+ Partials 7059 7033 -26 🚀 New features to boost your workflow:
|
31c5aa5 to
3f64dfa
Compare
cjihrig
left a comment
There was a problem hiding this comment.
One comment, but changes LGTM.
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
| ); | ||
| }); | ||
|
|
||
| test('fts3 parenthesis', (t) => { |
There was a problem hiding this comment.
This is inconsistent with the rest, missing is enabled in its name.
cjihrig
left a comment
There was a problem hiding this comment.
Still unsure whether or not we want all of these enabled, but giving this a LGTM so it's not stalled.
PR-URL: #57621 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
More common flags that are missing are |
node:sqlite only ships FTS5 compiled in by default starting at Node 22.16.0 (nodejs/node#57621), not 22.13 as previously declared. Below that patch, the first `bound index` call throws `no such module: fts5` from saveFunctionGraph. This had been silently broken since 0.1.0 shipped -- CI itself was pinned to 22.13.x and had been red since the first public push. Found while validating the new release workflow against a real GitHub Actions runner. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* coverage.yml: stop pinning to .nvmrc's exact floor version Discovered why the workflow failed after merging: node:sqlite only gained FTS5 support in Node 22.16.0 (nodejs/node#57621, verified). This repo's stated floor (.nvmrc/engines.node: >=22.13.0) predates that, so pinning to it exactly makes test/organize.test.js's index-db-backed tests throw 'no such module: fts5' — a real, pre-existing gap ci.yml never caught because it floats to whatever '22.x' currently resolves to (22.23.2), not the literal floor. This commit only fixes the coverage workflow (match ci.yml's floating 22.x). Whether to bump the actual floor to >=22.16.0 is a separate, bigger decision — left to the maintainer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Bump the Node floor to >=22.16.0, where node:sqlite FTS5 actually works .nvmrc, package.json/package-lock.json's engines.node, README's badge + Requirements line, and CONTRIBUTING.md's Requirements all bumped 22.13 -> 22.16. Now that the floor genuinely has FTS5, coverage.yml's workaround from the previous commit (floating '22.x' instead of node-version-file: .nvmrc) is unnecessary — reverted back to .nvmrc, which is now correct again and will keep tracking whatever this repo's floor actually is. npm install also picked up a pre-existing, unrelated drift in package-lock.json's own version field (0.1.0 -> 0.1.5, matching package.json — lockfile just hadn't been regenerated in a while). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
CI on Node 22.13.0 failed with "no such module: fts5": Node only compiles its bundled SQLite with FTS5 since 22.16.0 (nodejs/node#57621). Raise engines and the CI floor to match. On a Node without FTS5, openDb now says which version is needed instead of surfacing SQLite's error. Also rewords the message shown when another install's bridge holds the port. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* ci: add GitHub Actions publish (Trusted Publishing/OIDC) + version-bump, Git Flow docs, root AGENTS.md (#12) - publish.yml: on push to main, publish only when version is unpublished; authenticate via npm Trusted Publishing (OIDC, id-token: write, no NPM_TOKEN); upgrade npm to >=11.5.1 on Node 22.14; three-file version gate; tag vX.Y.Z. - version-bump.yml: workflow_dispatch patch/minor/major, sync 3 version files + lockfile, open PR targeting dev. - package.json: add repository field (required for Trusted Publishing). - docs/branch-strategy.md (new, English), root AGENTS.md (new, references it). - docs/releasing.md and releasing_ja.md: rewrite to the CI + OIDC flow. * fix(ci): pin npm upgrade to npm@^11 in publish workflow (#14) npm@latest is now 12.x, which requires Node ^22.22.2 and fails with EBADENGINE on the Node 22.14 the workflow pins, breaking the publish run. npm@11 (11.21.x) satisfies the Trusted Publishing floor (>=11.5.1) and supports Node >=22.9.0, so it works on Node 22.14. * fix(ci): bump publish workflow Node to 22.22 for node:sqlite FTS5 The publish workflow pinned node-version '22.14', whose bundled node:sqlite has no FTS5 (enabled upstream in Node 24.0.0 via nodejs/node#57621 and backported to 22.16). On 22.14 every board/ticket test aborts with 'no such module: fts5', so the Test step fails before publish can run. Verified by hand: FTS5 is absent on 22.14/22.15 and present from 22.16 onward (22.16/22.22/24 all OK). Pin to 22.22; it keeps npm@^11 (needs Node >= 22.9.0) working and the full suite passes 417/417 on linux Node 22.22.
* ci: add GitHub Actions publish (Trusted Publishing/OIDC) + version-bump, Git Flow docs, root AGENTS.md (#12) - publish.yml: on push to main, publish only when version is unpublished; authenticate via npm Trusted Publishing (OIDC, id-token: write, no NPM_TOKEN); upgrade npm to >=11.5.1 on Node 22.14; three-file version gate; tag vX.Y.Z. - version-bump.yml: workflow_dispatch patch/minor/major, sync 3 version files + lockfile, open PR targeting dev. - package.json: add repository field (required for Trusted Publishing). - docs/branch-strategy.md (new, English), root AGENTS.md (new, references it). - docs/releasing.md and releasing_ja.md: rewrite to the CI + OIDC flow. * fix(ci): pin npm upgrade to npm@^11 in publish workflow (#14) npm@latest is now 12.x, which requires Node ^22.22.2 and fails with EBADENGINE on the Node 22.14 the workflow pins, breaking the publish run. npm@11 (11.21.x) satisfies the Trusted Publishing floor (>=11.5.1) and supports Node >=22.9.0, so it works on Node 22.14. * fix(ci): bump publish workflow Node to 22.22 for node:sqlite FTS5 The publish workflow pinned node-version '22.14', whose bundled node:sqlite has no FTS5 (enabled upstream in Node 24.0.0 via nodejs/node#57621 and backported to 22.16). On 22.14 every board/ticket test aborts with 'no such module: fts5', so the Test step fails before publish can run. Verified by hand: FTS5 is absent on 22.14/22.15 and present from 22.16 onward (22.16/22.22/24 all OK). Pin to 22.22; it keeps npm@^11 (needs Node >= 22.9.0) working and the full suite passes 417/417 on linux Node 22.22. * chore: pin npx lockage invocations to the package version (#19) * feat: pin npx lockage invocations to the package version and add sync:versions Extract readPackageVersion into src/version.ts, pin the 3 MCP defs and 4 static hook defs to lockage@0.9.4, embed lockage@${version} in setup-kiro.ts generated hooks, and add scripts/sync-versions.ts (--check fail-closed + rewrite) with a sync:versions npm script. Supply-chain hardening: an installed config keeps invoking a known version instead of latest. * test: add fail-closed pin gate and update tests to pinned npx form * docs: document the pinned npx policy and sync it in version-bump CI * docs: state the branch-off-dev / PR-to-dev flow in AGENTS.md (#20)
* ci: add GitHub Actions publish (Trusted Publishing/OIDC) + version-bump, Git Flow docs, root AGENTS.md (#12) - publish.yml: on push to main, publish only when version is unpublished; authenticate via npm Trusted Publishing (OIDC, id-token: write, no NPM_TOKEN); upgrade npm to >=11.5.1 on Node 22.14; three-file version gate; tag vX.Y.Z. - version-bump.yml: workflow_dispatch patch/minor/major, sync 3 version files + lockfile, open PR targeting dev. - package.json: add repository field (required for Trusted Publishing). - docs/branch-strategy.md (new, English), root AGENTS.md (new, references it). - docs/releasing.md and releasing_ja.md: rewrite to the CI + OIDC flow. * fix(ci): pin npm upgrade to npm@^11 in publish workflow (#14) npm@latest is now 12.x, which requires Node ^22.22.2 and fails with EBADENGINE on the Node 22.14 the workflow pins, breaking the publish run. npm@11 (11.21.x) satisfies the Trusted Publishing floor (>=11.5.1) and supports Node >=22.9.0, so it works on Node 22.14. * fix(ci): bump publish workflow Node to 22.22 for node:sqlite FTS5 The publish workflow pinned node-version '22.14', whose bundled node:sqlite has no FTS5 (enabled upstream in Node 24.0.0 via nodejs/node#57621 and backported to 22.16). On 22.14 every board/ticket test aborts with 'no such module: fts5', so the Test step fails before publish can run. Verified by hand: FTS5 is absent on 22.14/22.15 and present from 22.16 onward (22.16/22.22/24 all OK). Pin to 22.22; it keeps npm@^11 (needs Node >= 22.9.0) working and the full suite passes 417/417 on linux Node 22.22. * chore: pin npx lockage invocations to the package version (#19) * feat: pin npx lockage invocations to the package version and add sync:versions Extract readPackageVersion into src/version.ts, pin the 3 MCP defs and 4 static hook defs to lockage@0.9.4, embed lockage@${version} in setup-kiro.ts generated hooks, and add scripts/sync-versions.ts (--check fail-closed + rewrite) with a sync:versions npm script. Supply-chain hardening: an installed config keeps invoking a known version instead of latest. * test: add fail-closed pin gate and update tests to pinned npx form * docs: document the pinned npx policy and sync it in version-bump CI * docs: state the branch-off-dev / PR-to-dev flow in AGENTS.md (#20) * fix(ci): install deps before sync:versions in version-bump workflow (#22) The version-bump workflow failed in CI with exit 127 (tsx: not found): the 'Sync pinned npx versions' step runs 'npm run sync:versions' (tsx scripts/sync-versions.ts), but node_modules was never installed. Add an 'npm ci' step after Setup Node.js (matching publish.yml). Verification: - npm run typecheck: passed - npm test: 418 passing; 1 pre-existing failure in test/worktree.test.ts (git worktree ref/SHA assertion) reproduced on the clean baseline with this change stashed, so it is unrelated to this YAML-only edit. - YAML: no js-yaml/python-yaml available; validated by careful manual re-read (indentation and step structure match surrounding steps). * chore: bump version to v0.9.5 (patch) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
The first CI run on Node 22.13, the minimum package.json gave, failed every test that opens a database with "no such module: fts5": Node's bundled SQLite gained FTS5 in 22.16 (nodejs/node#57621), and StatementSync.columns(), which the Cloudflare adapter's test uses, arrived then too. The search index is FTS5, so the server couldn't start on 22.13 to 22.15. The stated minimum, the README and CI's oldest Node now say 22.16.
engines: ^22.16.0 || >=24.0.0 — node:sqlite gained FTS5 in 22.16.0 and 24.0.0 (nodejs/node#57621); 22.15.x and 23.x lack it. CI reads .nvmrc; Docker base pinned to node:26.13.0-slim.
This PR enables flags that are common to other sqlite players in Node.js ecosystem:
This is related to #56476, even though it does not enable the RBU extension.
I see this as a good step toward the stabilization since it will make it easier for people from other dependencies.