ember-cli / ember-fetch

HTML5 fetch polyfill from github wrapped and bundled for ember-cli users.
MIT License
176 stars 82 forks source link

Rewrite ember-fetch to a v2 addon #740

Closed StephanH90 closed 9 months ago

StephanH90 commented 11 months ago

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:

Breaking

The only change that has to be made, if somebody wants to upgrade to v9 is that they have to import a setupFetchWaiter function which wraps the native fetch with an waitForPromise. This means that fetch will continue to work in tests as it has done in the past. Using the setupFetchWaiter would look something like this:

import { setupFetchWaiter } from 'ember-fetch';

setupFetchWaiter();

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.

NullVoxPopuli commented 11 months ago

Looks like nohe modules got committed 🙃

NullVoxPopuli commented 9 months ago

Can you re-target main/master? I closed the next branch, and made a v8 for bugfixes/backports