kit icon indicating copy to clipboard operation
kit copied to clipboard

feat: add `HEAD` handler

Open teemingc opened this issue 2 years ago • 4 comments

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 test and lint the project with pnpm lint and pnpm 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 changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

teemingc avatar Apr 23 '23 15:04 teemingc

🦋 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

changeset-bot[bot] avatar Apr 23 '23 15:04 changeset-bot[bot]

@s3812497 it looks like this PR will need a rebase

benmccann avatar May 27 '23 04:05 benmccann

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.

teemingc avatar May 27 '23 08:05 teemingc

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

benmccann avatar May 27 '23 13:05 benmccann

@s3812497 this has a merge conflict - can you look at it today? Else I'll look into it later.

dummdidumm avatar Jul 04 '23 13:07 dummdidumm

@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.

teemingc avatar Jul 04 '23 13:07 teemingc

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

benmccann avatar Jul 04 '23 13:07 benmccann

That fallback already exists today, and will still apply if you don't define the HEAD yourself.

dummdidumm avatar Jul 04 '23 13:07 dummdidumm