diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 0000104..09851df 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - uses: actions/checkout@v4 - run: npm ci - run: npm test diff --git a/Dockerfile b/Dockerfile index 156b6c2..4e1f54a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/node:20-alpine AS builder +FROM docker.io/library/node:22-alpine AS builder RUN apk upgrade --no-cache WORKDIR /build COPY package.json package-lock.json ./ @@ -7,15 +7,16 @@ COPY . ./ RUN node_modules/.bin/tsc -FROM docker.io/library/node:20-alpine AS packages +FROM docker.io/library/node:22-alpine AS packages RUN apk upgrade --no-cache WORKDIR /build COPY package.json package-lock.json ./ RUN npm ci --no-audit --no-fund --no-update-notifier --omit=dev -FROM docker.io/library/node:20-alpine AS final -RUN apk upgrade --no-cache +FROM docker.io/library/alpine:3.21 AS final +RUN apk upgrade --no-cache \ + && apk add --no-cache nodejs ENV NODE_ENV=production WORKDIR /app diff --git a/package-lock.json b/package-lock.json index d698994..bb83ae0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,12 +23,12 @@ "@sindresorhus/tsconfig": "^7.0.0", "@types/debounce-promise": "^3.1.3", "@types/json-stable-stringify": "^1.1.0", - "@types/node": "^20.17.9", + "@types/node": "^22.10.1", "typescript": "^5.7.2", "xo": "^0.60.0" }, "engines": { - "node": ">=20" + "node": ">=22" } }, "node_modules/@babel/code-frame": { @@ -401,13 +401,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.9.tgz", - "integrity": "sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.20.0" } }, "node_modules/@types/normalize-package-data": { @@ -6696,9 +6696,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 4717a31..6848ab3 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "type": "module", "engines": { - "node": ">=20" + "node": ">=22" }, "dependencies": { "@grammyjs/stateless-question": "^4.0.0", @@ -32,7 +32,7 @@ "@sindresorhus/tsconfig": "^7.0.0", "@types/debounce-promise": "^3.1.3", "@types/json-stable-stringify": "^1.1.0", - "@types/node": "^20.17.9", + "@types/node": "^22.10.1", "typescript": "^5.7.2", "xo": "^0.60.0" },