-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update node-fetch and use newer style #97
base: main
Are you sure you want to change the base?
Conversation
This doesn't seem to work - the output file is named .cjs but it uses the wrong (new) import style.
This requires the experimental "node12" setting for "module", which is only available on nightly builds. From trying out different combinations, the "moduleResolution" also needs to be set to "node12" (this is available for tsc >= 4.5). It seems that this combination also needs a slight change when importing default modules ("import * as ... from ..."), and this requires setting the "esModuleInterop" option (or, more specifically, the "allowSyntheticDefaultImports" option, which the former sets).
I thought I had this working now (builds, producing ES6 output except for However, the tests are still not running and it looks like this may require a cascade of changes. It may be easier to try dynamically importing |
Some more comments:
|
Labelled as blocked because of the situation above, though I haven't checked progress on the linked issues recently. |
Fixes #96.
fetch-node
v3.This may be useful long-term if more packages move to ES6-only imports.