-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[chore] remove InternalHandle
#3541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 7419aea 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 |
|
✔️ Deploy Preview for kit-demo canceled. 🔨 Explore the source changes: 7419aea 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/61f16339d09ba400082af852 |
Rich-Harris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, looking at the code, i think this does exist for a reason. lemme come back to this
|
my motivation for this was to move AMP validation to a hook, but it depended on this. I pushed a branch for that here: https://github.com/sveltejs/kit/tree/amp-hook I couldn't figure out how to get the types to work otherwise. I could probably do it by casting the types and/or using |
|
so, here's the problem. if a lambda is rendering a page kit/packages/kit/src/runtime/server/index.js Lines 176 to 189 in 1474aee
at the same time, this does mean that the export async function handle({ event, resolve }) {
const response = resolve(event);
response.headers.set('x-vegetable', 'potato'); // errors — response is undefined
return response;
}i think that's the only place where we're using the lack of a response that way (though at the same time i'm pretty sure the distinction between |
7a255d3 to
6013524
Compare
|
Ok. I think I've fixed that by moving where the real HTTP request occurs |
|
oh, nice — nailed it. this is way better |
|
cloudflare app is failing to deploy but that has to be unrelated. choosing to ignore it |
We were setting the type of the user-provided
handlefunction asInternalHandle, which is not correct and was making it ward to work with