kit
kit copied to clipboard
feat: add `HEAD` handler
closes https://github.com/sveltejs/kit/issues/9468
Allows exporting the HEAD handler. Not sure if language-tools needs to be updated to remove the error message for this as well.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
- [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it solves.
- [x] Ideally, include a test that fails without this PR but passes with it.
Tests
- [x] Run the tests with
pnpm testand lint the project withpnpm lintandpnpm check
Changesets
- [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.
🦋 Changeset detected
Latest commit: 93fb961b501bba01425f0c3ba9ba2d37a1cba279
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @sveltejs/kit | Minor |
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
@s3812497 it looks like this PR will need a rebase
Thanks for the reminder @benmccann . I've just learnt what a rebase is. I did a merge before that (hence the force push trying to undo that). Will use rebase from now on.
Oh, I just use the term rebase out of habit. But really I think folks prefer if you do a merge because if they have the code checked out it's easier to pull a merge
@s3812497 this has a merge conflict - can you look at it today? Else I'll look into it later.
@s3812497 this has a merge conflict - can you look at it today? Else I'll look into it later.
Sure thing! I'll have a look at it now.
I wonder if we'd want some sort of fallback implementation which executes GET and returns just the headers or if that defeats the purpose? I've never used HEAD before
That fallback already exists today, and will still apply if you don't define the HEAD yourself.