-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Rewrite ember-fetch to a v2 addon #740
Conversation
Looks like nohe modules got committed 🙃 |
355c675
to
c7a4ef7
Compare
c7a4ef7
to
b3ce7be
Compare
README.md
Outdated
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.
We'll want to keep README.md and RELEASE.md, .release-it.json
, and the CHANGELOG.md should be move in to the ember-fetch
directory.
.github/dependabot.yml
Outdated
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.
we probably want to keep this as well
|
||
export { | ||
setupFetchWaiter, | ||
fetch, // fetch is re-exported here for backwards compatbiility |
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.
this fetch
will be undefined unless isTesting
, which isn't quite right.
We'll want it to be globalThis.fetch
8cd9f1a
to
3710308
Compare
Can you re-target main/master? I closed the |
Description
The goal is to make
ember-fetch
a v2 addon, removing all the old fetch polyfill stuff while maintaining backwards compatibility. This MR is the first step in this process.This MR basically:
setupFetchWaiter
function which provides backwards compatibility in testsfetch
fromember-fetch
for backwards compatibility (its just the native fetch)Breaking
The only change that has to be made, if somebody wants to upgrade to
v9
is that they have to import asetupFetchWaiter
function which wraps the native fetch with anwaitForPromise
. This means that fetch will continue to work in tests as it has done in the past. Using thesetupFetchWaiter
would look something like this:In development and production builds this does nothing.
Next steps
In the next steps various other addons will have to be pulled into test apps to make sure that they continue to work with this version of fetch.