-
Notifications
You must be signed in to change notification settings - Fork 883
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
feat: use native fetch from node #2381
feat: use native fetch from node #2381
Conversation
b56e837
to
c7dc50a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Still there are some errors in higher Node versions, I'll address them in upcoming PRs 👍
c7dc50a
to
9bad6b3
Compare
What's the status of this PR, is there anything left to do here? |
I'm also interested about these "errors in higher Node versions" – were these present in CI or local testing only? |
Locally, we don't have tests for this part of codebase 😅
Update: I've investigated what's the source of this issue and |
9bad6b3
to
b74d902
Compare
Summary:
When using CLI with Node >= 21, there are deprecation warnings showing up in console, which can be traced to
whatwg-url@5.0.0
which is a dependency ofnode-fetch
. I've replacednode-fetch
with nativefetch
from Node. Since Node18, the fetch is no longer under experimental flag, and since Node21 it's marked as stable.Remarks:
@types/opentype.js
package as it was polluting global context with DOM typesfetchToTemp
usedstream.Readable.fromWeb
which is still marked as experimental but we only use use it inside ofcli-doctor
so the impact is relatively lowTest Plan:
Checklist