Skip to content

Commit

Permalink
chore: Update Node.js to v20
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Jan 8, 2025
1 parent 3a651ec commit e2746ad
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.git
.next
*Dockerfile*
*Dockerfile*
# Ignore node_modules to prevent issues with wrong binaries (e.g. sentry cli)
node_modules
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- run: yarn install --immutable --prefer-offline
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install dependencies
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- run: yarn install --immutable --prefer-offline
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preload-varnish-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install dependencies
Expand Down
6 changes: 4 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variables:
RELEASE_IMAGE_TAG: $CI_REGISTRY_IMAGE:release

lint:
image: node:18
image: node:20
stage: lint
script:
- yarn --frozen-lockfile
Expand All @@ -33,7 +33,9 @@ release:
- medium
script:
- pwd
- env DOCKER_IMAGE_TAGS="$RELEASE_IMAGE_TAG $CI_REGISTRY_IMAGE:$(./scripts/get-package-version.sh)" ./scripts/docker-build-push.sh
- env DOCKER_IMAGE_TAGS="$RELEASE_IMAGE_TAG
$CI_REGISTRY_IMAGE:$(./scripts/get-package-version.sh)"
./scripts/docker-build-push.sh
only:
- /^v\d+\.\d+\.\d+$/ # use `yarn version` to create these tags
except:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:20

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand Down Expand Up @@ -54,6 +54,6 @@ RUN yarn build

# Install only prod dependencies and start app
RUN yarn install --frozen-lockfile --production && yarn cache clean
CMD npm start
CMD yarn start

EXPOSE 3000
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"@types/jest": "^27.0.2",
"@types/k6": "^0.45.0",
"@types/lodash": "^4.14.165",
"@types/node": "^14.14.9",
"@types/node": "^20.17.12",
"@types/nprogress": "^0.2.0",
"@types/pg": "^8.6.0",
"@types/pixelmatch": "^5.2.6",
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.mitm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"
services:
## Running in Docker slows down development a lot, so this is only kept for reference here.
# nextjs:
# image: "node:18"
# image: "node:20"
# ports:
# - "3000:3000"
# volumes:
Expand Down Expand Up @@ -53,8 +53,12 @@ services:
volumes:
- "mitmproxy-config:/root/.mitmproxy/"
user: root:root
command: ["sh", "-c", "cd && pwd && whoami && mitmweb --web-host 0.0.0.0 --no-web-open-browser"]

command:
[
"sh",
"-c",
"cd && pwd && whoami && mitmweb --web-host 0.0.0.0 --no-web-open-browser",
]

volumes:
mitmproxy-config:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3"
services:
## Running in Docker slows down development a lot, so this is only kept for reference here.
# nextjs:
# image: "node:18"
# image: "node:20"
# ports:
# - "3000:3000"
# volumes:
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let
pkgs = import <nixpkgs> { };
nodejs = pkgs.nodejs-18_x;
nodejs = pkgs.nodejs-20_x;

in pkgs.mkShell {
buildInputs = [
Expand Down
17 changes: 12 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9432,18 +9432,20 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24"
integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==

"@types/node@^14.14.9":
version "14.17.3"
resolved "https://registry.npmjs.org/@types/node/-/node-14.17.3.tgz"
integrity sha512-e6ZowgGJmTuXa3GyaPbTGxX17tnThl2aSSizrFthQ7m9uLGZBXiGhgE55cjRZTF5kjZvYn9EOPOMljdjwbflxw==

"@types/node@^18.0.0":
version "18.19.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.18.tgz#7526471b28828d1fef1f7e4960fb9477e6e4369c"
integrity sha512-80CP7B8y4PzZF0GWx15/gVWRrB5y/bIjNI84NK3cmQJu0WZwvmj2WMA5LcofQFVfLqqCSp545+U2LsrVzX36Zg==
dependencies:
undici-types "~5.26.4"

"@types/node@^20.17.12":
version "20.17.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.12.tgz#ee3b7d25a522fd95608c1b3f02921c97b93fcbd6"
integrity sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==
dependencies:
undici-types "~6.19.2"

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz"
Expand Down Expand Up @@ -24651,6 +24653,11 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

undici@^5.21.2:
version "5.28.3"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.3.tgz#a731e0eff2c3fcfd41c1169a869062be222d1e5b"
Expand Down

0 comments on commit e2746ad

Please sign in to comment.