Skip to content

Commit bdc05ac

Browse files
authored
bump Node.js to v20 (blockscout#1417)
* bump Node.js to v20 Fixes blockscout#1318 * bump pw version * update screenshot
1 parent 8d97e7c commit bdc05ac

File tree

9 files changed

+217
-208
lines changed

9 files changed

+217
-208
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockscout dev",
3-
"image": "mcr.microsoft.com/devcontainers/typescript-node:18",
3+
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
44
"forwardPorts": [ 3000 ],
55
"customizations": {
66
"vscode": {

.github/workflows/checks.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip checks') && !(github.event.action == 'unlabeled' && github.event.label.name != 'skip checks') }}
2626
steps:
2727
- name: Checkout repo
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: Setup node
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
33-
node-version: 18
33+
node-version: 20.11.0
3434
cache: 'yarn'
3535

3636
- name: Cache node_modules
37-
uses: actions/cache@v3
37+
uses: actions/cache@v4
3838
id: cache-node-modules
3939
with:
4040
path: |
@@ -57,16 +57,16 @@ jobs:
5757
needs: [ code_quality ]
5858
steps:
5959
- name: Checkout repo
60-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
6161

6262
- name: Setup node
63-
uses: actions/setup-node@v3
63+
uses: actions/setup-node@v4
6464
with:
65-
node-version: 18
65+
node-version: 20.11.0
6666
cache: 'yarn'
6767

6868
- name: Cache node_modules
69-
uses: actions/cache@v3
69+
uses: actions/cache@v4
7070
id: cache-node-modules
7171
with:
7272
path: |
@@ -94,16 +94,16 @@ jobs:
9494
runs-on: ubuntu-latest
9595
steps:
9696
- name: Checkout repo
97-
uses: actions/checkout@v3
97+
uses: actions/checkout@v4
9898

9999
- name: Setup node
100-
uses: actions/setup-node@v3
100+
uses: actions/setup-node@v4
101101
with:
102-
node-version: 18
102+
node-version: 20.11.0
103103
cache: 'yarn'
104104

105105
- name: Cache node_modules
106-
uses: actions/cache@v3
106+
uses: actions/cache@v4
107107
id: cache-node-modules
108108
with:
109109
path: |
@@ -122,7 +122,7 @@ jobs:
122122
needs: [ code_quality, envs_validation ]
123123
runs-on: ubuntu-latest
124124
container:
125-
image: mcr.microsoft.com/playwright:v1.35.1-focal
125+
image: mcr.microsoft.com/playwright:v1.41.1-focal
126126

127127
strategy:
128128
fail-fast: false
@@ -134,18 +134,18 @@ jobs:
134134
run: apt-get update && apt-get install git-lfs
135135

136136
- name: Checkout repo
137-
uses: actions/checkout@v3
137+
uses: actions/checkout@v4
138138
with:
139139
lfs: 'true'
140140

141141
- name: Setup node
142-
uses: actions/setup-node@v3
142+
uses: actions/setup-node@v4
143143
with:
144-
node-version: 18
144+
node-version: 20.11.0
145145
cache: 'yarn'
146146

147147
- name: Cache node_modules
148-
uses: actions/cache@v3
148+
uses: actions/cache@v4
149149
id: cache-node-modules
150150
with:
151151
path: |
@@ -164,7 +164,7 @@ jobs:
164164

165165
- name: Upload test results
166166
if: always()
167-
uses: actions/upload-artifact@v3
167+
uses: actions/upload-artifact@v4
168168
with:
169169
name: playwright-report-${{ matrix.project }}
170170
path: playwright-report

.github/workflows/upload-source-maps.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
if: ${{ github.ref_type == 'tag' }}
1717
steps:
1818
- name: Checkout repo
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup node
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
24-
node-version: 18
24+
node-version: 20.11.0
2525
cache: 'yarn'
2626

2727
- name: Cache node_modules
28-
uses: actions/cache@v3
28+
uses: actions/cache@v4
2929
id: cache-node-modules
3030
with:
3131
path: |

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20.11.0

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# *****************************
22
# *** STAGE 1: Dependencies ***
33
# *****************************
4-
FROM node:18-alpine AS deps
4+
FROM node:20.11.0-alpine AS deps
55
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
66
RUN apk add --no-cache libc6-compat
77

@@ -30,7 +30,7 @@ RUN yarn --frozen-lockfile
3030
# *****************************
3131
# ****** STAGE 2: Build *******
3232
# *****************************
33-
FROM node:18-alpine AS builder
33+
FROM node:20.11.0-alpine AS builder
3434
RUN apk add --no-cache --upgrade libc6-compat bash
3535

3636
# pass commit sha and git tag to the app image
@@ -78,7 +78,7 @@ RUN cd ./deploy/tools/envs-validator && yarn build
7878
# ******* STAGE 3: Run ********
7979
# *****************************
8080
# Production image, copy all the files and run next
81-
FROM node:18-alpine AS runner
81+
FROM node:20.11.0-alpine AS runner
8282
RUN apk add --no-cache --upgrade bash curl jq unzip
8383

8484
### APP

docs/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Thanks for showing interest to contribute to Blockscout. The following steps wil
1414
cd <fork_name>
1515
```
1616

17-
3. Make sure you're running Node.js 18+ and NPM 8+; if not, upgrade it accordingly, for example using [nvm](https://github.com/nvm-sh/nvm).
17+
3. Make sure you're running Node.js 20+ and NPM 10+; if not, upgrade it accordingly, for example using [nvm](https://github.com/nvm-sh/nvm).
1818
```sh
1919
node -v
2020
npm -v

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": false,
55
"homepage": "https://github.com/blockscout/frontend#readme",
66
"engines": {
7-
"node": "18",
8-
"npm": "8"
7+
"node": "20.11.0",
8+
"npm": "10.2.4"
99
},
1010
"scripts": {
1111
"dev": "./tools/scripts/dev.sh",
@@ -24,7 +24,7 @@
2424
"svg:build-sprite": "icons build -i ./icons -o ./public/icons --optimize",
2525
"test:pw": "./tools/scripts/pw.sh",
2626
"test:pw:local": "export NODE_PATH=$(pwd)/node_modules && yarn test:pw",
27-
"test:pw:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.35.1-focal ./tools/scripts/pw.docker.sh",
27+
"test:pw:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.41.1-focal ./tools/scripts/pw.docker.sh",
2828
"test:pw:ci": "yarn test:pw --project=$PW_PROJECT",
2929
"test:jest": "jest",
3030
"test:jest:watch": "jest --watch",
@@ -99,8 +99,8 @@
9999
"xss": "^1.0.14"
100100
},
101101
"devDependencies": {
102-
"@playwright/experimental-ct-react": "1.35.1",
103-
"@playwright/test": "^1.35.1",
102+
"@playwright/experimental-ct-react": "1.41.1",
103+
"@playwright/test": "1.41.1",
104104
"@svgr/webpack": "^6.5.1",
105105
"@tanstack/eslint-plugin-query": "^5.0.5",
106106
"@testing-library/react": "^14.0.0",
@@ -112,7 +112,7 @@
112112
"@types/jest": "^29.2.0",
113113
"@types/js-cookie": "^3.0.2",
114114
"@types/mixpanel-browser": "^2.38.1",
115-
"@types/node": "18.11.18",
115+
"@types/node": "20.11.0",
116116
"@types/phoenix": "^1.5.4",
117117
"@types/qrcode": "^1.5.0",
118118
"@types/react": "18.0.9",
Loading

0 commit comments

Comments
 (0)