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",
"image": "mcr.microsoft.com/devcontainers/typescript-node:18",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"forwardPorts": [ 3000 ],
"customizations": {
"vscode": {
......
......@@ -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') }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.11.0
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
......@@ -57,16 +57,16 @@ jobs:
needs: [ code_quality ]
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.11.0
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
......@@ -94,16 +94,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.11.0
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
......@@ -122,7 +122,7 @@ jobs:
needs: [ code_quality, envs_validation ]
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.35.1-focal
image: mcr.microsoft.com/playwright:v1.41.1-focal
strategy:
fail-fast: false
......@@ -134,18 +134,18 @@ jobs:
run: apt-get update && apt-get install git-lfs
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: 'true'
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.11.0
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
......@@ -164,7 +164,7 @@ jobs:
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.project }}
path: playwright-report
......
......@@ -16,16 +16,16 @@ jobs:
if: ${{ github.ref_type == 'tag' }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.11.0
cache: 'yarn'
- name: Cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
......
# *****************************
# *** 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.
RUN apk add --no-cache libc6-compat
......@@ -30,7 +30,7 @@ RUN yarn --frozen-lockfile
# *****************************
# ****** 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
# pass commit sha and git tag to the app image
......@@ -78,7 +78,7 @@ RUN cd ./deploy/tools/envs-validator && yarn build
# ******* STAGE 3: Run ********
# *****************************
# 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
### APP
......
......@@ -14,7 +14,7 @@ Thanks for showing interest to contribute to Blockscout. The following steps wil
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
node -v
npm -v
......
......@@ -4,8 +4,8 @@
"private": false,
"homepage": "https://github.com/blockscout/frontend#readme",
"engines": {
"node": "18",
"npm": "8"
"node": "20.11.0",
"npm": "10.2.4"
},
"scripts": {
"dev": "./tools/scripts/dev.sh",
......@@ -24,7 +24,7 @@
"svg:build-sprite": "icons build -i ./icons -o ./public/icons --optimize",
"test:pw": "./tools/scripts/pw.sh",
"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:jest": "jest",
"test:jest:watch": "jest --watch",
......@@ -99,8 +99,8 @@
"xss": "^1.0.14"
},
"devDependencies": {
"@playwright/experimental-ct-react": "1.35.1",
"@playwright/test": "^1.35.1",
"@playwright/experimental-ct-react": "1.41.1",
"@playwright/test": "1.41.1",
"@svgr/webpack": "^6.5.1",
"@tanstack/eslint-plugin-query": "^5.0.5",
"@testing-library/react": "^14.0.0",
......@@ -112,7 +112,7 @@
"@types/jest": "^29.2.0",
"@types/js-cookie": "^3.0.2",
"@types/mixpanel-browser": "^2.38.1",
"@types/node": "18.11.18",
"@types/node": "20.11.0",
"@types/phoenix": "^1.5.4",
"@types/qrcode": "^1.5.0",
"@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