-
Notifications
You must be signed in to change notification settings - Fork 26
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
Replace Ember Data Packages #7914
Conversation
54e23fe
to
604fe6b
Compare
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.
LGTM
I'd love to merge this but the conflicting file - |
Instead pull all the packages we need directly and then build our own store. This store is copied from the one in the existing `ember-data` package.
These transforms used to be proved by `ember-data`, but now we need to import them ourselves.
Ember Data does this slightly differently now, having dropped ember-inflector. We had rules strewn about, I've consolidated into a single initializer.
Fixes issues with pnpm peer dependencies.
This is the new configuration pattern for ember-data. We need the legacy support to be included in our build so we add that here.
Added: @ember-data/request @ember-data/request-utils @ember-data/legacy-compat as we use them in transforms and our store. I'm not sure why it works in embroider without it, but it won't build the classic app.
Our new inflector rules seem to be working now.
e8463fe
to
c9c1774
Compare
@dartajax - merge conflict resolved. pls merge once tests have passed again. |
supersedes #7901 |
The future of Ember Data is in smaller packages, currently this is done by providing the
ember-data
meta package which includes the others as well as configuring a store. I've removed the middle man and relied directly on the individual packages as well as configuring our store to match the default one. Doing things this way resolves issues we've been having with peer dependencies, ember data, mirage, and ember-file upload.Because we're jumping from the meta package forward to this point I also had to clear deprecations for providing transforms and inflector rules as well as configure the build in a new way.
I wasn't able to get around
pnpm
issues by installing these packages only in common, I tried all the combinations of dev/dep/peer I could think of, still got errors, instead I needed to install the data packages in each app. I think this is fine, we should get all the updates as a group from dependabot anyway.