Skip to content
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

[BUGFIX release] Remove ember-fetch dependency. #6077

Merged
merged 1 commit into from
May 1, 2019

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented May 1, 2019

This change removes ember-fetch as a direct dependency of ember-data, and allows for this dependency to be provided by the host application or for users to directly use native fetch.

Having ember-fetch as a direct dependency of ember-data has proven troublesome. There are issues using ember-fetch as a nested dependency (these are documented in the ember-fetch README), but it is also quite difficult for ember-data to ensure that the versions of ember-fetch provided will actually include the correct version (duplicated addon merging in the ember-cli addon space is complicated and error prone).

This change moves the determineBodyPromise and serializeQueryParams helper functions directly into @ember-data/adapter. A future version of ember-fetch will drop these utilities (as well as the ember-data adapter mixin). In addition, this also enables usage of the global fetch if a fetch module is not provided.

ember-cli/ember-fetch#289 has been created to track removing the ember-data support code from ember-fetch.

This change removes ember-fetch as a direct dependency of ember-data,
and allows for this dependency to be provided by the host application
or for users to directly use native fetch.

Having `ember-fetch` as a direct dependency of ember-data has proven
troublesome. There are issues using ember-fetch as a nested dependency
(these are documented in the ember-fetch README), but it is also quite
difficult for ember-data to ensure that the versions of `ember-fetch`
provided will actually include the correct version (duplicated addon
merging in the ember-cli addon space is complicated and error prone).

This change moves the `determineBodyPromise` and `serializeQueryParams`
helper functions directly into `@ember-data/adapter`. A future version
of ember-fetch will drop these utilities (as well as the ember-data
adapter mixin). In addition, this also enables usage of the global
`fetch` if a `fetch` module is not provided.
@Turbo87
Copy link
Member

Turbo87 commented May 7, 2019

this change is causing build warnings:

'require' is imported by ../../../../../var/folders/6y/_8qpkt114jzb442txt_9w_2c0000gn/T/broccoli-27019nKpnRWsSqjWT/cache-596-rollup/build/-private/utils/fetch.js, but could not be resolved – treating it as an external dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants