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

feat: replace Node.js 18 with Node.js 20 #1920

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/tough-sloths-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@api3/airnode-utilities': minor
'@api3/airnode-deployer': minor
'@api3/airnode-examples': minor
'@api3/airnode-admin': minor
'@api3/airnode-node': minor
---

Replace Node.js 18 with Node.js 20
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
DOCKER_BUILDKIT: 1
TARGET_NODE_VERSION: '18.14.0'
TARGET_NODE_VERSION: '20.10.0'

jobs:
documentation:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/protocol-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
DOCKER_BUILDKIT: 1
TARGET_NODE_VERSION: '18.14.0'
TARGET_NODE_VERSION: '20.10.0'

jobs:
pre-build:
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14.0-alpine3.17 AS environment
FROM node:20.10.0-alpine3.17 AS environment

ENV appDir="/app" \
buildDir="/build" \
Expand All @@ -7,7 +7,7 @@ ENV appDir="/app" \
CI="true"

RUN apk add --update --no-cache git rsync docker $([ $(arch) == "aarch64" ] && echo "python3 make g++") && \
yarn global add npm@^9.8.1 && \
yarn global add npm && \
# Download both solidity compilers as per: https://github.com/nomiclabs/hardhat/issues/1280#issuecomment-949822371
mkdir -p /root/.cache/hardhat-nodejs/compilers-v2/wasm && \
wget -O /root/.cache/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.9+commit.e5eed63a.js https://solc-bin.ethereum.org/wasm/soljson-v0.8.9+commit.e5eed63a.js && \
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.1.0",
"private": true,
"engines": {
"node": "^18.14.0"
"node": "^20.10.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -110,7 +110,7 @@
"@changesets/cli": "^2.27.1",
"@octokit/core": "^5.1.0",
"@types/libsodium-wrappers": "^0.7.13",
"@types/node": "^18.19.21",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vercel/ncc": "^0.38.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/mocha": "^10.0.6",
"chai": "^4.4.1",
"ethereum-waffle": "^4.0.10",
"hardhat": "^2.14.1",
"hardhat": "^2.19.5",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-admin/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14.0-alpine3.17
FROM node:20.10.0-alpine3.17

ARG npmRegistryUrl=https://registry.npmjs.org/
ARG npmTag=latest
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.21",
"@types/node": "^20.10.0",
"@types/yargs": "^17.0.32",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/airnode-admin/test/e2e/cli.feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ it('has disabled DEBUG_COMMANDS flag', () => {
expect(DEBUG_COMMANDS).toBe(false);
});

describe('CLI', () => {
jest.setTimeout(45_000);
jest.setTimeout(120_000);

describe('CLI', () => {
let provider: ethers.providers.JsonRpcProvider;
let deployer: ethers.providers.JsonRpcSigner;
const aliceDerivationPath = "m/44'/60'/0'/0/1";
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-deployer/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14.0-alpine3.17
FROM node:20.10.0-alpine3.17

ARG npmRegistryUrl=https://registry.npmjs.org/
ARG npmTag=latest
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@types/adm-zip": "^0.5.5",
"@types/aws-lambda": "^8.10.136",
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.21",
"@types/node": "^20.10.0",
"@types/yargs": "^17.0.32",
"aws-sdk-client-mock": "^3.0.1",
"aws-sdk-client-mock-jest": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "aws_lambda_function" "lambda" {
function_name = var.name
handler = var.handler
memory_size = var.memory_size
runtime = "nodejs18.x"
runtime = "nodejs20.x"
role = aws_iam_role.lambda_role.arn
timeout = var.timeout
reserved_concurrent_executions = var.reserved_concurrent_executions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ resource "google_storage_bucket_object" "function_zip" {

resource "google_cloudfunctions_function" "function" {
name = var.name
runtime = "nodejs18"
runtime = "nodejs20"

available_memory_mb = var.memory_size
source_archive_bucket = google_storage_bucket_object.function_zip.bucket
Expand Down
4 changes: 2 additions & 2 deletions packages/airnode-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.21",
"@types/node": "^20.10.0",
"@types/prompts": "^2.4.9",
"chalk": "^4.1.2",
"dotenv": "^16.4.5",
"ethereum-waffle": "^4.0.10",
"hardhat": "^2.14.1",
"hardhat": "^2.19.5",
"jest": "^29.7.0",
"prompts": "^2.4.2",
"ts-jest": "^29.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-node/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14.0-alpine3.17
FROM node:20.10.0-alpine3.17

ARG npmRegistryUrl=https://registry.npmjs.org/
ARG npmTag=latest
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.21",
"@types/node": "^20.10.0",
"@types/yargs": "^17.0.32",
"aws-sdk-client-mock": "^3.0.1",
"aws-sdk-client-mock-jest": "^3.0.1",
Expand Down
9 changes: 0 additions & 9 deletions packages/airnode-operation/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ const config: HardhatUserConfig = {
compilers: [{ version: '0.6.12', settings: {} }],
},
networks: {
hardhat: {
accounts: {
// These accounts are used to deploy contracts and fund all Airnode
// related accounts. Make sure they have more than enough ETH to
// do this (1m ETH each).
accountsBalance: '1000000000000000000000000',
count: 100,
},
},
localhost: {
url: 'http://127.0.0.1:8545/',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-operation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@api3/airnode-utilities": "^0.14.0",
"ethers": "^5.7.2",
"express": "^4.18.3",
"hardhat": "^2.14.1",
"hardhat": "^2.19.5",
"morgan": "^1.10.0",
"pm2": "^5.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"chai": "^4.4.1",
"copyfiles": "^2.4.1",
"ethereum-waffle": "^4.0.10",
"hardhat": "^2.14.1",
"hardhat": "^2.19.5",
"hardhat-deploy": "^0.12.1",
"hardhat-gas-reporter": "^1.0.10",
"rimraf": "^5.0.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/airnode-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.21",
"hardhat": "^2.14.1",
"@types/node": "^20.10.0",
"hardhat": "^2.19.5",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"ts-node": "^10.9.2",
Expand Down
11 changes: 2 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4456,7 +4456,7 @@
"@types/node" "*"
form-data "^4.0.0"

"@types/node@*":
"@types/node@*", "@types/node@^20.10.0":
version "20.11.25"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.25.tgz#0f50d62f274e54dd7a49f7704cc16bfbcccaf49f"
integrity sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==
Expand All @@ -4478,13 +4478,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==

"@types/node@^18.19.21":
version "18.19.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.22.tgz#f622f92514b897e6b09903e97c16a0db8e94689f"
integrity sha512-p3pDIfuMg/aXBmhkyanPshdfJuX5c5+bQjYLIikPLXAUycEogij/c50n/C+8XOA5L93cU4ZRXtn+dNQGi0IZqQ==
dependencies:
undici-types "~5.26.4"

"@types/node@^8.0.0":
version "8.10.66"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3"
Expand Down Expand Up @@ -9097,7 +9090,7 @@ hardhat-gas-reporter@^1.0.10:
eth-gas-reporter "^0.2.25"
sha1 "^1.1.1"

hardhat@^2.14.1:
hardhat@^2.19.5:
version "2.21.0"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.21.0.tgz#2e23126310a6c77cd7e149e6af1dd67626b7a74f"
integrity sha512-8DlJAVJDEVHaV1sh9FLuKLLgCFv9EAJ+M+8IbjSIPgoeNo3ss5L1HgGBMfnI88c7OzMEZkdcuyGoobFeK3Orqw==
Expand Down