Skip to content

fix: populate App.Platform with context property #14203

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rich-Harris
Copy link
Member

Adds missing context property to App.Platform when using adapter-netlify (so that event.platform is typed and gets autocomplete). For this to be truly useful we need to merge #12090 but that will have to wait for SvelteKit 3. In the meantime, this will help get the docs building on #13928

Copy link

changeset-bot bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: af70ed1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-netlify Patch

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

@svelte-docs-bot
Copy link

@Rich-Harris
Copy link
Member Author

Apparently the context that the event handler is called with bears no relation to import('@netlify/types').Context, which seems... surprising to say the least. I guess I will have to build a Netlify app to test this out

@Rich-Harris
Copy link
Member Author

Okay so it looks like the Frameworks API has completely changed since the adapter was created, and we probably need to rewrite it

@Rich-Harris Rich-Harris marked this pull request as draft August 13, 2025 21:12
Rich-Harris added a commit that referenced this pull request Aug 13, 2025
Rich-Harris added a commit that referenced this pull request Aug 13, 2025
* add types

* align config export and replace sh with bash

* type errors to go with new type fixes in svelte.dev

* separate syntax highlighting into a different pr

* actually i guess this section was moved above? removing

* add error annotation pending rewrite in #14203

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant