Repository navigation
Require a Node.js whose SQLite has full-text search; make the built CLI executable - #16
Merged
Merged
Conversation
…lt CLI executable Search needs SQLite's FTS5. Node bundles SQLite with it only from 22.16.0 in the 22 line and from 24.0.0 (nodejs/node#57621); no Node 23 release has it, so Homebrew's node 23.11 failed 21 search tests with "no such module: fts5". - engines is now ^22.16.0 || >=24, and one rule (src/util/node-support.ts) drives the CLI's start-up check, `wheems service install` and doctor, with a message naming the versions that work. - Doctor checks that this Node's SQLite can create an FTS5 table, since builds that use the system's SQLite can lack it whatever their version. - Search checks the same before opening an index and says so plainly instead of failing inside SQLite. No fallback search: a second keyword search for unsupported Node builds isn't worth keeping. The build now runs scripts/make-executable.ts after tsc, marking every bin executable, so `npm link`ed wheems runs instead of "Permission denied". Checked by hand on Node 23.11.0 (refused, no FTS5), 21.7.3 (refused, too old) and 22.23.2 / 22.23.4 (FTS5 present, runs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
Merged
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.
Fixes the two bugs found while publishing 0.0.1.
1. Search needs SQLite FTS5, and some supported Node versions lack it
Cause. Node only bundles SQLite with FTS5 from 22.16.0 in the 22 line and from 24.0.0. It came with nodejs/node#57621, "sqlite: enable common flags", which is in the v22 and v24 changelogs. No Node 23 release has it. So Homebrew's
node23.11.0 fails search withno such module: fts5, andengines: >=22.13allowed it. Node builds that link the system's SQLite can also lack FTS5, whatever their version.Fix:
enginesis now^22.16.0 || >=24.src/util/node-support.ts, drives the CLI's start-up check,wheems service installand doctor. Its message names the versions that work, for example: "Node.js 23.11.0 can't run Wheems: no Node 23 release has SQLite full-text search, which Wheems's search needs. Use Node.js 22.16 or later in the 22 line, or 24 or later."Node versions checked on this Mac:
node, bundled SQLite)no such module: fts5node:sqlitenode@22, Homebrew's SQLite)The 22.16 and 24.0 boundaries come from Node's changelogs. They were not run here.
2. The built CLI wasn't executable
tscwritesdist/cli/main.jswithout the executable bit, so awheemslinked withnpm linkfailed with "Permission denied".npm run buildnow runsscripts/make-executable.tsaftertsc, which marks everybinentry executable.Tests
sync,rebuildandsearchwith the plain message.binentries executable, and the build andengineswiring.npm run checkpasses: 371 tests. Vasquez passed with no findings.Docs updated: README, getting started, and the changelog (under Unreleased).
🤖 Generated with Claude Code