Skip to content

build: update dependency undici to v8#32949

Open
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:undici-types
Open

build: update dependency undici to v8#32949
alan-agius4 wants to merge 1 commit intoangular:mainfrom
alan-agius4:undici-types

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

See associated pull request for more information.

@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Apr 7, 2026
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Apr 7, 2026
@alan-agius4 alan-agius4 force-pushed the undici-types branch 3 times, most recently from 3a49e2f to 47e03e6 Compare April 15, 2026 08:52
See associated pull request for more information.
@alan-agius4 alan-agius4 requested a review from clydin April 15, 2026 09:34
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 15, 2026
@alan-agius4 alan-agius4 marked this pull request as ready for review April 15, 2026 09:34
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

high

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)

medium

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';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant