From 8961f5b18c0612f70abb344fd86f85f037a030a4 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Mon, 16 Feb 2026 17:33:26 -0600 Subject: [PATCH] chore: upgrade Node.js runtime to v24 across codebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update .woodpecker/codex-review.yml: node:22-slim → node:24-slim - Update packages/cli-tools engines: >=18 → >=24.0.0 - Update README.md, CONTRIBUTING.md, prerequisites docs to reference Node 24+ - Rename eslint.config.js → eslint.config.mjs to eliminate Node 24 MODULE_TYPELESS_PACKAGE_JSON warnings (ESM detection overhead) - Add .nvmrc targeting Node 24 - Fix pre-existing no-unsafe-return lint error in matrix-room.service.ts - Add Campsite Rule to CLAUDE.md - Regenerate Prisma client for Node 24 compatibility All Dockerfiles and main CI pipelines already used node:24. This commit aligns the remaining stragglers (codex-review CI, cli-tools engines, documentation) and resolves Node 24 ESM module detection warnings. Quality gates: lint ✅ typecheck ✅ tests ✅ (6 pre-existing API failures) Co-Authored-By: Claude Opus 4.6 --- .nvmrc | 1 + .woodpecker/codex-review.yml | 2 +- CLAUDE.md | 22 +++++++++++++++++++ README.md | 2 +- .../{eslint.config.js => eslint.config.mjs} | 0 .../src/bridge/matrix/matrix-room.service.ts | 5 ++++- .../{eslint.config.js => eslint.config.mjs} | 0 .../{eslint.config.js => eslint.config.mjs} | 0 .../2-installation/1-prerequisites.md | 20 ++++++++--------- docs/CONTRIBUTING.md | 4 ++-- packages/cli-tools/package.json | 2 +- .../{eslint.config.js => eslint.config.mjs} | 0 12 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 .nvmrc rename apps/api/{eslint.config.js => eslint.config.mjs} (100%) rename apps/orchestrator/{eslint.config.js => eslint.config.mjs} (100%) rename apps/web/{eslint.config.js => eslint.config.mjs} (100%) rename packages/shared/{eslint.config.js => eslint.config.mjs} (100%) diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/.woodpecker/codex-review.yml b/.woodpecker/codex-review.yml index ee552bb..720ae70 100644 --- a/.woodpecker/codex-review.yml +++ b/.woodpecker/codex-review.yml @@ -12,7 +12,7 @@ when: event: pull_request variables: - - &node_image "node:22-slim" + - &node_image "node:24-slim" - &install_codex "npm i -g @openai/codex" steps: diff --git a/CLAUDE.md b/CLAUDE.md index c668860..a941f56 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -475,3 +475,25 @@ Related Repositories --- Mosaic Stack v0.0.x — Building the future of personal assistants. + +## Campsite Rule (MANDATORY) + +If you modify a line containing a policy violation, you MUST either: + +1. **Fix the violation properly** in the same change, OR +2. **Flag it as a deferred item** with documented rationale + +**"It was already there" is NEVER an acceptable justification** for perpetuating a violation in code you touched. Touching it makes it yours. + +Examples of violations you must fix when you touch the line: + +- `as unknown as Type` double assertions — use type guards instead +- `any` types — narrow to `unknown` with validation or define a proper interface +- Missing error handling — add it if you're modifying the surrounding code +- Suppressed linting rules (`// eslint-disable`) — fix the underlying issue + +If the proper fix is too large for the current scope, you MUST: + +- Create a TODO comment with issue reference: `// TODO(#123): Replace double assertion with type guard` +- Document the deferral in your PR/commit description +- Never silently carry the violation forward diff --git a/README.md b/README.md index 893ca8b..6bc4fed 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ docker compose down If you prefer manual installation, you'll need: - **Docker mode:** Docker 24+ and Docker Compose -- **Native mode:** Node.js 22+, pnpm 10+, PostgreSQL 17+ +- **Native mode:** Node.js 24+, pnpm 10+, PostgreSQL 17+ The installer handles these automatically. diff --git a/apps/api/eslint.config.js b/apps/api/eslint.config.mjs similarity index 100% rename from apps/api/eslint.config.js rename to apps/api/eslint.config.mjs diff --git a/apps/api/src/bridge/matrix/matrix-room.service.ts b/apps/api/src/bridge/matrix/matrix-room.service.ts index e7d13e4..8c79dce 100644 --- a/apps/api/src/bridge/matrix/matrix-room.service.ts +++ b/apps/api/src/bridge/matrix/matrix-room.service.ts @@ -93,7 +93,10 @@ export class MatrixRoomService { select: { matrixRoomId: true }, }); - return workspace?.matrixRoomId ?? null; + if (!workspace) { + return null; + } + return workspace.matrixRoomId ?? null; } /** diff --git a/apps/orchestrator/eslint.config.js b/apps/orchestrator/eslint.config.mjs similarity index 100% rename from apps/orchestrator/eslint.config.js rename to apps/orchestrator/eslint.config.mjs diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.mjs similarity index 100% rename from apps/web/eslint.config.js rename to apps/web/eslint.config.mjs diff --git a/docs/1-getting-started/2-installation/1-prerequisites.md b/docs/1-getting-started/2-installation/1-prerequisites.md index 7b75ef5..1b4044a 100644 --- a/docs/1-getting-started/2-installation/1-prerequisites.md +++ b/docs/1-getting-started/2-installation/1-prerequisites.md @@ -4,26 +4,26 @@ Required and optional software for Mosaic Stack development. ## Required -### Node.js 20+ +### Node.js 24+ ```bash # Install using nvm (recommended) -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash -nvm install 20 -nvm use 20 +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash +nvm install 24 +nvm use 24 # Verify installation -node --version # Should be v20.x.x +node --version # Should be v24.x.x ``` -### pnpm 9+ +### pnpm 10+ ```bash # Install globally -npm install -g pnpm@9 +npm install -g pnpm@10 # Verify installation -pnpm --version # Should be 9.x.x +pnpm --version # Should be 10.x.x ``` ### PostgreSQL 17+ @@ -158,8 +158,8 @@ Configure `OLLAMA_MODE=remote` and `OLLAMA_ENDPOINT` in `.env`. Check all required tools are installed: ```bash -node --version # v20.x.x or higher -pnpm --version # 9.x.x or higher +node --version # v24.x.x or higher +pnpm --version # 10.x.x or higher git --version # 2.x.x or higher docker --version # 24.x.x or higher (if using Docker) psql --version # 17.x.x or higher (if using native PostgreSQL) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 1087bca..f5861ae 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -16,8 +16,8 @@ Thank you for your interest in contributing to Mosaic Stack! This document provi ### Prerequisites -- **Node.js:** 20.0.0 or higher -- **pnpm:** 10.19.0 or higher (package manager) +- **Node.js:** 24.0.0 or higher +- **pnpm:** 10.0.0 or higher (package manager) - **Docker:** 20.10+ and Docker Compose 2.x+ (for database services) - **Git:** 2.30+ for version control diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index 42da22e..e062c19 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -38,7 +38,7 @@ "orchestration" ], "engines": { - "node": ">=18" + "node": ">=24.0.0" }, "os": [ "linux", diff --git a/packages/shared/eslint.config.js b/packages/shared/eslint.config.mjs similarity index 100% rename from packages/shared/eslint.config.js rename to packages/shared/eslint.config.mjs