8000 feat(core): Rename async hooks to around hooks, allow usual registration format by daffl · Pull Request #2652 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

feat(core): Rename async hooks to around hooks, allow usual registration format#2652

Merged
daffl merged 5 commits intodovefrom
around-hooks
Jun 6, 2022
Merged

feat(core): Rename async hooks to around hooks, allow usual registration format#2652
daffl merged 5 commits intodovefrom
around-hooks

Conversation

@daffl
Copy link
Member
@daffl daffl commented Jun 1, 2022

This pull request renames the new "async" @featherjs/hooks to "around" hooks since it is much more descriptive and in line with the Common LISP terminology for essentially the same thing. It also adds them as a new type to the registration format we are already using and updates the hook handling to use the new collect functionality from @feathersjs/hooks:

app.service('myservice').hooks({
  around: {
    all: [],
    get: [],
    myCustomMethod: []
  },
  before: {
    all: [],
    get: []
  },
  after: {},
  error: {}
})

This should allow for a smooth transition of introducing a new hook type.

@daffl daffl changed the title feat(core): Rename async hooks to around hooks and allow usual registration format feat(core): Rename async hooks to around hooks, allow usual registration format and use new hooks collect utility Jun 4, 2022
@daffl daffl changed the title feat(core): Rename async hooks to around hooks, allow usual registration format and use new hooks collect utility feat(core): Rename async hooks to around hooks, allow usual registration format Jun 4, 2022
@daffl daffl merged commit 2a485a0 into dove Jun 6, 2022
@daffl daffl deleted the around-hooks branch June 6, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

44B2
None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0