update to node v22

This commit is contained in:
Aarni Halinen
2025-04-09 10:38:25 +03:00
parent 86880dbac4
commit aea9563a0f
8 changed files with 42 additions and 26 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ stages:
- deploy
install:
image: node:16
image: node:22
stage: setup
script:
- npm ci
@@ -21,7 +21,7 @@ install:
expire_in: 1 week
audit:
image: node:16
image: node:22
needs: ["install"]
allow_failure: true
stage: audit
@@ -29,27 +29,27 @@ audit:
- npm audit --audit-level=critical
es:lint:
image: node:16
image: node:22
needs: ["install"]
stage: lint
script:
- npm run lint:es
css:lint:
image: node:16
image: node:22
needs: ["install"]
stage: lint
script:
- npm run lint:css
# test:unit:
# image: node:16
# image: node:22
# stage: test
# script:
# - npm run test:unit
build:
image: node:16
image: node:22
needs: ["install"]
stage: build
script:
@@ -67,7 +67,7 @@ build:
- .next/cache/
test:e2e:
image: circleci/node:16-browsers
image: circleci/node:22-browsers
needs: ["install", "build"]
stage: test
script:
+1 -1
View File
@@ -1 +1 @@
16
22
+3 -3
View File
@@ -1,5 +1,5 @@
# Install dependencies only when needed
FROM node:16-alpine AS deps
FROM node:22-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
@@ -7,7 +7,7 @@ COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
FROM node:16-alpine AS builder
FROM node:22-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
@@ -21,7 +21,7 @@ ARG SENTRY_AUTH_TOKEN
RUN npm run build
# Production image, copy all the files and run next
FROM node:16-alpine AS runner
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
+1 -1
View File
@@ -10,7 +10,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
## Installation
Install node v16 with **[Node Version Manager](https://github.com/nvm-sh/nvm#installing-and-updating)**.
Install node v22 with **[Node Version Manager](https://github.com/nvm-sh/nvm#installing-and-updating)**.
Set up your SSH key authentication in GitLab Profile Settings. Then clone the repository and checkout the master branch:
```bash
+29 -9
View File
@@ -39,7 +39,7 @@
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/js-cookie": "^3.0.1",
"@types/node": "^16.11.36",
"@types/node": "^22.14.0",
"@types/react": "^18.0.15",
"@types/react-csv": "^1.1.3",
"@types/react-dom": "^18.0.6",
@@ -3267,10 +3267,14 @@
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
},
"node_modules/@types/node": {
"version": "16.11.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz",
"integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==",
"devOptional": true
"version": "22.14.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz",
"integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"node_modules/@types/normalize-package-data": {
"version": "2.4.1",
@@ -14157,6 +14161,13 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"devOptional": true,
"license": "MIT"
},
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@@ -17349,10 +17360,13 @@
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
},
"@types/node": {
"version": "16.11.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz",
"integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==",
"devOptional": true
"version": "22.14.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz",
"integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==",
"devOptional": true,
"requires": {
"undici-types": "~6.21.0"
}
},
"@types/normalize-package-data": {
"version": "2.4.1",
@@ -25474,6 +25488,12 @@
"which-boxed-primitive": "^1.0.2"
}
},
"undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"devOptional": true
},
"unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
+1 -1
View File
@@ -36,7 +36,7 @@
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/js-cookie": "^3.0.1",
"@types/node": "^16.11.36",
"@types/node": "^22.14.0",
"@types/react": "^18.0.15",
"@types/react-csv": "^1.1.3",
"@types/react-dom": "^18.0.6",
-2
View File
@@ -1,5 +1,3 @@
version: "3.4"
services:
frontend:
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-frontend:latest
-2
View File
@@ -1,5 +1,3 @@
version: "3.4"
services:
frontend:
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-frontend:prod