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 Node.js to v20 #1417

Merged
merged 4 commits into from
Jan 29, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockscout dev",
"image": "mcr.microsoft.com/devcontainers/typescript-node:18",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"forwardPorts": [ 3000 ],
"customizations": {
"vscode": {
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/upload-source-maps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20.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: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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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": "18",
"npm": "8"
"node": "20.11.0",
"npm": "10.2.4"
},
"scripts": {
"dev": "./tools/scripts/dev.sh",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
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
Loading