Repository navigation
fix: serialize server load data before passing to universal load, to handle mutations - #14268
Merged
Merged
Conversation
… to handle mutations
6 tasks
🦋 Changeset detectedLatest commit: 5aab6bf 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 |
elliott-with-the-longest-name-on-github
approved these changes
Aug 19, 2025
Merged
6 tasks done
PatrickG
added a commit
to PatrickG/kit
that referenced
this pull request
Aug 22, 2025
6 tasks done
Rich-Harris
added a commit
that referenced
this pull request
Aug 28, 2025
…ternative (#14298) * add universal load to /streaming/server test * revert #14268 * server data serializer * Satisfy linter * rethrow serialization error after load promises are resolved * format * add changeset * get rid of the global placeholder * fix dumb mistake * fix errors * return directly again * return iterator even if all promises are resolved already * prevent memory leak * format * use `DEV` from `esm-env` * revert reordering * revert reordering * revert reordering * revert reordering * remove type, everything is a type in a .d.ts file * revert reordering * serialize -> add_node * unused * simplify create_async_iterator * avoid the need for set_nonce dance --------- Co-authored-by: Rich Harris <[email protected]>
Copilot AI
pushed a commit
to Stadly/kit
that referenced
this pull request
Mar 6, 2026
… to handle mutations (sveltejs#14268) * failing test * fix: serialize server `load` data before passing to universal `load`, to handle mutations * ugh
Copilot AI
pushed a commit
to Stadly/kit
that referenced
this pull request
Mar 6, 2026
…ternative (sveltejs#14298) * add universal load to /streaming/server test * revert sveltejs#14268 * server data serializer * Satisfy linter * rethrow serialization error after load promises are resolved * format * add changeset * get rid of the global placeholder * fix dumb mistake * fix errors * return directly again * return iterator even if all promises are resolved already * prevent memory leak * format * use `DEV` from `esm-env` * revert reordering * revert reordering * revert reordering * revert reordering * remove type, everything is a type in a .d.ts file * revert reordering * serialize -> add_node * unused * simplify create_async_iterator * avoid the need for set_nonce dance --------- Co-authored-by: Rich Harris <[email protected]>
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.
Fixes #12236. The implementation isn't totally ideal — it causes the server
loadreturn value to be serialized twice ifdatais used in a universalloadfunction, and changing that would be finicky — but given our overall trajectory towards remote functions I think it's an acceptable trade-off given that usingdatais probably relatively rare (and it only affects SSR, not data for subsequent client-side navigations).Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits