Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Remove node-fetch. #5031

Merged
merged 12 commits into from
Dec 9, 2024
Merged

Conversation

iclanton
Copy link
Member

@iclanton iclanton commented Dec 5, 2024

Summary

Should address #5008.

This PR replaces node-fetch with code that uses the built-in NodeJS http and https modules.

Details

Why not upgrade node-fetch? node-fetch@3 now ships as an ESM module, which is incompatible with the way Rush is currently shipped.

Right now, this loads response objects fully into memory before resolving. It may be worth changing that.

How it was tested

Published as 5.144.0-pr5031.0.

Impacted documentation

None.

libraries/rush-lib/src/utilities/WebClient.ts Show resolved Hide resolved
libraries/rush-lib/src/utilities/WebClient.ts Outdated Show resolved Hide resolved
libraries/rush-lib/src/utilities/test/WebClient.test.ts Outdated Show resolved Hide resolved
libraries/rush-lib/src/utilities/WebClient.ts Show resolved Hide resolved
libraries/rush-lib/src/utilities/WebClient.ts Outdated Show resolved Hide resolved
libraries/rush-lib/src/utilities/WebClient.ts Outdated Show resolved Hide resolved
libraries/rush-lib/src/utilities/WebClient.ts Outdated Show resolved Hide resolved
@iclanton iclanton enabled auto-merge (squash) December 9, 2024 23:17
@iclanton iclanton merged commit 1fae937 into microsoft:main Dec 9, 2024
4 checks passed
@iclanton iclanton deleted the remove-node-fetch branch December 9, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

[rush] punycode is deprecated in Node v22
2 participants