Headlines: Added, Changed, Deprecated, Removed, Fixed, Security
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
redirect
with two parameters accepted aCookies
object, which wouldn't work as the redirect url couldn't be detected.
- Compatibility with Svelte 5
- Removed debug messages.
- SvelteKit 2 redirect issue fixed.
- Options for
getFlash
affects routes below.
- Reintroduced
initFlash
, since flash options are now properly affecting routes below.
- Options weren't compared properly, causing problems when navigating.
- The
redirect
function can now take the cookies object as well as the whole RequestEvent.
- Peer dependency support for SvelteKit 2. (#32)
- Options couldn't be set in different top-level layouts.
- Flash message didn't appear when posting to a form action on a different route. (#26)
- Default cookie option for
SameSite
(strict) wasn't set on the client.
flashCookieOptions
added togetFlash
options.
afterNavigate
fix when automatically clearing the flash message.- Flash message didn't appear when redirecting after
setFlash
.
- Compatibility with vitest
^0.34.1
.
- The client part of the library can now be imported directly from
sveltekit-flash-message
, instead ofsveltekit-flash-message/client
. (The latter also works, for compatibility.)
- Added
flashCookieOptions
object that can be imported fromsveltekit-flash-message/server
and used to set cookie options.
- Default cookie option for
sameSite
is set tostrict
.
- Added
clearOnNavigate
andclearAfterMs
options.clearOnNavigate
istrue
as default,clearAfterMs
can be used to clear the flash message after a certain time (ms).
- Removal of flash message when navigating is now automatic - no
afterNavigate
function needed anymore.
initFlash
is deprecated, usegetFlash
instead.loadFlashMessage
is deprecated, useloadFlash
instead.
- Memory leaks in page subscription and context (#14, thanks to Guilherme Pais)
- Svelte 4 compatibility.