pmndrs / examples

🍱 A monorepo holding pmndrs demos
https://pmndrs.github.io/examples/
MIT License
19 stars 6 forks source link

Bump wouter from 2.12.1 to 3.3.1 #3

Closed dependabot[bot] closed 4 months ago

dependabot[bot] commented 4 months ago

Bumps wouter from 2.12.1 to 3.3.1.

Release notes

Sourced from wouter's releases.

Route parameters inheritance

Parameters provided by a Route component or received from calling useParams now also contain values inherited from parent nested routes. See #461 and #409.

Example:

// given the location is "/blog/1/users/4"

<Route path="/:page/:id" nest> <Route path="/users/:id"> {/* calling useParams() here will return an object containing { page: &quot;blog&quot;, id: &quot;4&quot; } {/* note: duplicate keys are overwritten by the inner-most route */} </Route> </Route>

RegExp paths support

Thanks to @​JonahPlusPlus, you can now use regular expressions to define custom route patterns. This can be useful, for example, when you need additional validation of a route parameter. See #449

// this will only match numeric IDs, e.g. "/101", but not "/abc" 
<Route path={/^[/](https://github.com/molefrog/wouter/blob/HEAD/?<id>\d+)$/}>Hello</Route>

The example above uses named capturing groups to have id available as a route parameter. However, you can also use regular groups and access these parameters via numeric indices:

// Route
/[/](https://github.com/molefrog/wouter/blob/HEAD/[a-z]+)/
// Against "/foo", produces
{ 0: "foo" }

// Route /// // Against "/foo", produces { 0: "foo", name: "foo" }

Active links, hash location href, automatic ssrSearch

This release brings some small improvements:

  • Link can now accept a function in className for applying styles to currently active links. Read more #419
  • In SSR, search string can now be extracted directly from ssrPath, e.g. pass /home?a=b to ssrPath and it will pre-fill ssrSearch #420
  • Finally, after more than 2 years of waiting, links have proper href rendered when used with hash location. Before the fix, a link pointing to "/#users was rendered as <a href="/users" /> without a hash. This now can be controlled via an hrefs function defined on a router, but for built-in useHashLocation this is done automatically. See #421
  • Minor improvement: use flatMap() method to flat child element in a switch. Thanks to abjfdi. See #254

v3.0.1 Missing docs on npmjs.org

  • README.md file was not part of wouter/wouter-preact packages, because of the migration to monorepo in v3. This resulted in missing documentation on npmjs.org. This release fixes that.

v3.0.0: Routing "all-inclusive"

... (truncated)

Commits
  • f953ae6 v3.3.1
  • ae42552 simplify function navigate
  • fad5f64 Rename old test case, add test for navigation with query string
  • 25fdc64 revert previous changes and modify navigate to resolve destinations like "/ab...
  • 481f589 useHashLocation must trim query string, useSearch must parse query string fro...
  • e36651d v3.3.0
  • 9256f0e Test edge cases.
  • 5ed8b53 Use more performant way to compare objs.
  • 1d883a0 Implement caching, but using JSON.stringify for now.
  • 27da34b Implement parameters inheritance (tests + GPT).
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 4 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.