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

Merged
merged 5 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
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.19.1'
TARGET_NODE_VERSION: '20.17.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.19.1'
TARGET_NODE_VERSION: '20.17.0'

jobs:
pre-build:
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.19.1-alpine3.19 AS environment
FROM node:20.17.0-alpine3.20 AS environment

ENV appDir="/app" \
buildDir="/build" \
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.19.1"
"node": "^20.17.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -110,7 +110,7 @@
"@changesets/cli": "^2.27.1",
"@octokit/core": "^5.2.0",
"@types/libsodium-wrappers": "^0.7.14",
"@types/node": "^18.19.31",
"@types/node": "^20.17.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.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.22.18",
"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.19.1-alpine3.19
FROM node:20.17.0-alpine3.20

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.17.0",
"@types/node": "^18.19.31",
"@types/node": "^20.17.0",
"@types/yargs": "^17.0.32",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
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.19.1-alpine3.19
FROM node:20.17.0-alpine3.20

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.137",
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.31",
"@types/node": "^20.17.0",
"@types/yargs": "^17.0.32",
"aws-sdk-client-mock": "^4.0.0",
"aws-sdk-client-mock-jest": "^4.0.0",
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.31",
"@types/node": "^20.17.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.22.18",
"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.19.1-alpine3.19
FROM node:20.17.0-alpine3.20

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.17.0",
"@types/node": "^18.19.31",
"@types/node": "^20.17.0",
"@types/yargs": "^17.0.32",
"aws-sdk-client-mock": "^4.0.0",
"aws-sdk-client-mock-jest": "^4.0.0",
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.22.18",
"morgan": "^1.10.0",
"pm2": "^5.3.1"
},
Expand Down
9 changes: 8 additions & 1 deletion packages/airnode-operation/src/evm/deploy/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ import {
import { deriveEndpointId } from '../utils';

export function buildDeployState(config: Config): State {
const provider = new ethers.providers.JsonRpcProvider('http://127.0.0.1:8545/');
const provider = new ethers.providers.JsonRpcProvider({
url: 'http://127.0.0.1:8545/',
headers: {
// The default behavior of keep-alive changed from Node.js v18 to v20, so we need to disable it for e2e tests
Connection: 'close',
},
});

const deployer = provider.getSigner(config.deployerIndex);

return {
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.22.18",
"hardhat-deploy": "^0.12.4",
"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.31",
"hardhat": "^2.14.1",
"@types/node": "^20.17.0",
"hardhat": "^2.22.18",
"jest": "^29.7.0",
"rimraf": "^5.0.5",
"ts-node": "^10.9.2",
Expand Down
Loading
Loading