Releases: Ernxst/svelte-query-params
Releases · Ernxst/svelte-query-params
svelte-query-params@0.2.4
Patch Changes
- b40f967: Bump minimum required svelte version
svelte-query-params@0.2.3
Patch Changes
- b079db4: Add support for multi-value params
svelte-query-params@0.2.2
New Features
- Query params can now be set on the server
Breaking Changes
-
Removed the
hash
argument in thesave
method of the server handler in an adapter.- This is because the server will never receive the hash
-
Renamed the
dom
adapter tobrowser
as the name fits better with what it does
Fixes
- The options the SvelteKit adapter takes is now exported
- Add event listeners to window if
createUseQueryParams
is registered on the server first - Values in the "helpers" returned were previously not reactive
- Ensure the
keys()
helper method returns the correct values when passing in a schema - The search string from the helpers now includes all query params, not just params defined in validators
- Ensure all search params are persisted to browser/server, not just params defined in validators
- The parsed query was allowing values not defined in validators to passthrough, now fixed
- Fix valibot schema check now that minimum valibot version has been upgraded
svelte-query-params@0.2.1
Patch Changes
-
06cd15f: (breaking) Server-side fixes
Bug Fixes
- The SvelteKit adapter no longer reads from the
page
store as this cannot be subscribed to on the server
Breaking Changes
- Restructure adapter API
- The server handler no longer needs to read and return the current URL
- The browser handler must now return the full URL/location instead of just the search string and hash
- The returned function from
createUseQueryParams
now requires aURL | Location
param- This was only really required on the server, but was also required on the client too so usage of the hook does differ between server and client.
- If needed, consumers can create a client wrapper around it which will pass
window.location
or the URL from the page store
Internals
- remove
console.log
- not sure if a Svelte upgrade fixed things or this refactor did, but it is (thankfully) no longer needed
- The SvelteKit adapter no longer reads from the
svelte-query-params@0.2.0
Minor Changes
-
142bd13: (breaking): Upgrade minimum supported node, SvelteKit and Valibot versions
- Most of this release is updating its internals with no updates to existing behaviour, excluding the version requirements above