fix(sveltekit): Read Cloudflare execution context from platform.ctx - #23293
Open
chargome wants to merge 2 commits into
Open
fix(sveltekit): Read Cloudflare execution context from platform.ctx#23293chargome wants to merge 2 commits into
chargome wants to merge 2 commits into
Conversation
Member
Author
|
bugbot run |
Contributor
size-limit report 📦
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bdbb79b. Configure here.
`@sveltejs/adapter-cloudflare` 8 renamed `platform.context` to `platform.ctx`. Read `ctx` and fall back to `context` so adapter <= 7 keeps working. This fails silently: the execution context is optional-chained everywhere, so a missed lookup drops events instead of throwing. Refs sveltejs/kit#16668 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The `any` mirrored core's `MinimalCloudflareContext` but was never necessary here. Method parameters are bivariant, so the type stays mutually assignable with the real `ExecutionContext.waitUntil(promise: Promise<any>)` in both directions, and the promise is only ever passed through rather than inspected. Drops the lint suppression along with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chargome
force-pushed
the
fix/sveltekit-cloudflare-execution-context
branch
from
August 11, 2026 14:46
bdbb79b to
e501c3d
Compare
chargome
marked this pull request as ready for review
August 11, 2026 15:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

@sveltejs/adapter-cloudflare8 renamedplatform.contexttoplatform.ctx. We now readctxand fall back tocontextso adapter <= 7 keeps working.This fails silently — the execution context is optional-chained everywhere, so a missed lookup drops events instead of throwing.
Refs sveltejs/kit#16668