Version 3.0.0-rc1
Pre-release
Pre-release
Added
- Add nested prop type support with a single recursive resolver. Prop type wrappers (
inertia_defer,inertia_merge,inertia_deep_merge,inertia_optional,inertia_once,inertia_scroll) now work at any nesting depth, including inside closures. For example,inertia_deferinside a closure now correctly generatesdeferredPropsmetadata with dot-notation paths (e.g.,auth.permissions). - Add
assign_shared_prop/3andinertia_share/1to mark props as shared, exposing their keys in thesharedPropspage metadata for the Inertia v3 protocol (#69). - Add
preserve_fragment/1andpreserve_fragment/2functions to instruct the client-side to preserve the URL fragment across server-side redirects (#68). - Add
inertia_prepend/1andinertia_prepend/2for prepending (instead of appending) data during client-side merges. Prepend props appear in bothmergePropsandprependPropsin the page response. Scroll props also respect theX-Inertia-Infinite-Scroll-Merge-Intent: prependheader (#67). - Add
match_on:option toinertia_merge/2,inertia_prepend/2, andinertia_deep_merge/2for client-side deduplication of merged items. Match keys are included inmatchPropsOnpage metadata (#67). - Add
ssr_exclude_pathsconfig option to disable SSR for specific paths. Supports string prefixes and~r//regex patterns (#67). - Add
inertia_flash/1,inertia_page/1,inertia_deferred_props/1,inertia_merge_props/1,inertia_scroll_props/1, andinertia_once_props/1test helpers inInertia.Testing(#67).
Changed
- Breaking: Flash data is now a top-level key in the Inertia page object (
usePage().flash) instead of being nested inside props (usePage().props.flash). This aligns with the Inertia.js frontend conventions and the Laravel adapter (#67). - Set the
Vary: X-Inertiaresponse header on all requests (not just Inertia JSON responses), so HTTP caches can properly differentiate responses (#67).
Fixed
- Persist
clearHistoryacross redirects via the session, matching the existing behavior ofpreserve_fragment. Previously,clear_history(conn)was lost on redirect (#67). - Handle redirects containing URL hash fragments by returning 409 with
X-Inertia-Redirectheader, so the client can perform a full navigation that preserves the fragment (#67). - Redirect Inertia requests that receive a 200 with an empty body back to the referer (or
/), instead of rendering a blank page (#67). - Include
"reset": truein scroll prop metadata when the scroll data path is in theX-Inertia-Resetheader (#67).