From daa38e407fccb436ab429b1f57728de2532311e6 Mon Sep 17 00:00:00 2001 From: Aura Date: Sat, 2 Nov 2024 10:25:10 +0100 Subject: [PATCH] chore(node): update to LTS v22 (#2686) --- .github/workflows/continuous-integration.yml | 12 ++++----- .github/workflows/update-tlds.yml | 4 +-- Dockerfile | 12 ++++----- package.json | 8 +++--- yarn.lock | 26 ++++++++++---------- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6b94a9dc19d..7be14fcd0e4 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,10 +15,10 @@ jobs: uses: actions/checkout@v4 - name: Add problem matchers run: echo "::add-matcher::.github/problemMatchers/eslint.json" - - name: Use Node.js v20 + - name: Use Node.js v22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: yarn - name: Install Dependencies run: yarn --immutable @@ -33,10 +33,10 @@ jobs: uses: actions/checkout@v4 - name: Add problem matchers run: echo "::add-matcher::.github/problemMatchers/tsc.json" - - name: Use Node.js v20 + - name: Use Node.js v22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: yarn - name: Install Dependencies run: yarn --immutable @@ -51,10 +51,10 @@ jobs: steps: - name: Checkout Project uses: actions/checkout@v4 - - name: Use Node.js v20 + - name: Use Node.js v22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: yarn - name: Install Dependencies run: yarn --immutable diff --git a/.github/workflows/update-tlds.yml b/.github/workflows/update-tlds.yml index 77f31e3c606..f98a2f53927 100644 --- a/.github/workflows/update-tlds.yml +++ b/.github/workflows/update-tlds.yml @@ -14,10 +14,10 @@ jobs: uses: actions/checkout@v4 with: token: ${{ secrets.SKYRA_TOKEN }} - - name: Use Node.js v20 + - name: Use Node.js v22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: yarn - name: Install Dependencies run: yarn --immutable diff --git a/Dockerfile b/Dockerfile index cf6b6a7e7f2..2261e3420eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ # Base Stage # # ================ # -FROM node:20-alpine as base +FROM node:22-alpine AS base WORKDIR /usr/src/app ENV YARN_DISABLE_GIT_HOOKS=1 ENV CI=true -RUN apk add --no-cache dumb-init python3 g++ make +RUN apk add --no-cache dumb-init g++ make python3 COPY --chown=node:node yarn.lock . COPY --chown=node:node package.json . @@ -22,7 +22,7 @@ ENTRYPOINT ["dumb-init", "--"] # Builder Stage # # ================ # -FROM base as builder +FROM base AS builder ENV NODE_ENV="development" @@ -30,9 +30,9 @@ COPY --chown=node:node tsconfig.base.json tsconfig.base.json COPY --chown=node:node prisma/ prisma/ COPY --chown=node:node src/ src/ -RUN yarn install --immutable -RUN yarn run prisma:generate -RUN yarn run build +RUN yarn install --immutable \ + && yarn run prisma:generate \ + && yarn run build # ================ # # Runner Stage # diff --git a/package.json b/package.json index e0339d5db85..bdbc680e3fc 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@types/backoff": "^2.5.5", "@types/diff": "^5.2.2", "@types/he": "^1.2.3", - "@types/node": "^20.11.17", + "@types/node": "^22.8.6", "@types/pg": "^8.11.8", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^7.13.0", @@ -118,14 +118,12 @@ "vitest": "^2.1.1" }, "resolutions": { - "@types/node": "20.11.5", "ansi-regex": "^5.0.1", "discord-api-types": "^0.37.98", "minimist": "^1.2.8" }, "engines": { - "node": "^20", - "npm": "^10.0.0" + "node": "^22.11.0" }, "repository": { "type": "git", @@ -148,6 +146,6 @@ "prettier": "@sapphire/prettier-config", "packageManager": "yarn@4.4.1", "volta": { - "node": "20.17.0" + "node": "22.11.0" } } diff --git a/yarn.lock b/yarn.lock index cac5d089bb4..03dd62af9d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1837,12 +1837,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:20.11.5": - version: 20.11.5 - resolution: "@types/node@npm:20.11.5" +"@types/node@npm:*, @types/node@npm:^22.8.6": + version: 22.8.6 + resolution: "@types/node@npm:22.8.6" dependencies: - undici-types: "npm:~5.26.4" - checksum: 10/9f31c471047d7b3e240ce7b77ff29b0d15e83be7e3feafb3d0b0d0931122b438b1eefa302a5a2e1e9849914ff3fd76aafbd8ccb372efb1331ba048da63bce6f8 + undici-types: "npm:~6.19.8" + checksum: 10/27bb73f033eeec05b4ed52dbc521cac28fb7ac14af267119c9bae0318c97848cd790ac7f0a65924ace7ea717eae62e91bd227da4bd6c0217d0016a7a6cd0a156 languageName: node linkType: hard @@ -5980,11 +5980,11 @@ __metadata: linkType: hard "nan@npm:^2.18.0": - version: 2.18.0 - resolution: "nan@npm:2.18.0" + version: 2.22.0 + resolution: "nan@npm:2.22.0" dependencies: node-gyp: "npm:latest" - checksum: 10/5520e22c64e2b5b495b1d765d6334c989b848bbe1502fec89c5857cabcc7f9f0474563377259e7574bff1c8a041d3b90e9ffa1f5e15502ffddee7b2550cc26a0 + checksum: 10/ab165ba910e549fcc21fd561a33f534d86e81ae36c97b1019dcfe506b09692ff867c97794a54b49c9a83b8b485f529f0f58d24966c3a11863c97dc70814f4d50 languageName: node linkType: hard @@ -7330,7 +7330,7 @@ __metadata: "@types/backoff": "npm:^2.5.5" "@types/diff": "npm:^5.2.2" "@types/he": "npm:^1.2.3" - "@types/node": "npm:^20.11.17" + "@types/node": "npm:^22.8.6" "@types/pg": "npm:^8.11.8" "@types/ws": "npm:^8.5.12" "@typescript-eslint/eslint-plugin": "npm:^7.13.0" @@ -8019,10 +8019,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd +"undici-types@npm:~6.19.8": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70 languageName: node linkType: hard