incubateur-ademe / quefairedemesdechets

MIT License
6 stars 5 forks source link

Bump use-query-params from 1.2.3 to 2.2.1 #99

Open dependabot[bot] opened 3 months ago

dependabot[bot] commented 3 months ago

Bumps use-query-params from 1.2.3 to 2.2.1.

Release notes

Sourced from use-query-params's releases.

v2.2.1

use-query-params v2.2.1 (March 24, 2023)

  • fix: #256 adds peer dependencies and metas to allow adapters to work on pnpm setups

v2.2.0

  • fix: #233 attempt to read location from data router in react-router 6.6+. making this a minor revision since it imports something that may not be there in older versions of react-router 6.

v2.1.1

  • fix: #241 import from react-router-dom in adapters to prevent error about wrong context. (thank you @​lisandro52)

v2.1.0

use-query-params v2.1.0 (August 31, 2022)

  • feat: #234 skip unnecessary updates by default. new option skipUpdateWhenNoChange defaults to true (set to false for previous behavior)

v2.0.1

use-query-params v2.0.1 (August 31, 2022)

  • fixes #233 - consecutive calls to setters (e.g. setFoo('a'); setBar('b')) properly accumulate. Previously only the last would make it through.

v2.0.0

use-query-params v2.0.0

Breaking

  • Drop dependency for query-string. New default uses URLSearchParams which doesn’t support null. You can continue using query-string by specifying the searchStringToObject and objectToSearchString options as parse and stringify respectively.
  • Modify QueryParamProvider to take adapter prop, no longer taking react router or reach props

New Features

  • Deep imports for React-Router 5 and 6 adapters

  • Supports registering params in the QueryParamProvider to have them available to any downstream hooks.

    • Supports nesting QueryParamProviders to extend the registered params list
  • Additional function signatures have been added, but greater care must be taken to get proper types out of the response.

    • useQueryParam(’myparam’) ← param type is inherited from the params registered in the QueryParamProvider
    • useQueryParam(’myparam’, StringParam, options)
    • useQueryParams() ← gets all params from the QueryParamProvider
    • useQueryParams([’myparam1’, ‘myparam2’]) ← gets just myparam1 and myparam2 from those registered in the QueryParamProvider.
    • useQueryParams({ myparam: StringParam }, options)
    • useQueryParams({ myparam: ‘inherit’ }, options) ←inherit myparam param name from QueryParamProvider
  • New options prop to QueryParamProvider and argument to useQueryParam(s)

    • (experimental) batching via enableBatching option (i.e., multiple consecutive calls to setQueryParams in a row only result in a single update to the URL). This seems to work but would require updating the way all the tests are written to verify for sure, so marking as experimental for now.
    • removeDefaultsFromUrl (default: false). This happens on updates only, not on initial load. Requires the use of the default attribute on a parameter to function (note serialize-query-params v2 withDefault now populates this).
    • includeKnownParams - in addition to those specified, also include all preconfigured parameters from the QueryParamProvider
    • includeAllParams (default: false) - in addition to those specified, include all other parameters found in the current URL
    • updateType (default “pushIn”) - the default update type when set is called.
    • searchStringToObject, objectToSearchString (default uses URLSearchParams) - equivalent of parse and stringify from query-string.
  • Parameters now can include urlName to automatically convert to a different name in the URL (e.g. { encode, decode, urlName })

  • Caches decoded values across multiple hook calls from different components

Fixes

... (truncated)

Commits


Dependabot compatibility score

You can trigger a rebase of this PR 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)

Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

dependabot[bot] commented 2 months ago

Dependabot encountered an unknown error. Because of this, Dependabot cannot update this pull request.