Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
commit: |
ca05aac to
748d789
Compare
2cad8bf to
70f9ed7
Compare
70f9ed7 to
7162ec8
Compare
085449e to
ada6de0
Compare
ada6de0 to
739faf1
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
739faf1 to
8381293
Compare
8381293 to
8c3efbe
Compare
TanStack Router handles defaults a bit differently than nuqs, and would require a Partial output type for Links not to have to specify every single search param value for a given route. Moreover, the output of validateSearch is reflected in the URL a page load time, which contradicts the "clean URL first" approach taken by nuqs (it also reflects null values which is not desirable).
30f4397 to
7769705
Compare
|
🎉 This PR is included in version 2.5.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new export,
createStandardSchemaV1, which (as the name implies), creates a standard-schema compatible object that can be fed to tRPC's inputs, or TanStack Router for search params validation (see #953).Since nuqs parsers always assume they have to deal with deserialisation, and those validation libraries generally assume they work with data already of the right shape (kind of) and verify runtime constraints, we first run the input through the serializer to generate a URL, which we can then parse.
This also introduces a new option on the loaders & the cache: strict mode, which will throw errors rather than applying default values (or returning null) for invalid querystring values.
It also fixes a bug where the loader functions had a signature mismatching the runtime implementation: passing urlKeys is only supported when creating the loader function, which now can accept a different set of runtime options like strict mode. We're renaming the types to make this clearer.
It also deprecates
parseServerSidefor parsers, as it was an internal artefact of resolving a non-nullable type when specifying a default value. Loaders now have integrated parseServerSide's duties and do provide stronger key/value type-safety (while also supporting other things like strict mode and urlKeys).Tasks