-
Notifications
You must be signed in to change notification settings - Fork 2
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
Migrate rimraf
to node:fs
in firebase-tools
#126
Comments
rimraf
to node:fs
in firebase-tools
rimraf
to node:fs
in firebase-toolsrimraf
to node:fs
in firebase-tools
PR opened here on the firebase-tools repository : firebase/firebase-tools#7826 |
This repository also use the following dependencies:
|
given they specify: "engines": {
"node": ">=18.0.0 || >=20.0.0"
}, A few others I noticed:
I suspect if you look at the graph or the pkg-size result, you'll see |
PR to remove strip-ansi firebase/firebase-tools#7860 |
node-fetch, abort-controller, form-data and proxy-agent dependencies are all linked together. I've worked on a PR to replace everything by native fetch. It seems to be working but every test relies on nock which does not support native fetch on the current version (13). Are there other examples of migrations from node-fetch to fetch so that I may find another way ? |
Do you have a link to the branch? And an example test that fails Maybe we can figure something out. Would be good to see some code though so I can better follow what you mean |
Sure, here is the branch: https://github.com/jsaguet/firebase-tools/tree/feat/remove-node-fetch My point was that every test in However, Migrating those tests to another tool would be a huge effort with very low value and the PR might by rejected by the maintainers because they are used to We could just wait for the next release of I was asking if there was known drop-in replacement to |
That makes sense. Really it would be nice to just stub fetch out like any other function. But it would be a big refactor, you're right I'm not aware of a nock alternative either unfortunately. Do you know if there's a tracking issue for them supporting fetch? So we can follow |
I found this one nock/nock#2397 |
aha yes it looks like they already shipped experimental support it seems |
Use built-in Node APIs instead
rimraf
.The text was updated successfully, but these errors were encountered: