Skip to content

Commit 19c61cd

Browse files
authored
[#IOPID-2514] upgrade to node20 (#166)
1 parent a0f318a commit 19c61cd

10 files changed

+139
-49
lines changed

.devops/code-review-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
variables:
5-
NODE_VERSION: '18.13.0'
5+
NODE_VERSION: '20.12.2'
66
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
77
setupTemplateName: azure-templates/setup-project.yml
88

.devops/deploy-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010

1111
variables:
12-
NODE_VERSION: '18.13.0'
12+
NODE_VERSION: '20.12.2'
1313
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
1414
gitReference: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/tags/', ''), 'refs/heads/', '') }}
1515

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module.exports = {
2121
"@pagopa/eslint-config/strong",
2222
],
2323
"rules": {
24-
24+
"jsdoc/newline-after-description": "off",
25+
// this rule is a replacement for the above one which got removed but it's still
26+
// mentioned in @pagopa/eslint-config@3.0.0
27+
"jsdoc/tag-lines": ["error", "any", {"startLines": 1}]
2528
}
2629
}

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.13.0
1+
20.12.2

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.13.0 as builder
1+
FROM node:20.12.2 AS builder
22

33
WORKDIR /usr/src/app
44

@@ -11,7 +11,7 @@ RUN chmod -R 777 /usr/src/app \
1111
&& yarn install \
1212
&& yarn build
1313

14-
FROM node:18.13.0-alpine
14+
FROM node:20.12.2-alpine
1515
LABEL maintainer="https://pagopa.gov.it"
1616

1717
WORKDIR /usr/src/app
@@ -23,4 +23,6 @@ COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules
2323

2424
EXPOSE 3000
2525

26+
USER node
27+
2628
CMD ["yarn", "dev"]

docker-compose.override.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "2.2"
22

33
services:
44
io-spid-commons:
5-
image: node:18.13.0-alpine
5+
image: node:20.12.2-alpine
66
working_dir: /usr/src/app
77
volumes:
88
- ".:/usr/src/app"

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- "3000"
1414
ports:
1515
- "3000:3000"
16-
image: node:18.13.0-alpine
16+
image: node:20.12.2-alpine
1717
working_dir: /usr/src/app
1818
volumes:
1919
- "./certs:/usr/src/app/certs:delegated"

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@pagopa/eslint-config": "^3.0.0",
2929
"@types/express": "4.17.11",
3030
"@types/jest": "^29.5.1",
31-
"@types/node": "~18.13.0",
31+
"@types/node": "~20.12.2",
3232
"@types/node-fetch": "^2.1.2",
3333
"@types/node-forge": "^0.9.1",
3434
"@types/passport": "^1.0.2",
@@ -39,11 +39,11 @@
3939
"@types/xml-crypto": "^1.4.1",
4040
"@types/xml2js": "^0.4.5",
4141
"@types/yargs": "^15.0.4",
42-
"fp-ts": "^2.16.5",
43-
"io-ts": "^2.2.21",
4442
"auto-changelog": "^2.2.1",
4543
"eslint-plugin-prettier": "^4.2.1",
4644
"express": "4.17.0",
45+
"fp-ts": "^2.16.5",
46+
"io-ts": "^2.2.21",
4747
"jest": "^29.5.0",
4848
"nock": "^11.7.1",
4949
"nodemon": "^2.0.2",
@@ -100,6 +100,7 @@
100100
"access": "public"
101101
},
102102
"resolutions": {
103-
"@types/express-serve-static-core": "4.17.34"
103+
"@types/express-serve-static-core": "4.17.34",
104+
"eslint-plugin-jsdoc": "^50"
104105
}
105106
}

0 commit comments

Comments
 (0)