Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up Node.js to v22 #2410

Merged
merged 6 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/chakra-npm-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-source-maps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.17.0
22.11.0
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions ui/address/AddressTokens.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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' },
Expand Down Expand Up @@ -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' },
Expand Down
1 change: 1 addition & 0 deletions ui/address/contract/methods/ContractMethodsRegular.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ test('all methods +@dark-mode +@mobile', async({ render }) => {
const abi: Array<SmartContractMethod> = [ ...methodsMock.read, ...methodsMock.write ];
const component = await render(<ContractMethodsRegular abi={ abi }/>, { hooksConfig });
await component.getByText(/expand all/i).click();
await expect(component.getByText('HTTP request failed')).toBeVisible();

await expect(component).toHaveScreenshot();
});
2 changes: 1 addition & 1 deletion ui/address/tokenSelect/TokenSelect.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test('base view +@dark-mode', async({ render, page }) => {
);

await page.getByRole('button', { name: /select/i }).click();
await page.getByText('USD Coin').hover();

await expect(page).toHaveScreenshot({ clip: CLIPPING_AREA });

Expand Down Expand Up @@ -78,6 +77,7 @@ test('sort', async({ render, page }) => {
await page.getByRole('button', { name: /select/i }).click();
await page.locator('a[aria-label="Sort ERC-20 tokens"]').click();

await page.mouse.wheel(0, -1000);
await expect(page).toHaveScreenshot({ clip: CLIPPING_AREA });

await page.mouse.move(100, 200);
Expand Down
Binary file modified ui/blob/__screenshots__/BlobData.pw.tsx_default_image-1.png
Binary file modified ui/blob/__screenshots__/BlobData.pw.tsx_default_image-2.png
Binary file modified ui/blob/__screenshots__/BlobData.pw.tsx_default_text-1.png
Binary file modified ui/blob/__screenshots__/BlobData.pw.tsx_default_text-2.png
Binary file modified ui/home/__screenshots__/Stats.pw.tsx_default_no-gas-info-1.png
Binary file modified ui/pages/__screenshots__/Blob.pw.tsx_default_without-data-1.png
Loading
Loading