dinou 9.0.1 → 9.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +503 -9883
  3. package/dinou/bun/build.js +38 -1
  4. package/{cli.js → dinou/cli.js} +14 -7
  5. package/dinou/cloudflare/build.js +37 -0
  6. package/dinou/core/build-static-pages.js +15 -7
  7. package/dinou/core/cache-revalidate.js +909 -151
  8. package/dinou/core/cache-slot.js +728 -97
  9. package/dinou/core/client-webpack.jsx +60 -9
  10. package/dinou/core/client.jsx +60 -9
  11. package/dinou/core/edge-ssr.js +33 -5
  12. package/dinou/core/generate-static.js +109 -47
  13. package/dinou/core/get-jsx.js +333 -329
  14. package/dinou/core/handler.js +2983 -2343
  15. package/dinou/core/layout-functions.js +102 -1
  16. package/dinou/core/ppr-context.js +256 -105
  17. package/dinou/core/ppr-runtime.js +540 -267
  18. package/dinou/core/render-jsx-to-client-jsx.js +131 -71
  19. package/dinou/core/slot.js +246 -33
  20. package/dinou/core/storage-adapter.js +117 -11
  21. package/dinou/deno/build.js +38 -1
  22. package/dinou/deno/seed-kv.js +43 -11
  23. package/dinou/esbuild/helpers-esbuild/swc-disk-cache.js +242 -225
  24. package/dinou/esbuild/plugins-esbuild/server-functions-plugin.js +253 -226
  25. package/dinou/esbuild/react-refresh/esm-hmr/client.js +209 -209
  26. package/dinou/node/build.js +2 -2
  27. package/dinou/node/bundle-dual-engine.js +2 -0
  28. package/dinou/node/dev.js +2853 -2704
  29. package/dinou/package.json +5 -2
  30. package/dinou/rollup/react-refresh/esm-hmr/client.js +220 -220
  31. package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +182 -160
  32. package/dinou/server.d.ts +25 -11
  33. package/dinou/server.js +5 -0
  34. package/dinou/webpack/loaders/server-functions-loader.js +101 -94
  35. package/dinou/webpack/webpack.config.js +9 -4
  36. package/eject.js +219 -223
  37. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,65 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [9.0.3] - 2026-11-01
9
+
10
+ ### Fixed
11
+ - **Direct Client Component Imports of Function-Level `"use server"` Functions**: Fixed an issue in the client bundler pipelines (`esbuild`, `rollup`, and `webpack`) where modules without a top-level `"use server"` directive that exported functions declaring `"use server"` inside their body were only matched against module-level directives. Importing such functions directly into `"use client"` components previously bundled the raw function implementation into the browser instead of generating an RPC proxy. All three client bundlers now inspect and extract function-level `"use server"` exports via `hasServerFunctions` and `extractServerFunctions`, emitting `createServerFunctionProxy` bindings while preserving granular manifest tree-shaking (excluding private and non-server helpers).
12
+ - **Live HMR Manifest Synchronization for Inline and Function-Level `"use server"` Actions**: Fixed a state desynchronization issue in development mode (`dinou/node/dev.js`, `esbuild/plugins-esbuild/server-functions-plugin.js`, `rollup/rollup-plugins/rollup-plugin-server-functions.js`, `webpack/loaders/server-functions-loader.js`, and `webpack/webpack.config.js`) where adding or modifying inline or body-level `"use server"` functions while the dev server was running could be omitted or overwritten in `__DINOU_SERVER_FUNCTIONS_MANIFEST__` during incremental client rebuilds, or trigger premature/duplicate page reloads in `dev:webpack` before client compilation completed. Server file `mtime` caches, live manifest state, `notifyFileChanged` client build awaiting (`__DINOU_WEBPACK_MODIFIED_FILES__`), and single-pass WebSocket reload broadcasting (`devServer.webSocketServer.clients`) now stay synchronized in real time across Esbuild, Rollup, and Webpack without requiring a dev server restart.
13
+ - **Partial Prerendering (PPR) Pre-Hydration Streaming Script, Deterministic Hole Indexing, and `metadata.json` Hole Preservation**:
14
+ - Fixed a JavaScript syntax error (`c.content?c.content:...c.childNodes`) and async closure index drift (`B:${holeIndex - 1}`) in the inline DOM replacement `<script>` chunks emitted by `streamDynamicHoles` (`dinou/core/ppr-runtime.js`), ensuring streamed `<template id="ppr-content-...">` chunks immediately replace `[data-ppr-hole]` fallbacks prior to client-side RSC hydration with HTML-escaped error fallbacks.
15
+ - Synchronized 1-based `ppr-hole-N` indexing across layouts and pages (`dinou/core/render-jsx-to-client-jsx.js`, `dinou/core/ppr-runtime.js`, `dinou/core/handler.js`, and `dinou/core/build-static-pages.js`) by calling `resetPprHoles()` prior to `getJSX()`, traversing static and nested `<Suspense>` boundaries in identical pre-order at build time and runtime, unwrapping `React.memo` / `React.forwardRef` Server Components, and traversing `"use client"` component props without invoking client references on the server.
16
+ - Added tri-state PPR config resolution (`resolveModulePpr` in `dinou/core/resolve-module-ppr.js`) so child pages can explicitly opt out (`export const ppr = false`) when a parent layout or global config enables PPR.
17
+ - Fixed `dinou/node/generate-static-pages.js` overwriting `metadata.json` after PPR shell extraction so `ppr: true` and registered `holes` metadata are preserved on disk, and refined `shouldCacheISG` (`ssgPprUnwrappedBailout` in `dinou/core/handler.js`) so unwrapped dynamic bailouts on PPR routes skip static shell persistence while non-PPR static pages invoking Server Functions during Pass B SSR still cache statically during `generateStatic`.
18
+ - **PPR Dynamic Boundary Detection, Scoped Bailout Isolation, and Nested Hole Deduplication**: Fixed `asyncRenderJSXToClientJSX` (`dinou/core/render-jsx-to-client-jsx.js`) and `getJSX` (`dinou/core/get-jsx.js`) so `<Suspense>` boundaries wrapping dynamic components in both pages and layouts are accurately captured as PPR holes during static shell generation without leaking dynamic bailouts across sibling static components or registering duplicate nested holes inside an already-captured parent `<Suspense>` hole.
19
+ - **PPR Client Hydration Stability and Query Parameter Forwarding**: Fixed `dinou/core/client.jsx` and `dinou/core/client-webpack.jsx` to skip redundant initial `/____rsc_page____` and `/____rsc_layout____` fetches when hydrating PPR pages (`window.__DINOU_PPR__`), preventing streamed dynamic holes from flashing back to their `<Suspense>` fallbacks during hydration, while forwarding `window.location.search` on client-side RSC refreshes so dynamic holes reading `req.query` retain their query parameters.
20
+ - **Vertical Segmentation (`<DinouCacheSlot>` & `refreshSlot`) Cold-Start Discovery, Nested Slots, Clock-TTL Expiration, In-Place Client Reconciliation, Soft-Navigation Slot Persistence, Unmounted Slot Refreshing, Out-of-Order Race Protection, Server Action Serialization, React 19 Dev Descriptor Preservation, and Edge/Deno KV Invalidation Parity**:
21
+ - Fixed `getSlotJSX` (`dinou/core/cache-slot.js`) on cold server starts so `/____rsc_slot____/:id` evaluates the route tree (`asyncRenderJSXToClientJSX`) inside `runWithPprContext({ isPpr: true })`, coalesces concurrent cold-start pre-evaluations per route (`preEvaluatingRoutes`), isolates discovery passes per async execution context via `AsyncLocalStorage` (`slotDiscoveryStorage`), falls back to full layout+page evaluation for layout-level slots, and discovers nested slots inside cached outer slots via `entry.discover()`.
22
+ - Fixed `<DinouCacheSlot revalidate={0}>` (`dinou/core/cache-slot.js`) to strictly bypass storage caching (`0 = no-cache`), preserved React 19 non-enumerable development descriptors (`_debugStack`, `_debugTask`, `_debugInfo`, `ref`, `_store`) when cloning elements in `asyncRenderJSXToClientJSX` (`dinou/core/render-jsx-to-client-jsx.js`) to prevent `react-server-dom-webpack` stack-trace crashes in development mode, and coerced `_store.validated` to `1` (`jsx._store.validated || 1` in `cloneWithDevProps` and `deserializeJSX` in `dinou/core/cache-slot.js`) to eliminate false-positive React 19 development `"key" prop` warnings inside `<DinouCacheSlotBoundary>`.
23
+ - Fixed clock-based TTL expiration (`revalidate: N` with `N >= 1`) on both tagged and tagless `<DinouCacheSlot>` boundaries (`dinou/core/cache-slot.js` and `dinou/core/handler.js`): always recorded the canonical `slotId` alongside user `tags` (`[slotId, ...allTags]`) in `metadata.json` and `layout.metadata.json` `slotTags`, added `hasExpiredSlots(slotTags)` checks across both RSC (`/____rsc_layout____`, `/____rsc_page____`) and HTML/PPR (`index.html`, `shell.html`) endpoints so expired slots deterministically regenerate and trigger surgical host re-composition (`{ onlyRefreshSlots: true }`) instead of being masked by an outer host cache hit, and updated `getSlotJSX` (`/____rsc_slot____/:id`) so live `refreshSlot(slotId)` calls without `{ fresh: true }` after TTL expiration await fresh slot regeneration and re-compose the host in the background.
24
+ - Enabled tag-based live refreshing (`refreshSlot(tag)` and `useRouter().refreshSlot(tag)`) across `DinouCacheSlotBoundary` (`dinou/core/slot.js`) and `resolveCanonicalSlotId` (`dinou/core/cache-slot.js`), and updated `DinouCacheSlotBoundary` to pair its live-refreshed override state with the server `children` reference (`{ baseChildren: children, content: resolved }` inside `React.startTransition`) backed by a session-level `slotOverrideCache`. This preserves local `useState` inside refreshed `<DinouCacheSlot>` Client Components, retains live-refreshed slot trees across round-trip soft navigations (`Page A -> Page B -> Page A`) served from `pageCache` or `layoutCache` (`0` network requests), and automatically yields to fresh server `children` whenever `router.refresh()`, `router.refresh({ layout: true })`, or `<Link fresh>` delivers a new RSC payload.
25
+ - Added client-side tracking of mounted vs. unmounted slots (`knownClientSlots` and `mountedClientSlots` in `dinou/core/slot.js`) and `options.currentPath` forwarding in `fetchSlotRSC` (`dinou/core/client.jsx` and `dinou/core/client-webpack.jsx`) so calling `refreshSlot(idOrTag)` while a slot's `<DinouCacheSlotBoundary>` is unmounted on a sibling route refreshes the slot in the background using its origin route path and seamlessly reconciles if the boundary remounts while the fetch is in flight (`entry.notifyMounted`).
26
+ - Added deterministic **Last-Write-Wins (LWW)** race protection for out-of-order concurrent `refreshSlot()` calls across both client (`dinou/core/slot.js`) and server (`dinou/core/cache-slot.js`): tracked a monotonic `latestReqId` (`pendingReqId`) and `pendingPromise` per slot across mounted (`handleRefresh`), unmounted (`knownClientSlots`), and remounting boundaries so slower superseded responses are discarded without overwriting `slotOverrideCache` or DOM state (even after a faster subsequent request has already settled and cleared `pendingPromise = null`); keyed server-side `inflightSlotRenders` by `options.fresh ? stampedeKey : storageKey` so distinct client `refreshSlot(id, { fresh: true })` requests (`?t=${Date.now()}-${slotSeq}&fresh=1`) execute fresh renders without coalescing onto an older slow in-flight render (while keeping identical concurrent requests deduplicated); and guarded `storage.set(storageKey, ...)` and host re-composition (`revalidatePage` / `revalidateLayout`) with a monotonic per-slot generation counter (`slotRenderGenerations` via `Symbol.for("dinou.slot.render.generation")`) so slower stale renders never overwrite newer cached slot state.
27
+ - Added serialization and `registerServerReference` reconstruction for `"use server"` Server Action references (`Symbol.for("react.server.reference")`) passed as props to Client Components inside cached `<DinouCacheSlot>` trees (`dinou/core/cache-slot.js`).
28
+ - Added `refreshNestedSlotsInTree` (`dinou/core/cache-slot.js`) so invalidating or refreshing an inner `<DinouCacheSlot>` nested inside a cached outer `<DinouCacheSlot>` updates the inner slot without requiring outer slot invalidation.
29
+ - Recorded rendered slot tags (`slotTags`) in route `metadata.json` and `layout.metadata.json` (`dinou/core/handler.js` and `dinou/core/generate-static.js`), disambiguated `slots/` storage keys from route paths containing `"slot"`, optimized `revalidateTag` on `FileSystemStorage` (`dinou/core/cache-revalidate.js`) to scan only `*metadata.json` files, cleared stale `.dinou/dist2/slots` on dev server startup (`dinou/node/dev.js`), and aligned Edge/Deno KV & Cloudflare Assets slot hydration, tag invalidation (`getSlotFromStorage`, `markTagInvalidated`, and `getTagInvalidatedAt`), and `page.rsc` regeneration (`dinou/core/handler.js`, `dinou/core/cache-slot.js`, `dinou/core/cache-revalidate.js`, `dinou/core/storage-adapter.js`, `dinou/deno/seed-kv.js`, and `dinou/{deno,cloudflare,bun}/build.js`) so static and PPR host pages never miss build-time `env.ASSETS` slots on cold KV or serve stale build-time `page.rsc`, `shell.layout.json`, or `shell.html` payloads after `revalidateTag(slotTag)`.
30
+ - **Partial Prerendering (PPR) & `<DinouCacheSlot>` (Micro-ISR) Synergy, Transactional `<Suspense>` Slot Effects, and Surgical Shell vs. Hole Tag Invalidation**:
31
+ - Added a transactional `<Suspense>` effect frame stack (`pushPprSuspenseEffects`, `popPprSuspenseEffects`, and `deferPprSuspenseEffect` in `dinou/core/ppr-context.js`, `dinou/core/render-jsx-to-client-jsx.js`, and `dinou/core/cache-slot.js`) so `<DinouCacheSlot>` boundaries evaluated inside a `<Suspense>` boundary prior to a sibling's dynamic `PprBailoutError` discard uncommitted storage writes and `slotTags` registrations when the enclosing `<Suspense>` boundary bails out into a dynamic PPR hole.
32
+ - Prevented build-time slot cache poisoning (`dinou/core/cache-slot.js`) when dynamic request properties (`cookies`, `headers`, `query`) are read directly inside a `<DinouCacheSlot>` wrapped in `<Suspense>`, bypassing non-static-shell disk cache entries during PPR shell builds and ensuring `dinou.ppr.postpone` / `react.postpone` signals clean up `inflightSlotRenders`, skip build-time persistence, and bubble up to register the enclosing `<Suspense>` as a runtime PPR hole.
33
+ - Prevented double `<Suspense>` traversal and `ppr-hole-N` index drift when `<DinouCacheSlot>` wraps static `<Suspense>` boundaries by marking `<DinouCacheSlotBoundary>` elements with `__clientJsxAlreadyRendered: true` via `Object.defineProperties` (`dinou/core/cache-slot.js` and `dinou/core/render-jsx-to-client-jsx.js`) while preserving React 19 non-enumerable development descriptors (`_debugStack`, `_debugTask`, `_debugInfo`).
34
+ - Differentiated static-shell slots (`inStaticShell: true`) from dynamic-hole slots (`inStaticShell: false`) during `revalidateTag(tag)` and `{ fresh: true }` refreshes (`dinou/core/cache-slot.js`, `dinou/core/cache-revalidate.js`, and `dinou/core/handler.js`): invalidating a slot inside a dynamic PPR hole evicts only `slots/<slotId>` while keeping `shell.html` intact (`0ms TTFB` preserved), whereas invalidating or force-refreshing a slot in the static shell persists the updated `slots/<slotId>/slot.json`, releases `inflightSlotRenders` first to prevent self-await promise deadlocks, and non-destructively re-composes `page.rsc`, `shell.rsc`, `shell.html`, and `index.html` in place via `revalidatePage(..., { onlyRefreshSlots: true })` or `revalidateLayout(...)` while preserving `metadata.json` (`slotTags`, `ppr`, `holes`) and without re-executing `page.tsx` or `layout.tsx`.
35
+ - Extended cold-start nested slot discovery (`discoverFromRegisteredSlots`) to `refreshNestedSlotsInTree` and added `inflightSlotRenders` concurrency deduplication plus query-keyed burst coalescing (`recentFreshSlotRenders` in `dinou/core/cache-slot.js` and monotonic `?t=${Date.now()}-${slotSeq}` in `dinou/core/client.jsx` / `dinou/core/client-webpack.jsx`) so concurrent `/____rsc_slot____/:id?fresh=1` stampedes against slots inside PPR routes share a single render across Node, Deno, and Cloudflare Workers.
36
+ - **Horizontal Segmentation (`layout.rsc` + `page.rsc`), Pairwise & Triple Synergy with PPR and Vertical Slots, Lazy `index.html` / `shell.html` Re-Composition, Surgical & Clock-TTL Revalidation, Hybrid Static/Dynamic Bailout Recovery, `no_layout` / `reset_layout` Hydration, and Dynamic Layout Validation**:
37
+ - Implemented lazy `index.html`, `shell.html`, and nested `layout.rsc` re-composition across both Static and PPR routes (`getActiveLayoutChain` in `dinou/core/layout-functions.js` and `dinou/core/handler.js`, preserving runtime `DenoKVStorage` `generatedAt` timestamps over build-time `.dinou/dist2` metadata): whenever a cached static or PPR page is requested (with or without query parameters) whose active layout chain (`layout.metadata.json`) has a `generatedAt` timestamp newer than the page's `metadata.json`, Dinou automatically propagates ancestor layout updates to nested leaf `layout.rsc` payloads and re-composes `index.html` (and `shell.html` for PPR routes before `handlePprResume` streams dynamic holes) on the fly by streaming the fresh `layout.rsc` together with the existing `page.rsc` or `shell.rsc` (`renderHtmlStream(layoutRsc, { pageRscStream })`). This guarantees zero React hydration mismatch on hard reloads (`F5`) after `revalidateLayout`, `revalidateTag(layoutTag)`, or layout clock-TTL expiration in `O(1)` without re-executing `page.tsx` or `page_functions.ts` or destroying child `page.rsc` / `shell.rsc` state.
38
+ - Decoupled layout and page ISR lifecycles across both Static (`ppr = false`) and PPR (`ppr = true`) routes (`dinou/core/cache-revalidate.js`, `dinou/core/ppr-runtime.js`, `dinou/core/layout-functions.js`, `dinou/core/generate-static.js`, and `dinou/core/handler.js`):
39
+ - On PPR routes, `revalidatePage` calls `regeneratePprShell(..., { skipLayoutPersistence: true })` so `shell.layout.json` and `layout.rsc` are never overwritten during page revalidation, re-composing `shell.rsc` and `shell.html` from the existing cached `layout.rsc` without re-executing `layout.tsx` or `layout_functions.ts`. Conversely, `revalidateLayout` updates only `shell.layout.json` and `layout.rsc`, deferring child `shell.html` assembly to lazy re-composition on the next visit without re-executing child `page.tsx` or `page_functions.ts`.
40
+ - Added `hasDynamicLayoutHoles(activeChain)` and persisted `hasDynamicHoles` in `layout.metadata.json` so `handlePprResume` and `/____rsc_page____` (`spliceDynamicHolesIntoShell` with `layoutHoleOffset`) skip layout evaluation entirely (`onlyPage: true`) when layouts have no dynamic `<Suspense>` holes, while dynamically evaluating `/____rsc_layout____` per request (`layoutHasDynamicHoles`) when a layout contains dynamic `<Suspense>` holes so layout holes receive live `req.cookies`, `req.headers`, and `req.query` on soft navigations.
41
+ - Supported independent `revalidate = 0` (`no-store`) and clock-based TTL (`revalidate = N`) in `layout_functions.ts` vs. `page_functions.ts`: persisted `pageRevalidate` and `pageGeneratedAt` in `metadata.json` separately from `combinedRevalidate`, resolved route `layout_functions.ts` (`tags`, `revalidate`, `ppr`) from `index = 0` inside Edge `revalidateLayout` (`dinou/core/cache-revalidate.js`) even when invoked on a cold Edge/Cloudflare KV before any HTTP `GET` request, evaluated per-layout clock TTLs (`entry.revalidate`) along `activeLayoutChain` on both HTML and `/____rsc_layout____` requests (gated behind `!internalBuildId` during initial hydration), and fixed `hasStaticDynamicConfig` scoping on `/____rsc_layout____` for `revalidate = 0` layouts. When a layout's TTL expires or `revalidate = 0`, `activeLayoutChain` regenerates only `layout.rsc` / `shell.layout.json` and lazily recomposes child `index.html` / `shell.html` while preserving long-lived child `page.rsc` / `shell.page.json`; when a page's TTL expires (`isExpired`) or `revalidate = 0` (`isZeroRevalidatePage`), `handler.js` delegates to `revalidatePage(reqPath)` / `regeneratePprShell(..., { skipLayoutPersistence: true })` so cached ancestor `layout.rsc` payloads are reused without re-executing `layout.tsx`.
42
+ - Refined the `_old.rsc` hydration guard (`Number(internalBuildId) < Number(currentGeneratedAt)`) in `dinou/core/handler.js` so `/____rsc_layout____` serves the current `layout.rsc` when a child page or slot revalidates (`T_page > T_layout`) rather than falling back to a stale `layout._old.rsc` from an earlier layout build.
43
+ - Made `revalidatePage` and `revalidateLayout` (`dinou/core/cache-revalidate.js`, `dinou/core/handler.js`, `dinou/core/ppr-runtime.js`, and `dinou/core/cache-slot.js`) surgical (`{ onlyRefreshSlots: true }`) and serialized via an `AsyncLocalStorage`-backed reentrant queue (`enqueueRevalidation`) with a shared monotonic clock (`nextMonotonicGenTime`), and added `spliceDynamicHolesIntoShell` on **both** `/____rsc_page____` (`shell.page.json`) and `/____rsc_layout____` (`shell.layout.json`) for PPR routes so client-side refreshes (`router.refresh()` and `router.refresh({ layout: true })`) and soft navigations preserve the frozen static layout and page shells while splicing only live `<Suspense>` holes. This prevents race conditions during concurrent multi-slot refreshes (such as `refreshSlot("*", { fresh: true })`) where `revalidatePage` and `revalidateLayout` execute simultaneously, ensuring `shell.page.json` and `shell.layout.json` are refreshed and re-composed into `layout.rsc`, `page.rsc`, `shell.rsc`, `shell.html`, and `index.html` in deterministic causal order without re-executing `layout_functions.ts`, `layout.tsx`, `page_functions.ts` (`getProps`), or `page.tsx`.
44
+ - Synchronized hybrid Static-to-Dynamic-to-Static transitions across `dinou/core/handler.js`, `dinou/core/cache-revalidate.js`, and `dinou/core/revalidating.js`: shared the `isDynamic` route state Map via `globalThis[Symbol.for("dinou.isDynamic.map")]`, fixed the argument order passed to `createBailoutProxy(target, label, markRevalDynamic)` inside `revalidatePage` and `revalidateLayout` so reading `ctx.req.cookies` / `headers` / `query` or mutating `ctx.res` during background ISR properly triggers dynamic bailout without overwriting static cache files on disk, and updated Step 4 ISG recovery in `handler.js` to inject `window.__DINOU_BUILD_ID__` and clear normalized route keys in `isDynamic` (or flip `window.__DINOU_USE_STATIC__` to `false` on mid-stream bailout).
45
+ - Separated layout cache tag and slot tag tracking from page cache tag and slot tag tracking (`skipLayoutTags: true` and `runInLayoutSegment` / `runInPageSegment` in `dinou/core/ppr-context.js`, `dinou/core/get-jsx.js`, `dinou/core/render-jsx-to-client-jsx.js`, `dinou/core/cache-slot.js`, `dinou/core/handler.js`, and `dinou/core/layout-functions.js`) so tags returned by `layout_functions.ts` (`getCacheTags`) and layout-level `<DinouCacheSlot>` tags (`_layoutSlotTags`) are recorded exclusively in `layout.metadata.json` while page-level `<DinouCacheSlot>` tags (`_pageSlotTags`) are recorded exclusively in `metadata.json`, and ordered `revalidateTag(tag)` (`dinou/core/cache-revalidate.js`) to evict matching `slots/<id>` entries first, then await `revalidateLayout` for matching layout `tags`/`slotTags`, and finally await `revalidatePage` for matching page `tags`/`slotTags` without deleting `layout.metadata.json` or `metadata.json`.
46
+ - Allowed `/____rsc_layout____` (`isLayoutReq` in `dinou/core/handler.js`) to serve cached `layout.rsc` on URLs with query parameters (including PPR routes where `window.__DINOU_USE_STATIC__` is `false`), while preserving per-request dynamic evaluation for layouts (or parallel `@slots`) that access `req.query`, `req.cookies`, or `req.headers` outside `<Suspense>` by emitting `X-Dinou-Dynamic: true` during SSG and persisting `dynamic: true` in `layout.metadata.json` (`dinou/core/generate-static.js`).
47
+ - Prevented build-time SSG (`dinou/core/generate-static.js` and `dinou/deno/seed-kv.js`) from persisting empty `0-byte` `page.rsc` or `layout.rsc` files when a Server Component or Server Function emits a redirect (`x-rsc-redirect` or `Location` header), and guarded `platformContext.env.ASSETS.fetch` (`dinou/core/handler.js`) against serving empty `.rsc` payloads on Cloudflare Workers so redirect routes dynamically evaluate and emit `x-rsc-redirect` headers across all runtimes.
48
+ - Extended `getDiscoveredLayouts` (`dinou/core/get-file-path-and-dynamic-params.js`) to detect `no_layout()` exports in both `page_functions.*` and `layout_functions.*` and emit `"!" + routePattern` markers into `window.__DINOU_LAYOUTS__`, allowing client-side `getLayoutKey(pathname)` (`dinou/core/client.jsx` and `dinou/core/client-webpack.jsx`) to return `null` on `no_layout` routes and render standalone pages without ancestor layouts.
49
+ - Preserved `document.body.setAttribute("data-hydrated", "true")` synchronously during React's commit phase (`useLayoutEffect` in `Router` and `PageConsumer`) across client-side navigations that replace the root `<html><body>` tree (`reset_layout` and `no_layout` boundaries in `dinou/core/client.jsx`, `dinou/core/client-webpack.jsx`, and `dinou/core/slot.js`).
50
+ - Enforced `validateParams`, `getStaticPaths`, and `allowISG() === false` defined in `layout_functions.ts` across both full-page SSR requests and segmented `/____rsc_layout____` / `/____rsc_page____` endpoints in both production and development modes (`dinou/core/layout-functions.js`, `dinou/core/get-jsx.js`, and `dinou/core/handler.js`), returning HTTP `404` and rendering `not_found.tsx` when dynamic layout parameters are invalid or unlisted.
51
+ - Namespaced internal RSC hydration and refresh query parameters to `____build_id____` and `____v____` (`dinou/core/client.jsx` and `dinou/core/client-webpack.jsx`) and stripped both keys from `queryObj` upon request entry (`dinou/core/handler.js`), preventing collisions when user routes pass `?buildId=...` or `?v=...` query parameters and keeping `req.query` / `getProps({ query })` unpolluted.
52
+ - Registered `dinou/core/slot.js` (`DinouPageSlot` and `DinouCacheSlotBoundary`) in the client manifest across all platform bundlers (`dinou/node/bundle-dual-engine.js`, `dinou/bun/build.js`, `dinou/deno/build.js`, and `dinou/cloudflare/build.js`).
53
+ - **Standalone Deno Binary Compilation (`build:deno:compile*`) & Optional `HOST` / `HOSTNAME` Binding**: Added the missing `--unstable-kv` flag to `deno compile` in `dinou/cli.js` so standalone compiled Deno executables have `Deno.openKv()` enabled at runtime matching `start:deno`, and added optional `process.env.HOST` / `process.env.HOSTNAME` (`Deno.env.get`) binding support in `dinou/node/build.js`, `dinou/bun/build.js`, and `dinou/deno/build.js` while preserving default dual-stack (`undefined`) listening when omitted.
54
+
55
+ ### Changed
56
+ - **Self-Contained CLI Directory (`dinou/cli.js`)**: Relocated `cli.js` from the package root into the `dinou/` directory (`"bin": { "dinou": "./dinou/cli.js" }`) while keeping `eject.js` at the package root, unifying the CLI location between standard installed mode (`node_modules/dinou/dinou/cli.js`) and ejected mode (`./dinou/cli.js`) and enabling `dinou/cli.js` to resolve `#commander` directly through `dinou/package.json` subpath imports.
57
+ - **High-Density AI-Agent-Ready `README.md` Specification**: Replaced the legacy ~10,000-line (465 KB) `README.md` with a compact, single-pass technical reference (~500 lines / ~21 KB) engineered so AI coding agents can read the complete framework architecture, CLI commands, routing & lifecycle contracts, public API exports, Dual-Mode Vendoring (`-u` / `--unvendorized`), and 3-Dimensional Caching invariants (Horizontal Segmentation with `revalidateLayout` and lazy HTML re-composition, Partial Prerendering, `<DinouCacheSlot>` Micro-ISR, and Triple Synergy) in a single tool call, while directing human developers to [dinou.dev](https://dinou.dev) for full tutorials and interactive documentation.
58
+
59
+ ### Deprecated
60
+ - **`{ cascade: true }` Option in `revalidatePath` and `revalidateTag`**: Passing a second `options` parameter (`{ cascade?: boolean }`) to `revalidatePath(path, options)` or `revalidateTag(tag, options)` is now deprecated and ignored (logging a runtime deprecation warning in `dinou/core/cache-revalidate.js` and marked `@deprecated` in `dinou/server.d.ts`). Zero hydration mismatch across ancestor and descendant routes is now guaranteed automatically and non-destructively via lazy `index.html` and nested `layout.rsc` re-composition without cascading full page rebuilds.
61
+
62
+ ## [9.0.2] - 2026-10-27
63
+
64
+ ### Performance
65
+ - **Direct NODE_OPTIONS Injection in Unvendorized Mode (`-u`)**: Injected `--conditions=unvendorized` directly into `process.env.NODE_OPTIONS` from `dinou/cli.js` when launching child commands. Downstream build scripts and adapters (`ensureVendorMode()`) now detect active unvendorized resolution on their very first boot, completely eliminating intermediate Node.js child process re-spawns and shaving ~700–1000 ms off production builds and dev server cold starts.
66
+
8
67
  ## [9.0.1] - 2026-10-27
9
68
 
10
69
  ### Fixed