fix(url-loader): bump cross-undici-fetch to the latest for pinned undici@5.5.1 #4559
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to ardatan/whatwg-node#52 & dotansimha/graphql-code-generator#8012
undici@5.6.0 has a regression in its
fetch
implementation. When you use it like the following which is valid per Fetch API spec, it throws an error that says you cannot havebody
withGET/HEAD
HTTP requests.See nodejs/undici#1527
It basically ignores the HTTP method given in
Request
object created by undici.Since
cross-undici-fetch
usesundici
's fetch for Node 16 and above, this is breaking for the users ofurl-loader
that is dependency of GraphQL Code Generator, GraphQL Config and others.cross-undici-fetch in the latest version has
undici@5.5.1
as a pinned dependency that doesn't have the issue mentioned above.And this PR updates the version range of
cross-undici-fetch
for@graphql-tools/url-loader
so the regression will be fixed.In the meanwhile, we will create an issue and a PR Undici's repo that reproduces the issue with details.