build: update dependency undici to v8#32949
Conversation
3a49e2f to
47e03e6
Compare
See associated pull request for more information.
47e03e6 to
3829c4e
Compare
There was a problem hiding this comment.
Code Review
This pull request upgrades undici to version 8.1.0 across the workspace and updates several test files to import fetch from the package. The upgrade introduces a strict Node.js engine requirement of >=22.19.0, which may break compatibility for environments running on Node.js 18 or 20. Additionally, the removal of the undici-types resolution has caused version inconsistencies in the lockfile, which could lead to type conflicts or missing definitions.
I am having trouble creating individual review comments. Click here to see my feedback.
package.json (135)
The upgrade to undici v8.1.0 introduces a strict Node.js engine requirement of >=22.19.0, as reflected in the pnpm-lock.yaml changes. This is a significant breaking change for users or CI environments running on Node.js 18 or 20, which are currently in LTS. If the project intends to maintain support for these Node.js versions, this dependency update should be reconsidered, or the project's own engine requirements must be updated to reflect this new minimum.
package.json (169-171)
Removing the undici-types resolution has resulted in inconsistent type versions across the workspace. The lockfile shows that different versions of @types/node are now resolving to older and mismatched versions of undici-types (e.g., 6.21.0 and 7.16.0). This can lead to type conflicts or missing definitions for newer features provided by undici v8. It is recommended to maintain a unified resolution for undici-types to ensure type consistency across the repository.
| import { Architect, BuilderRun } from '@angular-devkit/architect'; | ||
| import { tags } from '@angular-devkit/core'; | ||
| import { Agent } from 'undici'; | ||
| import { Agent, fetch } from 'undici'; |
There was a problem hiding this comment.
We need to use fetch from undici when using Agent as there are incompatibilities between Agent and Node.js built-in fetch which causes runtime errors such as onRequestEnd is not defined.
See associated pull request for more information.