From f3249ac131cb519225f371bdfb74951080298ded Mon Sep 17 00:00:00 2001 From: barthofu Date: Wed, 21 Feb 2024 00:13:04 +0000 Subject: [PATCH] chore(#129): bump node version (20.10.0 lts) --- .docker/app/Dockerfile | 4 ++-- .github/workflows/build.yml | 2 +- package-lock.json | 4 ++-- package.json | 16 ++++++++-------- tsconfig.json | 9 ++++----- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.docker/app/Dockerfile b/.docker/app/Dockerfile index 023b0fbc..cf187b11 100644 --- a/.docker/app/Dockerfile +++ b/.docker/app/Dockerfile @@ -1,5 +1,5 @@ ## build runner -FROM node:16.17-buster-slim as build-runner +FROM node:20.10-buster-slim as build-runner # Set temp directory WORKDIR /tmp/app @@ -19,7 +19,7 @@ COPY tsconfig.json . RUN npm run build ## producation runner -FROM node:16.17-buster-slim as prod-runner +FROM node:20.10-buster-slim as prod-runner # set production mode ARG NODE_ENV=production diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0482326..90310f5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.17.0 + node-version: 20.10.0 cache: 'npm' - name: Install dependencies diff --git a/package-lock.json b/package-lock.json index c7640cd0..73376402 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,8 +96,8 @@ "typescript": "~4.9.5" }, "engines": { - "node": ">=16.9.0", - "npm": ">=8.0.0" + "node": ">=20.10.0", + "npm": ">=10.2.3" } }, "node_modules/@aws-crypto/ie11-detection": { diff --git a/package.json b/package.json index 33935c05..c0be8087 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "install:plugins": "installoop --rootDir=./build/plugins", "type:check": "tsc --pretty --skipLibCheck --noEmit", "start": "cross-env NODE_ENV=production node build/main.js", - "dev": "cross-env NODE_ENV=development nodemon --exec node --loader ts-node/esm/transpile-only src/main.ts", - "dev:start": "cross-env NODE_ENV=production node --loader ts-node/esm/transpile-only src/main.ts", + "dev": "cross-env NODE_ENV=development nodemon --exec node -r ts-node/register/transpile-only src/main.ts", + "dev:start": "cross-env NODE_ENV=production node -r ts-node/register/transpile-only src/main.ts", "i18n": "typesafe-i18n", "migration:create": "npx mikro-orm migration:create", "migration:up": "npx mikro-orm migration:up", @@ -104,13 +104,16 @@ "plop": "^2.7.6", "rimraf": "~3.0.2", "ts-node": "~10.9.1", - "tsc-alias": "~1.8.5", + "tsc-alias": "~1.8.8", "tsconfig-paths": "~4.2.0", "typescript": "~4.9.5" }, "engines": { - "node": ">=16.9.0", - "npm": ">=8.0.0" + "node": ">=20.10.0", + "npm": ">=10.2.3" + }, + "volta": { + "node": "20.10.0" }, "mikro-orm": { "useTsNode": true, @@ -119,9 +122,6 @@ "./build/mikro-orm.config.js" ] }, - "volta": { - "node": "16.17.0" - }, "nodemonConfig": { "ignore": [ "src/i18n/**/!(i18n-types.ts)" diff --git a/tsconfig.json b/tsconfig.json index 283df888..4cdd0c85 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,19 +3,18 @@ "target": "es2021", "module": "commonjs", + "esModuleInterop": true, + "moduleResolution": "node", "outDir": "build", "rootDir": "src", + "resolveJsonModule": true, + "strict": true, "strictPropertyInitialization": false, - "moduleResolution": "node", "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "experimentalDecorators": true, "emitDecoratorMetadata": true, - "esModuleInterop": true, - "skipLibCheck": false, "forceConsistentCasingInFileNames": true,