Node 22 makes node:sqlite importable (isBuiltin() returns true) but doesn't
list it in module.builtinModules, which Vite/Rolldown use to decide what to
externalize instead of bundle. That made the whole Vitest run fail on CI
("Cannot bundle Node.js built-in node:sqlite") even after pinning Node 22.
Root-caused by reproducing directly in node:22 vs node:24 Linux containers on
the VPS. Bumped ci.yml/release.yml/sonarqube.yml and package.json engines to
Node 24, and verified 473/473 tests pass in a real Linux Node 24 container.
Also:
- Exclude coachStore.ts/memory/store.ts/meetingStore.ts from coverage.include:
Vitest's coverage-v8 still tries to transform them via Vite's "client"
environment (which can't bundle Node builtins at all) when establishing the
baseline for unimported files, independently of the Node 22/24 issue above.
- Fix tests/unit/captureWorker.test.ts: hardcoded Windows path separator in
an expectation didn't match path.join's output on Linux.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [develop, main]
|
|
pull_request:
|
|
branches: [develop, main]
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
# node:sqlite (coachStore.ts, memory/store.ts, meetingStore.ts) exige Node >= 22.5, mais
|
|
# Vite/Rolldown ne le reconnaissent comme built-in qu'a partir de Node 24 (absent de
|
|
# module.builtinModules avant, bien que isBuiltin() le reconnaisse deja) : sous Node 22,
|
|
# la transformation plante avec "Cannot bundle Node.js built-in node:sqlite".
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: TypeScript check
|
|
run: npm run typecheck
|
|
|
|
- name: ESLint
|
|
run: npm run lint
|
|
|
|
- name: Unit tests + coverage
|
|
run: npm run test:coverage
|
|
|
|
- name: Security audit
|
|
run: npm audit --audit-level=high
|