Changelog

@ogygia/postrender

Every release of @ogygia/postrender, newest first.

Latest
0.16.0
Versions
8
  1. 0.16.0 minor

    Dependency updates only @ogygia/postrender

  2. 0.15.1 patch

    Dependency updates only @ogygia/postrender

  3. 0.15.0 minor

    Dependency updates only @ogygia/postrender

  4. 0.14.0 minor

    Minor Changes

    • 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.
    • @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

    • 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.
    • - @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).
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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).
    • 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.
    • 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.
    • 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.

    Dependencies: @ogygia/core@0.14.0, @ogygia/compiler@0.14.0, @ogygia/machine@0.14.0

  5. 0.13.0 minor

    Minor Changes

    • 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

    • 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.
    • 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).
    • 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).
    • 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.
    • A response refused after its body was read is sent rebuilt from that body, not as the spent original.
    • 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).
    • A store that is down now prints postrender_store_failed once per failing streak, instead of every render quietly missing and nothing being kept.
    • 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).
    • 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).
    • 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).

    Dependencies: @ogygia/core@0.13.0, @ogygia/machine@0.13.0

  6. 0.12.0 minor

    Dependency updates only @ogygia/postrender

  7. 0.11.4 patch

    Patch Changes

    • The hook types type-check on SvelteKit 3 too: Handle is the library's own (Kit 3 moved Kit's to @sveltejs/kit/hooks), so a Kit 3 app no longer sees an untyped handle from ogygia, devtools or postrender.

    Dependencies: @ogygia/core@0.11.4

  8. 0.11.0 minor

    Patch Changes

    • The deploy-thaw build marker no longer lapses after a day: it is stored apart from the page TTL and rewritten every boot.
    • A stored page older than the policy ttl is a miss on read, so a store without its own expiry still ages pages out.
    • 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).

    Dependencies: @ogygia/core@0.11.0