withastro/astro 9103ac57..43df66a9
base and head as given
- Cookie handling is a new server-rendering capability.
- Server rendering now depends on cookie handling.
- Five deployment adapters now forward cookie headers.
- The cookie package entered the server-rendering path.
- files changed
- 32
- in a component
- 19
- lines in components
- 397
- components
- 13
- public routes changed
- 0
- schema statements
- 0
- new dependencies
- 2
- excluded by role
- 13
Cookie handling
Added- Before
- Cookie handling did not exist
- After
- Cookies are available during SSR
Server-rendered pages and endpoints can read, set, and delete request cookies. Cookie changes are emitted as Set-Cookie headers by the updated deployment adapters.
In favour
- In favour: Lazy creation avoids work on pages that do not access cookies
- In favour: One cookie abstraction serves pages and endpoints
Against
- Against: Cookie header forwarding is duplicated across deployment adapters
Inspect 12 source files behind this explanation
- packages/astro/src/core/cookies/cookies.ts
- packages/astro/src/@types/astro.ts
- packages/astro/src/core/render/result.ts
- packages/astro/src/runtime/server/endpoint.ts
- packages/astro/src/core/app/index.ts
- packages/astro/src/vite-plugin-astro-server/index.ts
- packages/astro/src/core/endpoint/index.ts
- packages/integrations/cloudflare/src/server.advanced.ts
- packages/integrations/netlify/src/netlify-functions.ts
- packages/integrations/deno/src/server.ts
- packages/integrations/node/src/server.ts
- packages/integrations/vercel/src/serverless/request-transform.ts
4 new dependencies between components — Core Render → Cookie Handling · Astro Types → Cookie Handling · Core App → Cookie Handling · Astro Server Plugin → Cookie Handling
What else could behave differently
32 components · 95 filesThese components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.
Reached 3
| Component | Symbol | Cited at | Files | Reached by |
|---|---|---|---|---|
| Cookie Handlingpackages/astro/src/core/cookies/ | Added AstroCookies1 of 3 changed symbols reaching it | packages/astro/src/core/cookies/cookies.ts:53-198 | 2 | 2 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| Astro Typespackages/astro/src/@types/ | Added AstroCookies1 of 7 changed symbols reaching it | packages/astro/src/core/cookies/cookies.ts:53-198 | 1 | 1 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| packages/astro/src/core/ | Added AstroCookies1 of 10 changed symbols reaching it | packages/astro/src/core/cookies/cookies.ts:53-198 | 4 | none direct · 3 at two steps · 1 at three stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
Held back 2
| Component | Files | Reached by | Resolution |
|---|---|---|---|
| packages/astro/src/vite-style-transform/ | 1 | none direct · 1 at four steps | precise |
| packages/astro/src/core/add/ | 1 | none direct · 1 at three steps | precise |
Ranked lower 27
| Component | Files | Reached by |
|---|---|---|
| packages/astro/src/vite-plugin-astro/ | 2 | none direct · 2 at two steps |
| packages/astro/src/core/render/ | 9 | 3 direct · 5 at two steps · 1 at three steps |
| packages/astro/src/vite-plugin-scripts/ | 2 | none direct · 2 at two steps |
| packages/astro/src/integrations/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-utils/ | 1 | none direct · 1 at two steps |
| packages/astro/src/runtime/server/ | 18 | 13 direct · 5 at two steps |
| packages/astro/src/jsx-runtime/ | 1 | none direct · 1 at two steps |
| packages/astro/src/core/app/ | 4 | 2 direct · 1 at two steps · 1 at three steps |
| packages/astro/src/core/routing/ | 7 | none direct · 6 at two steps · 1 at three steps |
| packages/astro/src/core/config/ | 4 | none direct · 3 at two steps · 1 at three steps |
| packages/astro/src/vite-plugin-astro-server/ | 1 | 1 direct |
| packages/astro/src/events/ | 3 | none direct · 1 at two steps · 2 at three steps |
| packages/astro/src/jsx/ | 2 | none direct · 2 at two steps |
| packages/astro/src/vite-plugin-astro-postprocess/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-config-alias/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-env/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-integrations-container/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-jsx/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-markdown-legacy/ | 1 | none direct · 1 at two steps |
| packages/astro/src/vite-plugin-markdown/ | 1 | none direct · 1 at two steps |
| packages/astro/src/core/build/ | 14 | 1 direct · 9 at two steps · 3 at three steps · 1 at four steps |
| packages/astro/src/core/endpoint/ | 2 | 2 direct |
| packages/astro/src/core/compile/ | 2 | none direct · 1 at two steps · 1 at three steps |
| packages/astro/src/cli/ | 3 | none direct · 1 at two steps · 1 at three steps · 1 at four steps |
| packages/astro/src/core/dev/ | 1 | none direct · 1 at two steps |
| packages/astro/src/core/preview/ | 1 | none direct · 1 at two steps |
| packages/integrations/vercel/src/serverless/ | 1 | 1 direct |
Statements 3
AstroCookies was added and reached 2 files in cookie handling. 2AstroCookies was added and reached 1 file in Astro types. 1AstroCookies was added and reached 4 files in core. 311 reached file belong to no component — tests, docs and config.
Routes, schema, dependencies
| What | Object | Where |
|---|---|---|
| + dependency | @types/cookie@^0.5.1 | declared, and used by no file in any component |
| + dependency | cookie@^0.5.0 | packages/astro/src/core/cookies/cookies.ts:2 |
2 statements, with the lines behind them
@types/cookie was declared, and used by no file in any component.cookie version ^0.5.0 was added as a dependency.Inspect components, files and symbols
Component
File
Function
imports what changeddownstream of it, one mark per step
Diff
Analysis scope
2697 → 13- files at head2,697
- components88
- changed by this change13
- shown above of 136
Where the new files landed
3 new files| New file | Belongs to | Used by | Calls | Serves |
|---|---|---|---|---|
| packages/astro/src/core/cookies/3 new filesimports 1 package this change added | Cookie Handlingnew territory | Astro TypesCore AppEndpoint HandlingCore RenderAstro Server Plugin | nothing outside its own component | — |
11 added files carry no component — 10 test, 1 docs.
32 files changed, 48 claims stated. 32 components reached in total.