@ogygia/postrender

AllMajorMinorPatch Hide pre-releases
0.14.0 minor

@ogygia/postrender

Minor Changes

  • #1665 096de6c Thanks @PuruVJ! - Breaking: postrender() requires dataShake(). Add import { dataShake } from '@ogygia/data-shake/vite' and list dataShake() beside postrender(). Without it the build fails with plugin_needs_plugin, because every deferred region would look the page up and render the stored page again.
  • #747 771fa53 Thanks @PuruVJ! - @ogygia/postrender: Breaking: a page rendered for a request that carries a cookie or an authorization header is not stored (it is still served a stored copy, and its own render is stamped private, no-store); a route whose pages are the same with them opts in with config = { postrender: 'with-credentials' }. @ogygia/core: a render's per-visitor reads also count a function in locals, in and the keys of locals, the request headers read whole or copied while one is personal, headers.has() and a request clone(), client address, forwarded host, location and session headers, getClientAddress(), per-request platform data, and an own-origin fetch that carries the visitor's cookies.

Patch Changes

  • #475 81a40ea Thanks @PuruVJ! - Durations are measured on the monotonic clock: the memory store's TTLs, a federation deploy check's retry wait, the profiler's recording window, deadlines and busy waits, the testing API's wait, and the perf CLI's waits. A wall-clock step no longer moves them.
  • #533 49ff074 Thanks @PuruVJ! - - @ogygia/compiler: new package, ogygia's compiler and its Vite plugin: @ogygia/compiler (the compiler), @ogygia/compiler/vite (ogygia(), definePlugin) and @ogygia/compiler/ids. It uses core only through @ogygia/core/contract; core never depends on it. - @ogygia/core: breaking: the @ogygia/core/vite, @ogygia/core/internal/compiler and @ogygia/core/internal/compiler-ids import paths are gone. Import from ogygia/vite (or @ogygia/compiler/vite), @ogygia/compiler and @ogygia/compiler/ids instead; the names are the same. - @ogygia/core: the types of the ogygia:* virtual modules and the build's switches are named in core (@ogygia/core/contract), so core's own types no longer reach into the compiler. - ogygia: ogygia/vite, ogygia/internal/compiler and ogygia/internal/compiler-ids re-export @ogygia/compiler; apps change nothing. - @ogygia/barrels, @ogygia/cli, @ogygia/content, @ogygia/devtools, @ogygia/federation, @ogygia/flags, @ogygia/postrender, @ogygia/router: they take definePlugin and the compiler from @ogygia/compiler, a new peer dependency (ogygia brings it).
  • #949 dc3363f Thanks @PuruVJ! - A deploy now counts as a write for the app's own stored pages: on the first request after a boot with a new build, the pages the previous build stored are dropped (origin and edges) before any is served, so a new release never serves the old release's HTML.
  • #1457 620d27e Thanks @PuruVJ! - The head's end is found as the browser reads it: an app.html that writes </HEAD> gets ogygia's head injections, and a </head> inside a head script's text (a JSON-LD string) no longer takes them into the script. The body's end is found in any case.
  • #440 4a038b4 Thanks @PuruVJ! - A cached hole (maxAge) that reads a flag, or a cookie, header or locals value, for an anonymous visitor is no longer kept and served to other visitors.
  • #878 08fd293 Thanks @PuruVJ! - Stitching finds stitch holes as a browser reads the page: a hole inside a comment, or a region whose class merely says "stitch", is no longer stitched, and an upper-case or single-quoted stitch attribute is.
  • #1205 c9cbcc7 Thanks @PuruVJ! - A page whose store step fails after postrender read it (a stitched hole whose endpoint is not a URL, say) now goes out as rendered, no-store and unstored, and the failure is said once per page (postrender_capture_failed). The visitor got a response whose body was already read.
  • #1297 149157b Thanks @PuruVJ! - In dev, the would-store header and the "stays per-request" note now give the verdict production gives: a page the app marks no-store or private is no longer shown as would-store, and a permanent redirect is.
  • #1110 3d10f29 Thanks @PuruVJ! - A stored page answers If-None-Match with the weak comparison RFC 9110 asks for: a W/ etag a compressing CDN made, and *, now revalidate with a 304 (before, only the exact strong etag did, so such revalidations sent the whole page).
  • #955 79d90e7 Thanks @PuruVJ! - A remote function call (a query or query.live) made from a stored page is no longer answered with the stored page's HTML, and is never stored as the page: postrender stores and serves page requests only.
  • #1003 20ea2c3 Thanks @PuruVJ! - A stored page's stitch holes are found as the browser reads the page: a region tag inside a fallback's comment, script, style, title or textarea text no longer shifts which part of the page a hole covers, so an edge (ESI) rewrite never wraps half a region.
  • #963 a9fb365 Thanks @PuruVJ! - A stored page is served only to the build that stored it, recorded in the new optional build field of the public PostrenderEntry type (a custom store keeps it as part of the entry): another build's page is a miss, so a rolling deploy's old instances can no longer hand the new release their pages, and pages stored before this release are rendered again once.

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]

0.13.0 minor

@ogygia/postrender

Minor Changes

  • #177 d9e8e2f Thanks @PuruVJ! - Postrender's stores and edges are classes: new MemoryStore(), new ValkeyStore(client), new UpstashStore({ url, token }), new CloudflareKvStore(binding), new AkamaiEdge(cfg), new CloudFrontEdge(cfg) and new CloudflareEdge(cfg) replace memoryStore(), valkey(), upstash(), cloudflareKv(), akamai(), cloudfront() / awsCloudfront() and cloudflare() (same arguments).

Patch Changes

  • #175 a99a49a Thanks @PuruVJ! - Every ogygia error and warning has a code and a page at ogygiajs.dev/e/<code>: dev prints the wording and the link, a production build prints the link alone ([ogygia] https://ogygiajs.dev/e/<code>?<args>), so the wording stays out of the client and server bundles.
  • #217 739b763 Thanks @PuruVJ! - A render that a publish (or any invalidation) lands during is served but not stored, so the page as it was before the publish is no longer kept (#194).
  • #217 739b763 Thanks @PuruVJ! - A stampede flight settles however the request that opened it ends, so a plugin answering that request no longer leaves every later cold request for the page waiting (#194).
  • #305 e605070 Thanks @PuruVJ! - Requests waiting on a page render that a publish overtook are let go at once and share one new render, which is stored, instead of waiting for the old render to end and then each rendering the page alone.
  • #217 739b763 Thanks @PuruVJ! - A response refused after its body was read is sent rebuilt from that body, not as the spent original.
  • #333 865eb55 Thanks @PuruVJ! - A page whose render was stored just after a publish evicted it is no longer served while it is taken back out, and that evict is now tried again when the store fails it (#332).
  • #321 17e009a Thanks @PuruVJ! - A store that is down now prints postrender_store_failed once per failing streak, instead of every render quietly missing and nothing being kept.
  • #370 9272db9 Thanks @PuruVJ! - A store outage is said once (postrender_store_failed) even while calls overlap: a slow store call that started before the outage and answers after it no longer ends the failing streak (#364).
  • #323 7a53a56 Thanks @PuruVJ! - A successful form post's response now waits for its page's stored copy to be evicted (an outbox send, tried again within 2 s), so the redirect's GET right after renders fresh instead of getting the page from before the post (#283).
  • #321 17e009a Thanks @PuruVJ! - A peer whose store fails to apply a thaw notice now answers an error, so the sender sends it again, instead of answering done and deduping the retry; app.notify rejects once every hook ran when one failed (#287).

Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]

0.12.0 minor

@ogygia/postrender

Updated dependencies: @ogygia/[email protected]

0.11.0 minor

@ogygia/postrender

Patch Changes

  • #83 e229a9a Thanks @PuruVJ! - The deploy-thaw build marker no longer lapses after a day: it is stored apart from the page TTL and rewritten every boot.
  • #83 e229a9a Thanks @PuruVJ! - A stored page older than the policy ttl is a miss on read, so a store without its own expiry still ages pages out.
  • #83 e229a9a Thanks @PuruVJ! - A store that fails during invalidation is reported as a store failure, and the edges still purge (a throwing evictByTag stopped the whole invalidation and was blamed on the edge).

Updated dependencies: @ogygia/[email protected]

0.0.0 minor

@ogygia/postrender