-
Notifications
You must be signed in to change notification settings - Fork 76
Ember 5.0 #268
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
base: master
Are you sure you want to change the base?
Ember 5.0 #268
Conversation
I attempted to leave the logic untouch as much as possible, converting mostly notation, with a few exceptions: - The `_onInit` event handler and `init` hooks had to be replaced by logic in the constructor and class fields. - `_init` method was renamed to `prepare` because it is overridden in test app's adapters and couldn't be made a true private method. Also, naming it `init` would collide with EmberObject hooks. - Made the constructor take the database object as parameter. Because `init` hooks runs after the constructor, this gave extending adapters enough time to set `this.db`. As we merged those into the constructor, the change handler would not be set, as `db` would not be defined yet. This is a breaking change. This commit also updates the test adapters to use this new constructor API.
… because it does not prove anything really.
…This is a breaking change.
…y be re-exportation of `PouchSerializer`. Instead of providing the application serializer in the addon, defines it only in the dummy app.
- Corrects ESLint config file name - dds rule to ignore variables starting with `_` - Prevents import linting errors in the ESLint config file itself
- Moves `PouchModel` to `models/pouch.js` - Exports the model from the new path - Adds a model export from `/app` - Exports `PouchDB`, with plugins already attached, directly from the addon
- Ignores variables and arguments starting with `_` - Marks blueprint exports as commonjs
Also, removes unused `@eslint/eslintrc` and adds `@ember/test-waiters` as dev dependencies.
Thanks for your ongoing work on this. I don’t think I have release permissions which does seem like something to figure out before merging your other branch and then this. But I appreciate your dedication and I’ll review this in the next few days. |
Thanks @backspace! I can work on my app with this as it is currently by adding a git dependency directly. Also, the codebase is already quite useable as I am finding out, so I'm not in a hurry. |
Note on the failing |
@jlami can you take a look at the failing checks? |
This commit provides support for Ember and EmberData >=5.x (including 6.x).
What was done?
This PR takes the Ember v4.x branch code and adapts it to Ember/Data >=5.x.
Also, converts this into a V2 addon.
What was not done?
This does NOT attempt to phase out EmberData's adapter paradigm yet.
Testing
Tests run fine via
ember test
, butember-try
fails.Breaking changes
IMPORTANT! Underlying model naming
Due to compatibility reasons,
ember-pouch
used camelCase model names everywhere. This was deprecated and is planned for removal at Data 6.x.This also removes all compatibility behaviour and passes model names as-is. This means that old data may be inaccessible.
The old behaviour can be restored by overriding the derived adapter's
getRecordTypeName()
method.Transform exports
If
transform:attachment
ortransform:attachments
are needed, they now need to be explicitly exported by the consuming app:E.g., for
transform:attachment
:Afterword
As said before, I am available if anything is needed to getting this working well.
🖖🏽