Commit bdc05ace authored by tom goriunov's avatar tom goriunov Committed by GitHub

bump Node.js to v20 (#1417)

* bump Node.js to v20

Fixes #1318

* bump pw version

* update screenshot
parent 8d97e7ca
{ {
"name": "blockscout dev", "name": "blockscout dev",
"image": "mcr.microsoft.com/devcontainers/typescript-node:18", "image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"forwardPorts": [ 3000 ], "forwardPorts": [ 3000 ],
"customizations": { "customizations": {
"vscode": { "vscode": {
......
...@@ -25,16 +25,16 @@ jobs: ...@@ -25,16 +25,16 @@ jobs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip checks') && !(github.event.action == 'unlabeled' && github.event.label.name != 'skip checks') }} if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip checks') && !(github.event.action == 'unlabeled' && github.event.label.name != 'skip checks') }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20.11.0
cache: 'yarn' cache: 'yarn'
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v3 uses: actions/cache@v4
id: cache-node-modules id: cache-node-modules
with: with:
path: | path: |
...@@ -57,16 +57,16 @@ jobs: ...@@ -57,16 +57,16 @@ jobs:
needs: [ code_quality ] needs: [ code_quality ]
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20.11.0
cache: 'yarn' cache: 'yarn'
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v3 uses: actions/cache@v4
id: cache-node-modules id: cache-node-modules
with: with:
path: | path: |
...@@ -94,16 +94,16 @@ jobs: ...@@ -94,16 +94,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20.11.0
cache: 'yarn' cache: 'yarn'
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v3 uses: actions/cache@v4
id: cache-node-modules id: cache-node-modules
with: with:
path: | path: |
...@@ -122,7 +122,7 @@ jobs: ...@@ -122,7 +122,7 @@ jobs:
needs: [ code_quality, envs_validation ] needs: [ code_quality, envs_validation ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: mcr.microsoft.com/playwright:v1.35.1-focal image: mcr.microsoft.com/playwright:v1.41.1-focal
strategy: strategy:
fail-fast: false fail-fast: false
...@@ -134,18 +134,18 @@ jobs: ...@@ -134,18 +134,18 @@ jobs:
run: apt-get update && apt-get install git-lfs run: apt-get update && apt-get install git-lfs
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
lfs: 'true' lfs: 'true'
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20.11.0
cache: 'yarn' cache: 'yarn'
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v3 uses: actions/cache@v4
id: cache-node-modules id: cache-node-modules
with: with:
path: | path: |
...@@ -164,7 +164,7 @@ jobs: ...@@ -164,7 +164,7 @@ jobs:
- name: Upload test results - name: Upload test results
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: playwright-report-${{ matrix.project }} name: playwright-report-${{ matrix.project }}
path: playwright-report path: playwright-report
......
...@@ -16,16 +16,16 @@ jobs: ...@@ -16,16 +16,16 @@ jobs:
if: ${{ github.ref_type == 'tag' }} if: ${{ github.ref_type == 'tag' }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 20.11.0
cache: 'yarn' cache: 'yarn'
- name: Cache node_modules - name: Cache node_modules
uses: actions/cache@v3 uses: actions/cache@v4
id: cache-node-modules id: cache-node-modules
with: with:
path: | path: |
......
# ***************************** # *****************************
# *** STAGE 1: Dependencies *** # *** STAGE 1: Dependencies ***
# ***************************** # *****************************
FROM node:18-alpine AS deps FROM node:20.11.0-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. # 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 RUN apk add --no-cache libc6-compat
...@@ -30,7 +30,7 @@ RUN yarn --frozen-lockfile ...@@ -30,7 +30,7 @@ RUN yarn --frozen-lockfile
# ***************************** # *****************************
# ****** STAGE 2: Build ******* # ****** STAGE 2: Build *******
# ***************************** # *****************************
FROM node:18-alpine AS builder FROM node:20.11.0-alpine AS builder
RUN apk add --no-cache --upgrade libc6-compat bash RUN apk add --no-cache --upgrade libc6-compat bash
# pass commit sha and git tag to the app image # pass commit sha and git tag to the app image
...@@ -78,7 +78,7 @@ RUN cd ./deploy/tools/envs-validator && yarn build ...@@ -78,7 +78,7 @@ RUN cd ./deploy/tools/envs-validator && yarn build
# ******* STAGE 3: Run ******** # ******* STAGE 3: Run ********
# ***************************** # *****************************
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM node:18-alpine AS runner FROM node:20.11.0-alpine AS runner
RUN apk add --no-cache --upgrade bash curl jq unzip RUN apk add --no-cache --upgrade bash curl jq unzip
### APP ### APP
......
...@@ -14,7 +14,7 @@ Thanks for showing interest to contribute to Blockscout. The following steps wil ...@@ -14,7 +14,7 @@ Thanks for showing interest to contribute to Blockscout. The following steps wil
cd <fork_name> cd <fork_name>
``` ```
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). 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).
```sh ```sh
node -v node -v
npm -v npm -v
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"private": false, "private": false,
"homepage": "https://github.com/blockscout/frontend#readme", "homepage": "https://github.com/blockscout/frontend#readme",
"engines": { "engines": {
"node": "18", "node": "20.11.0",
"npm": "8" "npm": "10.2.4"
}, },
"scripts": { "scripts": {
"dev": "./tools/scripts/dev.sh", "dev": "./tools/scripts/dev.sh",
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"svg:build-sprite": "icons build -i ./icons -o ./public/icons --optimize", "svg:build-sprite": "icons build -i ./icons -o ./public/icons --optimize",
"test:pw": "./tools/scripts/pw.sh", "test:pw": "./tools/scripts/pw.sh",
"test:pw:local": "export NODE_PATH=$(pwd)/node_modules && yarn test:pw", "test:pw:local": "export NODE_PATH=$(pwd)/node_modules && yarn test:pw",
"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", "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",
"test:pw:ci": "yarn test:pw --project=$PW_PROJECT", "test:pw:ci": "yarn test:pw --project=$PW_PROJECT",
"test:jest": "jest", "test:jest": "jest",
"test:jest:watch": "jest --watch", "test:jest:watch": "jest --watch",
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
"xss": "^1.0.14" "xss": "^1.0.14"
}, },
"devDependencies": { "devDependencies": {
"@playwright/experimental-ct-react": "1.35.1", "@playwright/experimental-ct-react": "1.41.1",
"@playwright/test": "^1.35.1", "@playwright/test": "1.41.1",
"@svgr/webpack": "^6.5.1", "@svgr/webpack": "^6.5.1",
"@tanstack/eslint-plugin-query": "^5.0.5", "@tanstack/eslint-plugin-query": "^5.0.5",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
"@types/jest": "^29.2.0", "@types/jest": "^29.2.0",
"@types/js-cookie": "^3.0.2", "@types/js-cookie": "^3.0.2",
"@types/mixpanel-browser": "^2.38.1", "@types/mixpanel-browser": "^2.38.1",
"@types/node": "18.11.18", "@types/node": "20.11.0",
"@types/phoenix": "^1.5.4", "@types/phoenix": "^1.5.4",
"@types/qrcode": "^1.5.0", "@types/qrcode": "^1.5.0",
"@types/react": "18.0.9", "@types/react": "18.0.9",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment