Bump up Node.js to v22 (#2410)
* Bump up Node.js to v22 Fixes #2404 * update Playwright to v1.49.0 * fix tests * one more fix * fix screenshots
@@ -29,7 +29,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.17.0'
|
||||
node-version: '22.11.0'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Update package version
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
@@ -171,7 +171,7 @@ jobs:
|
||||
(needs.pw_affected_tests.result == 'success' || needs.pw_affected_tests.result == 'skipped')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.47.2-focal
|
||||
image: mcr.microsoft.com/playwright:v1.49.0-noble
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -190,7 +190,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.17.0
|
||||
node-version: 22.11.0
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Cache node_modules
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# *****************************
|
||||
# *** STAGE 1: Dependencies ***
|
||||
# *****************************
|
||||
FROM node:20.17.0-alpine AS deps
|
||||
FROM node:22.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 python3 make g++
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||
@@ -37,7 +37,7 @@ RUN yarn --frozen-lockfile
|
||||
# *****************************
|
||||
# ****** STAGE 2: Build *******
|
||||
# *****************************
|
||||
FROM node:20.17.0-alpine AS builder
|
||||
FROM node:22.11.0-alpine AS builder
|
||||
RUN apk add --no-cache --upgrade libc6-compat bash
|
||||
|
||||
# pass build args to env variables
|
||||
@@ -91,7 +91,7 @@ COPY --from=deps /favicon-generator/node_modules ./deploy/tools/favicon-generato
|
||||
# ******* STAGE 3: Run ********
|
||||
# *****************************
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:20.17.0-alpine AS runner
|
||||
FROM node:22.11.0-alpine AS runner
|
||||
RUN apk add --no-cache --upgrade bash curl jq unzip
|
||||
|
||||
### APP
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"private": false,
|
||||
"homepage": "https://github.com/blockscout/frontend#readme",
|
||||
"engines": {
|
||||
"node": "20.17.0",
|
||||
"npm": "10.8.2"
|
||||
"node": "22.11.0",
|
||||
"npm": "10.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "./tools/scripts/dev.sh",
|
||||
@@ -26,8 +26,8 @@
|
||||
"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 --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.47.2-focal ./tools/scripts/pw.docker.sh",
|
||||
"test:pw:docker:deps": "docker run --rm --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.47.2-focal ./tools/scripts/pw.docker.deps.sh",
|
||||
"test:pw:docker": "docker run --rm --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.49.0-noble ./tools/scripts/pw.docker.sh",
|
||||
"test:pw:docker:deps": "docker run --rm --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.49.0-noble ./tools/scripts/pw.docker.deps.sh",
|
||||
"test:pw:ci": "yarn test:pw --project=$PW_PROJECT",
|
||||
"test:pw:detect-affected": "node ./deploy/tools/affected-tests/index.js",
|
||||
"test:jest": "jest",
|
||||
@@ -121,8 +121,8 @@
|
||||
"@eslint/compat": "1.2.2",
|
||||
"@eslint/js": "9.14.0",
|
||||
"@next/eslint-plugin-next": "15.0.3",
|
||||
"@playwright/experimental-ct-react": "1.47.2",
|
||||
"@playwright/test": "1.47.2",
|
||||
"@playwright/experimental-ct-react": "1.49.0",
|
||||
"@playwright/test": "1.49.0",
|
||||
"@stylistic/eslint-plugin": "2.10.1",
|
||||
"@svgr/webpack": "^6.5.1",
|
||||
"@tanstack/eslint-plugin-query": "5.60.1",
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 955 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 946 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 962 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 947 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 949 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 1016 B After Width: | Height: | Size: 828 B |
|
Before Width: | Height: | Size: 992 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 973 B After Width: | Height: | Size: 850 B |
|
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -5,6 +5,7 @@ import type { AddressTokensResponse } from 'types/api/address';
|
||||
|
||||
import * as addressMock from 'mocks/address/address';
|
||||
import * as tokensMock from 'mocks/address/tokens';
|
||||
import * as tokenInstance from 'mocks/tokens/tokenInstance';
|
||||
import * as socketServer from 'playwright/fixtures/socketServer';
|
||||
import { test, expect, devices } from 'playwright/lib';
|
||||
|
||||
@@ -83,7 +84,9 @@ test('collections +@dark-mode', async({ render }) => {
|
||||
await expect(component).toHaveScreenshot();
|
||||
});
|
||||
|
||||
test('nfts +@dark-mode', async({ render }) => {
|
||||
test('nfts +@dark-mode', async({ render, mockAssetResponse }) => {
|
||||
await mockAssetResponse(tokenInstance.base.image_url as string, './playwright/mocks/image_s.jpg');
|
||||
|
||||
const hooksConfig = {
|
||||
router: {
|
||||
query: { hash: ADDRESS_HASH, tab: 'tokens_nfts' },
|
||||
@@ -124,7 +127,9 @@ test.describe('mobile', () => {
|
||||
await expect(component).toHaveScreenshot();
|
||||
});
|
||||
|
||||
test('nfts', async({ render }) => {
|
||||
test('nfts', async({ render, mockAssetResponse }) => {
|
||||
await mockAssetResponse(tokenInstance.base.image_url as string, './playwright/mocks/image_s.jpg');
|
||||
|
||||
const hooksConfig = {
|
||||
router: {
|
||||
query: { hash: ADDRESS_HASH, tab: 'tokens_nfts' },
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |