Skip to content

Version 3.0.0-rc1

Pre-release
Pre-release

Choose a tag to compare

@derrickreimer derrickreimer released this 18 May 17:51
· 60 commits to 3.x since this 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_defer inside a closure now correctly generates deferredProps metadata with dot-notation paths (e.g., auth.permissions).
  • Add assign_shared_prop/3 and inertia_share/1 to mark props as shared, exposing their keys in the sharedProps page metadata for the Inertia v3 protocol (#69).
  • Add preserve_fragment/1 and preserve_fragment/2 functions to instruct the client-side to preserve the URL fragment across server-side redirects (#68).
  • Add inertia_prepend/1 and inertia_prepend/2 for prepending (instead of appending) data during client-side merges. Prepend props appear in both mergeProps and prependProps in the page response. Scroll props also respect the X-Inertia-Infinite-Scroll-Merge-Intent: prepend header (#67).
  • Add match_on: option to inertia_merge/2, inertia_prepend/2, and inertia_deep_merge/2 for client-side deduplication of merged items. Match keys are included in matchPropsOn page metadata (#67).
  • Add ssr_exclude_paths config 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, and inertia_once_props/1 test helpers in Inertia.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-Inertia response header on all requests (not just Inertia JSON responses), so HTTP caches can properly differentiate responses (#67).

Fixed

  • Persist clearHistory across redirects via the session, matching the existing behavior of preserve_fragment. Previously, clear_history(conn) was lost on redirect (#67).
  • Handle redirects containing URL hash fragments by returning 409 with X-Inertia-Redirect header, 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": true in scroll prop metadata when the scroll data path is in the X-Inertia-Reset header (#67).