Conversation
| Hooks.prototype.validate = function (hook, fn) { | ||
| if (typeof hook !== 'string') throw new FST_ERR_HOOK_INVALID_TYPE() | ||
| if (supportedHooks.indexOf(hook) === -1) { | ||
| if (Array.isArray(this[hook]) === false) { |
There was a problem hiding this comment.
Too relax for the check. I would put the supported hook as the static property of Hooks class.
So it own Hooks.ApplicationHooks, Hooks.LifeCycleHooks and Hooks.CustomHooks.
Then, it should be extendible in future by adding custom hook name to the Hooks.CustomHooks
mcollina
left a comment
There was a problem hiding this comment.
LGTM with @climba03003 considerations
|
I personally disagree. By changing the prototype to NullObject, we only have add and validate and the rest are the arrays of the hooks. |
|
I quite dont get, why @climba03003 and @mcollina want to separate the hook names into two or three Objects/Arrays. In my PR I basically make Hooks inheriting from null property. So Hooks only has the methods @climba03003 wrote that the check is too loose (which is disagree). And that he wants three additional attributes: It makes for me not sense to check three different Objects or Arrays to determine if we have those Hooks already or not, if fastify is just having a method called |
Eomm
left a comment
There was a problem hiding this comment.
Can't see the pro on splitting the hooks too right now
If we want to add a CustomHooks, the split should stay in that PR, IMHO
For sure a static array would be helpful if we expose it. I listed the hooks in different plugins tho
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Can you clarify this? I'm not sure what you refer to. |
|
You wrote LGTM with @climba03003 considerations. So I assume you want the changes proposed by @climba03003 ? |
I see there is other place using Array.isArray for checking the same thing. So, not blocking.
|
My concern of the direction of this work is that it might slow us down without us realizing it. I wrote a good part of the hook system to maximize its performance, which meant duplicating some code. I would prefer to have all custom hooks elsewhere. |
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.io/) ([source](https://togithub.com/fastify/fastify)) | [`4.19.2` -> `4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0) #### What's Changed - build(deps-dev): Bump [@​sinclair/typebox](https://togithub.com/sinclair/typebox) from 0.28.20 to 0.29.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877) - Update Prototype-Poisoning.md by [@​ed-henrique](https://togithub.com/ed-henrique) in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - docs: adjust line for linter by [@​metcoder95](https://togithub.com/metcoder95) in [https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882) - Fixed type inference on .code().send() by [@​aadito123](https://togithub.com/aadito123) in [https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880) - chore: refactor Error-typings and tests by [@​svrnwnsch](https://togithub.com/svrnwnsch) in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - test: add missing assertion for a test by [@​kibertoad](https://togithub.com/kibertoad) in [https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701) - chore: tests for genReqIdFactory and minor changes by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783) - Added type definition for allowUnsafeRegex by [@​xijdk](https://togithub.com/xijdk) in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - docs(security): update policy on ci/cd reports by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890) - improve hooks.validate by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804) - ci: enable caching; split jobs by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889) - docs(plugins): note side-effect when using `await` in `fastify.register()` by [@​hateablestream](https://togithub.com/hateablestream) in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - \[hooks] Refine hook runners by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805) - docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md by [@​graphiteisaac](https://togithub.com/graphiteisaac) in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - fix: rework FastifyErrors, ensure documentation completeness by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892) - feat: add childLoggerFactory config by [@​brettwillis](https://togithub.com/brettwillis) in [https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760) - Fix setNotFoundHandler handler type by [@​Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in [https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897) - restore code coverage by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841) - fix: handle abort signal before server is ready by [@​shayff](https://togithub.com/shayff) in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - docs(client-aborted): remove deprecated function by [@​JekRock](https://togithub.com/JekRock) in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - Revert "docs(client-aborted): remove deprecated function ([#​4898](https://togithub.com/fastify/fastify/issues/4898))" by [@​climba03003](https://togithub.com/climba03003) in [https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901) - docs(logging): fix typo by [@​yamanidev](https://togithub.com/yamanidev) in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - Support IPv6 ::1 in listeningOrigin by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902) - fix: extend isCustomValidatorCompiler from parent controller by [@​tinchoz49](https://togithub.com/tinchoz49) in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) - fix: allow uppercase requestdHeader by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906) #### New Contributors - [@​ed-henrique](https://togithub.com/ed-henrique) made their first contribution in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - [@​svrnwnsch](https://togithub.com/svrnwnsch) made their first contribution in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - [@​xijdk](https://togithub.com/xijdk) made their first contribution in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - [@​hateablestream](https://togithub.com/hateablestream) made their first contribution in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - [@​graphiteisaac](https://togithub.com/graphiteisaac) made their first contribution in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - [@​shayff](https://togithub.com/shayff) made their first contribution in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - [@​JekRock](https://togithub.com/JekRock) made their first contribution in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - [@​yamanidev](https://togithub.com/yamanidev) made their first contribution in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - [@​tinchoz49](https://togithub.com/tinchoz49) made their first contribution in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) **Full Changelog**: fastify/fastify@v4.19.2...v4.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/tomacheese/telcheck). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.io/) ([source](https://togithub.com/fastify/fastify)) | [`4.19.2` -> `4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0) #### What's Changed - build(deps-dev): Bump [@​sinclair/typebox](https://togithub.com/sinclair/typebox) from 0.28.20 to 0.29.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877) - Update Prototype-Poisoning.md by [@​ed-henrique](https://togithub.com/ed-henrique) in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - docs: adjust line for linter by [@​metcoder95](https://togithub.com/metcoder95) in [https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882) - Fixed type inference on .code().send() by [@​aadito123](https://togithub.com/aadito123) in [https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880) - chore: refactor Error-typings and tests by [@​svrnwnsch](https://togithub.com/svrnwnsch) in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - test: add missing assertion for a test by [@​kibertoad](https://togithub.com/kibertoad) in [https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701) - chore: tests for genReqIdFactory and minor changes by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783) - Added type definition for allowUnsafeRegex by [@​xijdk](https://togithub.com/xijdk) in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - docs(security): update policy on ci/cd reports by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890) - improve hooks.validate by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804) - ci: enable caching; split jobs by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889) - docs(plugins): note side-effect when using `await` in `fastify.register()` by [@​hateablestream](https://togithub.com/hateablestream) in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - \[hooks] Refine hook runners by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805) - docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md by [@​graphiteisaac](https://togithub.com/graphiteisaac) in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - fix: rework FastifyErrors, ensure documentation completeness by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892) - feat: add childLoggerFactory config by [@​brettwillis](https://togithub.com/brettwillis) in [https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760) - Fix setNotFoundHandler handler type by [@​Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in [https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897) - restore code coverage by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841) - fix: handle abort signal before server is ready by [@​shayff](https://togithub.com/shayff) in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - docs(client-aborted): remove deprecated function by [@​JekRock](https://togithub.com/JekRock) in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - Revert "docs(client-aborted): remove deprecated function ([#​4898](https://togithub.com/fastify/fastify/issues/4898))" by [@​climba03003](https://togithub.com/climba03003) in [https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901) - docs(logging): fix typo by [@​yamanidev](https://togithub.com/yamanidev) in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - Support IPv6 ::1 in listeningOrigin by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902) - fix: extend isCustomValidatorCompiler from parent controller by [@​tinchoz49](https://togithub.com/tinchoz49) in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) - fix: allow uppercase requestdHeader by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906) #### New Contributors - [@​ed-henrique](https://togithub.com/ed-henrique) made their first contribution in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - [@​svrnwnsch](https://togithub.com/svrnwnsch) made their first contribution in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - [@​xijdk](https://togithub.com/xijdk) made their first contribution in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - [@​hateablestream](https://togithub.com/hateablestream) made their first contribution in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - [@​graphiteisaac](https://togithub.com/graphiteisaac) made their first contribution in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - [@​shayff](https://togithub.com/shayff) made their first contribution in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - [@​JekRock](https://togithub.com/JekRock) made their first contribution in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - [@​yamanidev](https://togithub.com/yamanidev) made their first contribution in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - [@​tinchoz49](https://togithub.com/tinchoz49) made their first contribution in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) **Full Changelog**: fastify/fastify@v4.19.2...v4.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.io/) ([source](https://togithub.com/fastify/fastify)) | [`4.19.2` -> `4.20.0`](https://renovatebot.com/diffs/npm/fastify/4.19.2/4.20.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v4.20.0`](https://togithub.com/fastify/fastify/releases/tag/v4.20.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.19.2...v4.20.0) #### What's Changed - build(deps-dev): Bump [@​sinclair/typebox](https://togithub.com/sinclair/typebox) from 0.28.20 to 0.29.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/4877](https://togithub.com/fastify/fastify/pull/4877) - Update Prototype-Poisoning.md by [@​ed-henrique](https://togithub.com/ed-henrique) in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - docs: adjust line for linter by [@​metcoder95](https://togithub.com/metcoder95) in [https://github.com/fastify/fastify/pull/4882](https://togithub.com/fastify/fastify/pull/4882) - Fixed type inference on .code().send() by [@​aadito123](https://togithub.com/aadito123) in [https://github.com/fastify/fastify/pull/4880](https://togithub.com/fastify/fastify/pull/4880) - chore: refactor Error-typings and tests by [@​svrnwnsch](https://togithub.com/svrnwnsch) in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - test: add missing assertion for a test by [@​kibertoad](https://togithub.com/kibertoad) in [https://github.com/fastify/fastify/pull/4701](https://togithub.com/fastify/fastify/pull/4701) - chore: tests for genReqIdFactory and minor changes by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4783](https://togithub.com/fastify/fastify/pull/4783) - Added type definition for allowUnsafeRegex by [@​xijdk](https://togithub.com/xijdk) in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - docs(security): update policy on ci/cd reports by [@​jsumners](https://togithub.com/jsumners) in [https://github.com/fastify/fastify/pull/4890](https://togithub.com/fastify/fastify/pull/4890) - improve hooks.validate by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4804](https://togithub.com/fastify/fastify/pull/4804) - ci: enable caching; split jobs by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4889](https://togithub.com/fastify/fastify/pull/4889) - docs(plugins): note side-effect when using `await` in `fastify.register()` by [@​hateablestream](https://togithub.com/hateablestream) in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - \[hooks] Refine hook runners by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4805](https://togithub.com/fastify/fastify/pull/4805) - docs: fix wrong header size for FST_ERR_ASYNC_CONSTRAINT in Errors.md by [@​graphiteisaac](https://togithub.com/graphiteisaac) in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - fix: rework FastifyErrors, ensure documentation completeness by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4892](https://togithub.com/fastify/fastify/pull/4892) - feat: add childLoggerFactory config by [@​brettwillis](https://togithub.com/brettwillis) in [https://github.com/fastify/fastify/pull/4760](https://togithub.com/fastify/fastify/pull/4760) - Fix setNotFoundHandler handler type by [@​Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in [https://github.com/fastify/fastify/pull/4897](https://togithub.com/fastify/fastify/pull/4897) - restore code coverage by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4841](https://togithub.com/fastify/fastify/pull/4841) - fix: handle abort signal before server is ready by [@​shayff](https://togithub.com/shayff) in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - docs(client-aborted): remove deprecated function by [@​JekRock](https://togithub.com/JekRock) in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - Revert "docs(client-aborted): remove deprecated function ([#​4898](https://togithub.com/fastify/fastify/issues/4898))" by [@​climba03003](https://togithub.com/climba03003) in [https://github.com/fastify/fastify/pull/4901](https://togithub.com/fastify/fastify/pull/4901) - docs(logging): fix typo by [@​yamanidev](https://togithub.com/yamanidev) in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - Support IPv6 ::1 in listeningOrigin by [@​mcollina](https://togithub.com/mcollina) in [https://github.com/fastify/fastify/pull/4902](https://togithub.com/fastify/fastify/pull/4902) - fix: extend isCustomValidatorCompiler from parent controller by [@​tinchoz49](https://togithub.com/tinchoz49) in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) - fix: allow uppercase requestdHeader by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/fastify/fastify/pull/4906](https://togithub.com/fastify/fastify/pull/4906) #### New Contributors - [@​ed-henrique](https://togithub.com/ed-henrique) made their first contribution in [https://github.com/fastify/fastify/pull/4879](https://togithub.com/fastify/fastify/pull/4879) - [@​svrnwnsch](https://togithub.com/svrnwnsch) made their first contribution in [https://github.com/fastify/fastify/pull/4824](https://togithub.com/fastify/fastify/pull/4824) - [@​xijdk](https://togithub.com/xijdk) made their first contribution in [https://github.com/fastify/fastify/pull/4792](https://togithub.com/fastify/fastify/pull/4792) - [@​hateablestream](https://togithub.com/hateablestream) made their first contribution in [https://github.com/fastify/fastify/pull/4846](https://togithub.com/fastify/fastify/pull/4846) - [@​graphiteisaac](https://togithub.com/graphiteisaac) made their first contribution in [https://github.com/fastify/fastify/pull/4893](https://togithub.com/fastify/fastify/pull/4893) - [@​shayff](https://togithub.com/shayff) made their first contribution in [https://github.com/fastify/fastify/pull/4886](https://togithub.com/fastify/fastify/pull/4886) - [@​JekRock](https://togithub.com/JekRock) made their first contribution in [https://github.com/fastify/fastify/pull/4898](https://togithub.com/fastify/fastify/pull/4898) - [@​yamanidev](https://togithub.com/yamanidev) made their first contribution in [https://github.com/fastify/fastify/pull/4905](https://togithub.com/fastify/fastify/pull/4905) - [@​tinchoz49](https://togithub.com/tinchoz49) made their first contribution in [https://github.com/fastify/fastify/pull/4903](https://togithub.com/fastify/fastify/pull/4903) **Full Changelog**: fastify/fastify@v4.19.2...v4.20.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi44LjExIiwidXBkYXRlZEluVmVyIjoiMzYuOC4xMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I want to make the Hooks Class capable of handling other events too. To make it possible to add in future more events, the validation function will check if a field is an Array. Also making hooks extend from NullObject, so prototype pollution is not possible.
Checklist
npm run testandnpm run benchmarkand the Code of conduct