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

feat: Feathers v5 core refactoring and features #2255

Merged
merged 16 commits into from
Mar 19, 2021
Merged

feat: Feathers v5 core refactoring and features #2255

merged 16 commits into from
Mar 19, 2021

Conversation

daffl
Copy link
Member

@daffl daffl commented Mar 18, 2021

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.setup and app.listen are 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/hooks

This 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 for before, after and error service 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.

  • Typed app.get and app.set
  • Improved application service declaration
  • Fully typed hook context including proper application and service type
  • Individual service request and response types

Addresses the following issues:

@daffl daffl added this to the v5 (Dove) milestone Mar 18, 2021
@daffl daffl changed the title Feathers v5 core refactoring feat: Feathers v5 core refactoring and features Mar 18, 2021
@daffl daffl merged commit 2dafb7c into dove Mar 19, 2021
@daffl daffl deleted the ts-refactor-dove branch March 19, 2021 22:04
@ismail-codinglab
Copy link

Damn that's one hell of a typescript improvement, no more wild guesses or lots of any workaround. 👍 🥳

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment