Commit b8fd326
feat: async SSR (#16748)
* feat: First pass at payload
* first crack
* snapshots
* checkpoint
* fix: cloning
* add test option
* big dumb
* today's hard work; few tests left to fix
* improve
* tests passing no wayyyyy yo
* lots of progress, couple of failing tests around selects
* meh
* solve async tree stuff
* fix select/option stuff
* whoop, tests
* simplify
* feat: hoisting
* fix: `$effect.pending` sends updates to incorrect boundary
* changeset
* stuff from upstream
* feat: first hydrationgaa
* remove docs
* snapshots
* silly fix
* checkpoint
* meh
* ALKASJDFALSKDFJ the test passes
* chore: Update a bunch of tests for hydration markers
* chore: remove snippet and is_async
* naming
* better errors for sync-in-async
* test improvements
* idk man
* merge local branches (#16757)
* use fragment as async hoist boundary
* remove async_hoist_boundary
* only dewaterfall when necessary
* unused
* simplify/fix
* de-waterfall awaits in separate elements
* update snapshots
* remove unnecessary wrapper
* fix
* fix
* remove suspends_without_fallback
---------
Co-authored-by: Rich Harris <[email protected]>
* Update payload.js
Co-authored-by: Rich Harris <[email protected]>
* checkpoint
* got the extra children to go away
* just gonna go ahead and merge this as the review comments take up too much space
* chore: remove hoisted_promises (#16766)
* chore: remove hoisted_promises
* WIP optimise promises
* WIP
* fix <slot> with await in prop
* tweak
* fix type error
* Update packages/svelte/src/compiler/phases/3-transform/server/visitors/SvelteHead.js
* chore: fix hydration treeshaking (#16767)
* chore: fix hydration treeshaking
* fix
* remove await_outside_boundary error (#16762)
* chore: remove unused analysis.boundary (#16763)
* chore: simplify slots (#16765)
* chore: simplify slots
* unused
* Apply suggestions from code review
* chore: remove metadata.pending (#16764)
* Update packages/svelte/src/compiler/phases/3-transform/server/visitors/SnippetBlock.js
* put this back where it was, keep the diff small
* Update packages/svelte/src/compiler/phases/types.d.ts
Co-authored-by: Rich Harris <[email protected]>
* chore: remove analysis.state.title (#16771)
* chore: remove analysis.state.title
* unused
* chore: remove is_async (#16769)
* chore: remove is_async
* unused
* Apply suggestions from code review
Co-authored-by: Rich Harris <[email protected]>
* cleanup
* lint
* clean up payload a bit
* compiler work
* run ssr on sync and async
* prettier
* inline capture
* Update packages/svelte/src/compiler/phases/3-transform/server/visitors/EachBlock.js
* chore: simplify build_template (#16780)
* small tweak to aid greppability
* chore: fix SSR context (#16781)
* at least passing
* cleanup
* fix
* remove push/pop from exports, not needed with payload
* I think this is better but tbh not sure
* async SSR
* qualification
* errors:
* I have lost the plot
* finally
* ugh
* tweak error codes to better align with existing conventions, such as they are
* tweak messages
* remove unused args
* DRY out a bit
* unused
* unused
* unused
* simplify - we can enforce readonly at a type level
* unused
* simplify
* avoid magical accessors
* simplify algorithm
* unused
* unused
* reduce indirection
* TreeState -> SSRState
* mark deprecated methods
* grab this.local from parent directly
* rename render -> fn per conventions (fn indicates 'arbitrary code')
* reduce indirection
* Revert "reduce indirection"
This reverts commit 3ec461b.
* tweak
* okay works this time
* no way chat, it works
* fix context stuff
* tweak
* make it chainable
* lint
* clean up
* lint
* Update packages/svelte/src/internal/server/types.d.ts
Co-authored-by: Rich Harris <[email protected]>
* sunset html for async
* types
* we use 'deprecated' in other messages
* oops
---------
Co-authored-by: Rich Harris <[email protected]>1 parent 8c982f6 commit b8fd326
File tree
181 files changed
+2638
-901
lines changed- .changeset
- documentation/docs/98-reference/.generated
- packages/svelte
- messages
- server-errors
- server-warnings
- scripts/process-messages
- templates
- src
- compiler
- phases
- 1-parse/state
- 2-analyze
- visitors
- 3-transform
- client
- visitors
- server
- visitors
- types
- utils
- internal
- client
- dom/blocks
- reactivity
- server
- blocks
- legacy
- tests
- hydration/samples
- binding-input
- cloudflare-mirage-borking-2
- dynamic-text-changed
- each-block-0-on-server-more-on-client
- each-block-fallback-mismatch
- each-block-less-nodes-on-client
- each-block-more-nodes-on-client
- element-attribute-added
- element-attribute-changed
- element-attribute-removed
- if-block-mismatch-2
- if-block-mismatch
- input-checked-attribute-sibling
- input-value-changed
- noscript
- pre-first-node-newline
- removes-undefined-attributes
- repair-mismatched-a-href
- safari-borking
- script
- snippet-raw-hydrate
- standalone-component
- standalone-snippet
- surrounding-whitespace
- text-empty-2
- text-empty
- whitespace-at-block-start
- runtime-browser
- runtime-legacy
- samples
- after-render-prevents-loop
- after-render-triggers-update
- before-render-prevents-loop
- binding-select-implicit-option-value
- binding-select-initial-value-undefined-3
- binding-select-late-2
- binding-select-late-3
- binding-select-late
- binding-select-unmatched-2
- binding-select-unmatched-3
- constructor-prefer-passed-context
- textarea-content
- runtime-runes/samples
- async-no-pending-throws-sync
- async-no-pending
- async-ondestroy-ordering
- snippet-slot-let-error
- server-side-rendering
- samples
- async-context-throws-after-await
- async-each-fallback-hoisting
- async-each-hoisting
- async-head-multiple-title-order-preserved
- async-if-alternate-hoisting
- async-if-hoisting
- async-option-implicit-complex-value
- async-option-implicit-simple-value
- async-select-value-component
- async-select-value-implicit-value-complex
- async-select-value-implicit-value
- comment-preserve
- context
- head-meta-hydrate-duplicate
- head-svelte-components-raw-content
- invalid-nested-svelte-element
- snapshot/samples
- async-each-fallback-hoisting
- _expected
- client
- server
- async-each-hoisting
- _expected
- client
- server
- async-if-alternate-hoisting
- _expected
- client
- server
- async-if-hoisting
- _expected
- client
- server
- await-block-scope/_expected/server
- bind-component-snippet/_expected/server
- class-state-field-constructor-assignment/_expected/server
- delegated-locally-declared-shadowed/_expected/server
- dynamic-attributes-casing/_expected/server
- each-index-non-null/_expected/server
- each-string-template/_expected/server
- function-prop-no-getter/_expected/server
- functional-templating/_expected/server
- hello-world/_expected/server
- hmr/_expected/server
- nullish-coallescence-omittance/_expected/server
- props-identifier/_expected/server
- purity/_expected/server
- skip-static-subtree/_expected/server
- state-proxy-literal/_expected/server
- text-nodes-deriveds/_expected/server
- types
- playgrounds/sandbox
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
181 files changed
+2638
-901
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
3 | 17 | | |
4 | 18 | | |
5 | 19 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 0 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 3 | | |
24 | 4 | | |
25 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 1 | | |
20 | 2 | | |
21 | 3 | | |
| |||
0 commit comments