Skip to content

Releases: KaioFelps/inertia-rust

v2.4.6

Choose a tag to compare

@KaioFelps KaioFelps released this 22 Feb 17:53

v2.4.6

Added

  • Added Inertia::check_is_inertia_request facade method (#17).

v2.4.5

Choose a tag to compare

@KaioFelps KaioFelps released this 01 Nov 02:25

v2.4.5

Changed

  • Undeserializable responses from SSR server now are parsed as string and added to the error message;
  • Pages will only be logged in debug level and only when an error occur.

v2.4.4

Choose a tag to compare

@KaioFelps KaioFelps released this 22 Oct 13:12

v2.4.4

Changed

  • Logs Inertia page in debug on every render & when a rendering fails (even if logs are not in debug mode).

Removed

  • http_method module with HttpMethod enum — this is not considered a breaking change since the enum
    were not used within the application nor relevant enough to be using outside of it.

v2.4.3

Choose a tag to compare

@KaioFelps KaioFelps released this 28 Apr 04:15

v2.4.3

Changed

  • InertiaTestRequest implementation for actix-web now checks for request's Inertia header over response's.

v2.4.2

Choose a tag to compare

@KaioFelps KaioFelps released this 28 Apr 03:34

v2.4.2

Added

  • AssertableInertia and methods for extracting it from test request/responses;
  • Testing guide in the docs.

v2.4.1

Choose a tag to compare

@KaioFelps KaioFelps released this 03 Apr 04:22

v2.4.1

Changed

  • Inertia::back now returns to url suggested by referer header rather than session's previous url (#13)

Full Changelog: v2.4.0...v2.4.1

v2.4.0

Choose a tag to compare

@KaioFelps KaioFelps released this 29 Jan 04:15

v2.4.0

Added

  • ViteHBSTemplateResolver, which uses Handlebars as template engine.

Changed

  • Merged inner_render and inner_render_with_props methods;
  • Updated the docs for using ViteHBSTemplateResolver by default;
  • Deprecated ViteTemplateResolver.

Removed

  • template_path field and setters from Inertia and InertiaConfigBuilder;

Breaking

Template Resolvers

template_path has been removed from Inertia struct. Now, it's the template resolver's responsability to fetch and
parse the template HTML. This means ViteTemplateResolver now is the one who takes the template path on initialization.

Also, its new method now returns a Result<ViteTemplateResolver, InertiaError> instead of ViteTemplateResolver
directly, since it looks for the root template in the given path and return an error if it can't find the file.

let vite = initialize_vite().await;
- let resolver = ViteTemplateResolver::new(vite);
+ let resolver = ViteTemplateResolver::new(vite, "www/root.html").unwrap();

let inertia = Inertia::new(
    InertiaConfig::builder()
        .set_url("http://localhost:8080")
        .set_version(InertiaVersion::Literal(ASSETS_VERSION.get().unwrap()))
-       .set_template_path("www/root.html")
        .set_template_resolver(Box::new(resolver))
        .enable_ssr()
        .set_ssr_client(SsrClient::new("127.0.0.1", 1000))
        .build(),
);

v2.3.8

Choose a tag to compare

@KaioFelps KaioFelps released this 28 Jan 20:52

v2.3.8

Fixed

  • Add Vary: X-Inertia header to Inertia responses. This fixes some cache-related issues (for instance, a plain JSON
    response when navigating through browser history, instead of the actual HTML rendered page).

v2.3.7

Choose a tag to compare

@KaioFelps KaioFelps released this 23 Jan 18:55

v2.3.7

Fixed

  • Also include deferred and mergeable props from shared props (Inertia Middleware) in the inertia page response.

v2.3.6

Choose a tag to compare

@KaioFelps KaioFelps released this 21 Jan 01:32

v2.3.6

Added

  • Added new features: validator, actix-validator;
  • Added InertiaValidateOrRedirect trait for validating or generating an error redirect
    (if validator feature is enabled);
  • Implemented InertiaValidateOrRedirect for actix-web (if actix-validator is enabled).

Changed

  • Inertia::back_with_errors hashmap keys are now anything that implements ToString trait.