diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0b352283..38785a2f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,10 @@ updates: schedule: interval: weekly open-pull-requests-limit: 5 + # the Node major moves by hand, with .nvmrc and the Dockerfiles + ignore: + - dependency-name: "@types/node" + update-types: ["version-update:semver-major"] groups: # one PR for all minor/patch bumps npm-minor-patch: @@ -53,6 +57,9 @@ updates: - "/dinov2" schedule: interval: weekly + ignore: + - dependency-name: node + update-types: ["version-update:semver-major"] groups: docker: patterns: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 09e13e40..e40a8532 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: '24' + node-version-file: .nvmrc cache: npm cache-dependency-path: | package-lock.json @@ -76,7 +76,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: '24' + node-version-file: .nvmrc cache: npm cache-dependency-path: | package-lock.json @@ -157,7 +157,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: '24' + node-version-file: .nvmrc cache: npm cache-dependency-path: | package-lock.json diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..6f4247a6 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +26 diff --git a/AGENTS.md b/AGENTS.md index 0f527bf6..dfcdbb0f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,7 @@ hand-roll what a project tool produces. ## Stack -NestJS · Prisma (PostgreSQL) · Jest · worker threads for image work. Node `>=24.15`. +NestJS · Prisma (PostgreSQL) · Jest · worker threads for image work. Node `>=26`. ## Database: Prisma only diff --git a/README.md b/README.md index 75865bf0..b75ff68f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Local setup -- Install Node `24` (LTS), 24.15 or newer +- Install Node `26` (LTS); `nvm use` picks it up from `.nvmrc` - clone repo - Update `.env` and `prisma/.env` (`DATABASE_URL` in `prisma/.env` must match the `POSTGRES_*` values in `.env`) - Start Postgres `docker compose up -d postgres` diff --git a/package-lock.json b/package-lock.json index 24799e80..39cfd87b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "@types/express": "^5.0.6", "@types/jest": "^30.0.0", "@types/multer": "^2.0.0", - "@types/node": "^24.19.2", + "@types/node": "^26.6.6", "@types/passport-jwt": "^4.0.1", "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.5", @@ -79,7 +79,7 @@ "typescript": "~6.0.3" }, "engines": { - "node": ">=24.15" + "node": ">=26" } }, "node_modules/@angular-devkit/core": { @@ -5119,12 +5119,12 @@ } }, "node_modules/@types/node": { - "version": "24.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", - "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", "license": "MIT", "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" + "undici-types": "~8.9.0" } }, "node_modules/@types/passport": { @@ -14586,9 +14586,9 @@ } }, "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", "license": "MIT" }, "node_modules/unicode-emoji-modifier-base": { diff --git a/package.json b/package.json index 574dce1d..dd15d415 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "typecheck": "tsc --noEmit -p tsconfig.json" }, "engines": { - "node": ">=24.15" + "node": ">=26" }, "dependencies": { "@aws-sdk/client-s3": "^3.1160.0", @@ -79,7 +79,7 @@ "@types/express": "^5.0.6", "@types/jest": "^30.0.0", "@types/multer": "^2.0.0", - "@types/node": "^24.19.2", + "@types/node": "^26.6.6", "@types/passport-jwt": "^4.0.1", "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.5", diff --git a/prisma/package-lock.json b/prisma/package-lock.json index 6bd10c39..9f9a5c83 100644 --- a/prisma/package-lock.json +++ b/prisma/package-lock.json @@ -26,7 +26,7 @@ "typescript": "~6.0.3" }, "engines": { - "node": ">=24.15" + "node": ">=26" } }, "node_modules/@babel/code-frame": { diff --git a/prisma/package.json b/prisma/package.json index 1a8cc4a2..2702cf0d 100644 --- a/prisma/package.json +++ b/prisma/package.json @@ -27,7 +27,7 @@ "typescript": "~6.0.3" }, "engines": { - "node": ">=24.15" + "node": ">=26" }, "allowScripts": { "prisma": true, diff --git a/src/compare/diff-worker-pool.ts b/src/compare/diff-worker-pool.ts index ac5a136f..42f0fdf2 100644 --- a/src/compare/diff-worker-pool.ts +++ b/src/compare/diff-worker-pool.ts @@ -137,7 +137,7 @@ export class DiffWorkerPool implements OnApplicationShutdown { }); worker.on('error', (error) => { this.logger.error(`Image diff worker crashed: ${error}`); - this.replace(worker, error); + this.replace(worker, error as Error); }); worker.on('exit', (code) => this.replace(worker, new Error(`Image diff worker exited with code ${code}`))); this.workers.push(worker);