Skip to content

Conversation

@hectorhdzg
Copy link
Member

Apparently this was added by mistake as Headers is already defined in node types, removing to fix #1386

@JacksonWeber
Copy link
Contributor

I believe the reason the Node 16 tests are failing is that instanceof doesn't just use the type (which we could get from the @node/types 18.0.0 package) but requires a value, which explains why pulling the definition of the Header class from undici fixed this in Node 16 environments. We can either have an explicit dependency on undici (it's already pulled in as a dependency of the @azure/functions package) to solve the issue with yarn, or I can define a type-guard to check for the properties of the Headers type without the import.

Copy link
Contributor

@JacksonWeber JacksonWeber left a comment

Choose a reason for hiding this comment

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

LGTM

@hectorhdzg hectorhdzg merged commit 6815fda into microsoft:main Oct 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undeclared dependency “undici”

2 participants