8000 fix(core): Run after all hooks first, and then after method hooks by KidkArolis · Pull Request #3004 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

fix(core): Run after all hooks first, and then after method hooks#3004

Merged
daffl merged 1 commit intofeathersjs:dovefrom
KidkArolis:fix-after-hook-order
Jan 28, 2023
Merged

fix(core): Run after all hooks first, and then after method hooks#3004
daffl merged 1 commit intofeathersjs:dovefrom
KidkArolis:fix-after-hook-order

Conversation

@KidkArolis
Copy link
Contributor

Summary

Fix #3002 - bring back the "after all" and "after method" hook ordering from V4.

The implementation is not as neat as it was before (having just 1 set of collected hooks was a nice idea). Let me know if you have a better idea.

@netlify
Copy link
netlify bot commented Jan 23, 2023

‼️ Deploy request for feathers-dove rejected.

Name Link
🔨 Latest commit f771955

@daffl daffl changed the title fix(feathers): Run after all hooks first, and then after method hooks fix(core): Run after all hooks first, and then after method hooks Jan 28, 2023
@daffl
Copy link
Member
daffl commented Jan 28, 2023

Thank you for looking into this. I can't believe we didn't have a test covering that. I was trying a few things to see if there was a different fix but I think this will have to be it for now. The fun and not-so-fun fact here is that a lot of that code is for backwards compatibility for a very specific case which is being able to call service.hooks multiple times.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After all and after method specific hook order changed in V5

2 participants

0