fix: prevent hooks exported from hooks.js from overwriting hooks from hooks.server.js#13104
fix: prevent hooks exported from hooks.js from overwriting hooks from hooks.server.js#13104Rich-Harris merged 3 commits intomainfrom
hooks.js from overwriting hooks from hooks.server.js#13104Conversation
hooks.js from overwriting hooks in hooks.server.jshooks.js from overwriting hooks from hooks.server.js
🦋 Changeset detectedLatest commit: ada0065 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@Rich-Harris @eltigerchino |
Yes, |
fixes #12065
Instead of spreading the imported functions from the server hooks file and universal hooks file, this PR changes it to specifically import and return each hook. This prevents similarly named hooks exported from
hook.jsfrom overwriting hooks fromhook.server.jsPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits