Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .changeset/ten-lizards-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added support for Node v24.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
"version": "23"
}
},
"postCreateCommand": "scripts/setup.sh",
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
node-version:
description: Version of node to install
required: false
default: "22"
default: "23"
cache-save:
description: Whether to save the pnpm cache
required: false
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/v-next-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 23
- name: Run check
run: node scripts/check-v-next-dependencies.js

Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 23
- name: Run check
run: node scripts/check-v-next-npm-scripts.js

Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 23
- run: yq -p yaml -o json pnpm-lock.yaml | tee pnpm-lock.json
- id: generate
env:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
with:
node-version: 22
node-version: 23
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
with:
node-version: 22
node-version: 23
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
matrix:
package: ${{ fromJson(needs.list-packages.outputs.packages) }}
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
node: [22]
node: [23]

name: "[${{ matrix.package }}] ci on ${{ matrix.os }} (Node ${{ matrix.node }})"
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
23
10 changes: 6 additions & 4 deletions config-v-next/eslint.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const path = require("path");
*/
function createConfig(
configFilePath,
options = { onlyHardhatError: true, enforceHardhatTestUtils: true }
options = { onlyHardhatError: true, enforceHardhatTestUtils: true },
) {
/**
* @type {import("eslint").Linter.Config}
Expand Down Expand Up @@ -372,7 +372,9 @@ function createConfig(
"Don't import from the src folder, use the package entry point instead.",
},
{
group: require("module").builtinModules.map((m) => `/${m}`),
group: require("module")
.builtinModules.filter((m) => !m.startsWith("node:")) // avoid blocking correct imports
.map((m) => `/${m}`),
message:
"Use the 'node:' prefix to import built-in Node.js modules.",
},
Expand All @@ -389,7 +391,7 @@ function createConfig(
importNames: [
"default",
...Object.keys(require("node:assert")).filter(
(k) => k !== "AssertionError"
(k) => k !== "AssertionError",
),
],
message: "Use node:assert/strict instead.",
Expand Down Expand Up @@ -451,7 +453,7 @@ function createConfig(
selector:
"CallExpression[callee.object.name='assert'][callee.property.name=rejects]",
message: "Don't use assert.rejects. Use our test helpers instead.",
}
},
);
}

Expand Down
2 changes: 1 addition & 1 deletion v-next/hardhat/src/internal/cli/node-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import chalk from "chalk";

export const MIN_SUPPORTED_NODE_VERSION: number[] = [22, 10, 0];
export const MIN_SUPPORTED_NODE_VERSION: number[] = [23, 10, 0];

export function isNodeVersionSupported(): boolean {
try {
Expand Down
Loading