feat: Feathers v5 core refactoring and features#2255
Merged
Conversation
|
Damn that's one hell of a typescript improvement, no more wild guesses or lots of I don't mind this being a big pr as long as it's covered by tests, which it look like it is. Do you know when or in which version/tag this will be available? Again thanks for all that you do to make our lives easier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not a huge fan of single massive PRs especially if they will break things but it turned out that there wasn't really a way around it since some of the changes were pretty substantial and overarching. Overall documented API usage is mostly backwards compatible. Breaking changes are being documented in the v5 migration guide.
This pull request addresses several long standing feature request and issues broken down as follows:
Asynchronous application initialization
app.setupandapp.listenare now asynchronous. This allows to initialize databases, connections and can be combined with the new @feathersjs/hooks for more complex workflows.Custom methods
This lays the groundwork for custom methods laid out in #1976 but still needs tests.
Asynchronous middleware with
@feathersjs/hooksThis pull request builds on top of @bertho-zero's work and should finalize the migration to the new asynchronous
@featherjs/hooks. It contains a backwards compatible wrappers forbefore,afteranderrorservice and application hooks but makes asynchronous hooks a first class citizen.This also allows improved error handling, including better stack traces.
TypeScript improvements
Also included are major TypeScript improvements which should also allow better usability and code completion in editors like VSCode for non-TypeScript users.
app.getandapp.setAddresses the following issues:
context.app.service('service-name')Typed? #1742