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

Replace Ember Data Packages #7914

Merged
merged 10 commits into from
Jul 3, 2024
Merged

Conversation

jrjohnson
Copy link
Member

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.

@jrjohnson jrjohnson closed this Jun 28, 2024
@jrjohnson jrjohnson reopened this Jun 28, 2024
@jrjohnson jrjohnson marked this pull request as ready for review June 28, 2024 21:12
@stopfstedt stopfstedt self-requested a review July 1, 2024 18:08
Copy link
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dartajax
Copy link
Member

dartajax commented Jul 1, 2024

I'd love to merge this but the conflicting file - pnpm-lock.yaml is preventing me from doing that.

jrjohnson and others added 10 commits July 1, 2024 12:09
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.
@stopfstedt
Copy link
Member

I'd love to merge this but the conflicting file - pnpm-lock.yaml is preventing me from doing that.

@dartajax - merge conflict resolved. pls merge once tests have passed again.

@dartajax dartajax merged commit 588885b into ilios:master Jul 3, 2024
27 checks passed
@jrjohnson jrjohnson deleted the ember-data-replace-store branch July 4, 2024 20:53
@stopfstedt
Copy link
Member

supersedes #7901

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