cli
cli copied to clipboard
feat: use native fetch from node
Summary:
When using CLI with Node >= 21, there are deprecation warnings showing up in console, which can be traced to [email protected] which is a dependency of node-fetch. I've replaced node-fetch with native fetch from Node. Since Node18, the fetch is no longer under experimental flag, and since Node21 it's marked as stable.
Remarks:
- Needed to remove
@types/opentype.jspackage as it was polluting global context with DOM types fetchToTempusedstream.Readable.fromWebwhich is still marked as experimental but we only use use it inside ofcli-doctorso the impact is relatively low
Test Plan:
- [ ] - test by setting up a new project
Checklist
- [x] Documentation is up to date to reflect these changes.
- [x] Follows commit message convention described in CONTRIBUTING.md