diff --git a/.github/deployment/node/Dockerfile b/.github/deployment/node/Dockerfile index b2a0d442bb..bd0ab7d514 100644 --- a/.github/deployment/node/Dockerfile +++ b/.github/deployment/node/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-bookworm-slim +FROM node:20-bookworm-slim COPY ./packages/backend/server /app COPY ./packages/frontend/core/dist /app/static diff --git a/.github/deployment/self-host/compose.yaml b/.github/deployment/self-host/compose.yaml index fa95f5bd32..05829df93d 100644 --- a/.github/deployment/self-host/compose.yaml +++ b/.github/deployment/self-host/compose.yaml @@ -23,7 +23,7 @@ services: max-size: '1000m' restart: unless-stopped environment: - - NODE_OPTIONS=--es-module-specifier-resolution node + - NODE_OPTIONS="--es-module-specifier-resolution=node" - AFFINE_CONFIG_PATH=/root/.affine/config - REDIS_SERVER_HOST=redis - DATABASE_URL=postgres://affine:affine@postgres:5432/affine diff --git a/.nvmrc b/.nvmrc index 3c032078a4..209e3ef4b6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 +20 diff --git a/package.json b/package.json index f657c6cc0a..5187cc0b1d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "tests/affine-legacy/*" ], "engines": { - "node": ">=18.16.1 <19.0.0" + "node": "<21.0.0" }, "scripts": { "dev": "dev-core", diff --git a/packages/backend/server/package.json b/packages/backend/server/package.json index 69ec5e2bc5..979b85b6d5 100644 --- a/packages/backend/server/package.json +++ b/packages/backend/server/package.json @@ -9,13 +9,13 @@ }, "scripts": { "build": "tsc", - "start": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution node ./src/index.ts", + "start": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution=node ./src/index.ts", "dev": "nodemon ./src/index.ts", "test": "ava --concurrency 1 --serial", "test:coverage": "c8 ava --concurrency 1 --serial", "postinstall": "prisma generate", - "data-migration": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution node ./src/data/index.ts", - "predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution node ./dist/data/index.js run" + "data-migration": "node --loader ts-node/esm/transpile-only.mjs --es-module-specifier-resolution=node ./src/data/index.ts", + "predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution=node ./dist/data/index.js run" }, "dependencies": { "@apollo/server": "^4.9.5", @@ -126,8 +126,7 @@ "--trace-sigint", "--loader", "ts-node/esm/transpile-only.mjs", - "--es-module-specifier-resolution", - "node" + "--es-module-specifier-resolution=node" ], "files": [ "tests/**/*.spec.ts", @@ -153,8 +152,7 @@ "nodeArgs": [ "--loader", "ts-node/esm.mjs", - "--es-module-specifier-resolution", - "node" + "--es-module-specifier-resolution=node" ], "ignore": [ "**/__tests__/**", diff --git a/packages/frontend/native/package.json b/packages/frontend/native/package.json index bde4586553..81e6e7eefb 100644 --- a/packages/frontend/native/package.json +++ b/packages/frontend/native/package.json @@ -24,8 +24,7 @@ "nodeArguments": [ "--loader", "ts-node/esm.mjs", - "--es-module-specifier-resolution", - "node" + "--es-module-specifier-resolution=node" ], "files": [ "__tests__/*.spec.mts"