renovate: update undici to v7 - #8583
Conversation
🦋 Changeset detectedLatest commit: b54b6b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
hardhatTotal size of the bundle: List of dependencies (sorted by size) |
There was a problem hiding this comment.
Pull request overview
Updates Hardhat’s request utilities and related tests to be compatible with undici v7, replacing removed throwOnError/maxRedirections options with the responseError and redirect interceptors while preserving the error messaging that consumers rely on.
Changes:
- Bump
undicito^7.29.0(lockfile +@nomicfoundation/hardhat-utilsdependency) and add a changeset for thehardhat-utilsrelease. - Update the request utility to compose
redirect+responseErrorinterceptors and restore actionable status-code error messages. - Refactor multiple test suites to pass the
MockAgentas the dispatcher (keeping intercept declaration separate), and add/adjust tests for redirects and error causes.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks undici to v7.29.0 across the workspace. |
| packages/hardhat/test/utils.ts | Updates test dispatcher helper to return both interceptable + dispatcher (MockAgent). |
| packages/hardhat/test/internal/cli/banner-manager.ts | Passes MockAgent as testDispatcher instead of the interceptable. |
| packages/hardhat/test/internal/builtin-plugins/network-manager/http-provider.ts | Uses { interceptor, dispatcher } and passes the dispatcher to HttpProvider. |
| packages/hardhat-verify/test/verification.ts | Uses ETHERSCAN_API_URL constant and passes the dispatcher through to verification flows. |
| packages/hardhat-verify/test/utils.ts | Exposes dispatcher alongside interceptable for undici v7-compatible mocking. |
| packages/hardhat-verify/test/sourcify.ts | Passes the dispatcher (MockAgent) into Sourcify instead of the interceptable. |
| packages/hardhat-verify/test/etherscan.ts | Passes the dispatcher (MockAgent) into Etherscan instead of the interceptable. |
| packages/hardhat-verify/test/blockscout.ts | Passes the dispatcher (MockAgent) into Blockscout instead of the interceptable. |
| packages/hardhat-utils/test/request.ts | Updates expectations for removed undici options; adds redirect + error-cause coverage for v7 behavior. |
| packages/hardhat-utils/test/helpers/request.ts | Returns { interceptor, dispatcher } from the test helper for v7-safe usage. |
| packages/hardhat-utils/src/internal/request.ts | Composes redirect + responseError interceptors and restores status-code error messages. |
| packages/hardhat-utils/package.json | Bumps undici dependency to ^7.29.0. |
| packages/hardhat-slang-solx/test/downloader.ts | Updates downloader tests to pass MockAgent as dispatcher and keep intercept setup separate. |
| .changeset/quiet-donkeys-tickle.md | Declares a minor release for @nomicfoundation/hardhat-utils due to the undici update. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.changeset/quiet-donkeys-tickle.md:5
- This changeset note doesn’t mention that undici v7 now requires Node.js >=20.18.1 (see pnpm-lock.yaml:7169). That’s a consumer-visible constraint change, so it should be called out in the release notes (and potentially affects whether a minor bump is sufficient).
Updated undici to v7.
throwOnErrorrequest option and themaxRedirectionsdispatcher option, so both are replaced with theresponseErrorandredirectinterceptors.responseErrorinterceptor throws a generic"Response Error"message. We replace it withResponse status code <code>: <reason>to preserve the error messages currently exposed to consumers.Closes #8561