chore: configure the server runtime in one place - #17000
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/c440ed4d09147d080bad8db59310929aba65a3c5Open in |
🦋 Changeset detectedLatest commit: c440ed4 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe server lifecycle now uses module-level ChangesServer lifecycle migration
Sequence Diagram(s)sequenceDiagram
participant ViteAdapter
participant GeneratedServer
participant RuntimeServer
ViteAdapter->>GeneratedServer: init manifest, environment, assets, and read
GeneratedServer->>RuntimeServer: configure runtime state
ViteAdapter->>GeneratedServer: respond request
GeneratedServer->>RuntimeServer: respond request
Merge Risk: ⚪ Minimal · up to This change centralizes server lifecycle setup and updates generated server creation to use the new factory API. No concrete current-head behavior, compatibility, or deployment risk remains identified. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Full details: Backward Compatibility Impact DisclosureExplanation No breaking public interface change is introduced by this PR. The public Comment |
elliott-with-the-longest-name-on-github
left a comment
There was a problem hiding this comment.
Looks good, just one nit to look at before we merge
…ss with init and respond
4f69920 to
c440ed4
Compare
Kit sets up its server runtime in six places:
Server.init, prerender, analyse, dev, preview and the fallback generator. Each calls a different subset of the same module-level setters by hand, in an order four comments explain. TheServerclass itself holds no state since #16967, its constructor isset_manifest.configurein the generated server module now owns that order, andinitandrespondreplace the class. Theserverobject adapters get fromgenerateServerInstanceis unchanged and still only acceptsenvandread, so the internal optionsconfiguretakes (building,prerendering,manifest) are not reachable through it.Serverstays as a deprecated shim.