From 3d52ffc15280c2c2b186986cf909b11bb30e521f Mon Sep 17 00:00:00 2001 From: dtzp555-max Date: Tue, 5 May 2026 09:53:46 +1000 Subject: [PATCH] chore(deps): bump engines to >=22.5 to match node:sqlite usage in keys.mjs (#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OCP uses Node.js built-in SQLite (`node:sqlite`) in keys.mjs:3 for the LAN-mode key store. The `node:sqlite` module is only available in: - Node 22.5.0+ behind --experimental-sqlite flag - Node 23.0.0+ without any flag (fully stable) The previous `engines: ">=18"` was inaccurate and would have caused opaque "Cannot find module 'node:sqlite'" failures for users on Node 18-22.4 the moment LAN mode (multi-key) was enabled. Changes: - package.json: engines.node ">=18" → ">=22.5" - README.md: prerequisite "Node.js 18+" → "Node.js 22.5+ (Node 23+ recommended …)" with a one-line note explaining the flag distinction so users on 22.x know they may need --experimental-sqlite. Verification: - Source usage of node:sqlite confirmed via grep: keys.mjs:3 (`import { DatabaseSync } from "node:sqlite";`). - Local node --version = v25.8.0 (well above 22.5); `npm install` exit 0 with no engine-mismatch warning. - No other source file imports node:sqlite (single point of usage). Refs: audit side-finding 2 of 4. Co-authored-by: dtzp555 Co-authored-by: Claude Opus 4.7 --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 292283d..dec9bfd 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ OCP has two roles: **Server** (runs the proxy, needs Claude CLI) and **Client** > **Recommended:** Install OCP on a device that stays powered on — Mac mini, NAS, Raspberry Pi, or a desktop that doesn't sleep. This ensures all clients always have access. **Prerequisites:** -- Node.js 18+ +- Node.js 22.5+ (Node 23+ recommended — `node:sqlite` is fully stable without flags from 23.0; on 22.5–22.x it works behind `--experimental-sqlite`) - [Claude CLI](https://docs.anthropic.com/en/docs/claude-cli) installed and authenticated (`claude auth login`) ```bash diff --git a/package.json b/package.json index d3c2224..6a6a63d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=22.5" }, "repository": { "type": "git",