Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update react-router-dom 6.17.0 → 6.22.2 (minor) #3068

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Mar 7, 2024

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ react-router-dom (6.17.0 → 6.22.2) · Repo · Changelog

Release Notes

6.22.0 (from changelog)

Date: 2024-02-01

What's Changed

Core Web Vitals Technology Report Flag

In 2021, the HTTP Archive launched the Core Web Vitals Technology Report dashboard:

By combining the powers of real-user experiences in the Chrome UX Report 26 (CrUX) dataset with web technology detections in HTTP Archive 30, we can get a glimpse into how architectural decisions like choices of CMS platform or JavaScript framework play a role in sites’ CWV performance.

They use a tool called wappalyzer to identify what technologies a given website is using by looking for certain scripts, global JS variables, or other identifying characteristics. For example, for Remix applications, they look for the global __remixContext variable to identify that a website is using Remix.

It was brought to our attention that React Router was unable to be reliably identified because there are no identifying global aspects. They are currently looking for external scripts with react-router in the name. This will identify sites using React Router from a CDN such as unpkg - but it will miss the vast majority of sites that are installing React Router from the npm registry and bundling it into their JS files. This results in drastically under-reporting the usage of React Router on the web.

Starting with version 6.22.0, sites using react-router-dom will begin adding a window.__reactRouterVersion variable that will be set to a string value of the SemVer major version number (i.e., window.__reactRouterVersion = "6";) so that they can be properly identified.

Minor Changes

  • Include a window.__reactRouterVersion for CWV Report detection (#11222)
  • Add a createStaticHandler future.v7_throwAbortReason flag to throw request.signal.reason (defaults to a DOMException) when a request is aborted instead of an Error such as new Error("query() call aborted: GET /path") (#11104)
    • Please note that DOMException was added in Node v17 so you will not get a DOMException on Node 16 and below.

Patch Changes

  • Respect the ErrorResponse status code if passed to getStaticContextFormError (#11213)

Full Changelog: v6.21.3...v6.22.0

6.21.3 (from changelog)

Date: 2024-01-18

Patch Changes

  • Fix NavLink isPending when a basename is used (#11195)
  • Remove leftover unstable_ prefix from Blocker/BlockerFunction types (#11187)

Full Changelog: v6.21.2...v6.21.3

6.21.2 (from changelog)

Date: 2024-01-11

Patch Changes

  • Leverage useId for internal fetcher keys when available (#11166)
  • Fix bug where dashes were not picked up in dynamic parameter names (#11160)
  • Do not attempt to deserialize empty JSON responses (#11164)

Full Changelog: v6.21.1...v6.21.2

6.21.1 (from changelog)

Patch Changes

  • Fix bug with route.lazy not working correctly on initial SPA load when v7_partialHydration is specified (#11121)
  • Fix bug preventing revalidation from occurring for persisted fetchers unmounted during the submitting phase (#11102)
  • De-dup relative path logic in resolveTo (#11097)

Full Changelog: v6.21.0...v6.21.1

6.21.0 (from changelog)

What's Changed

future.v7_relativeSplatPath

We fixed a splat route path-resolution bug in 6.19.0, but later determined a large number of applications were relying on the buggy behavior, so we reverted the fix in 6.20.1 (see #10983, #11052, #11078).

The buggy behavior is that the default behavior when resolving relative paths inside a splat route would ignore any splat (*) portion of the current route path. When the future flag is enabled, splat portions are included in relative path logic within splat routes.

For more information, please refer to the useResolvedPath docs and/or the detailed changelog entry.

Partial Hydration

We added a new future.v7_partialHydration future flag for the @remix-run/router that enables partial hydration of a data router when Server-Side Rendering. This allows you to provide hydrationData.loaderData that has values for some initially matched route loaders, but not all. When this flag is enabled, the router will call loader functions for routes that do not have hydration loader data during router.initialize(), and it will render down to the deepest provided HydrateFallback (up to the first route without hydration data) while it executes the unhydrated routes. (#11033)

Minor Changes

  • Add a new future.v7_relativeSplatPath flag to implement a breaking bug fix to relative routing when inside a splat route. (#11087)
  • Add a new future.v7_partialHydration future flag that enables partial hydration of a data router when Server-Side Rendering (#11033)

Patch Changes

  • Properly handle falsy error values in ErrorBoundary's (#11071)
  • Catch and bubble errors thrown when trying to unwrap responses from loader/action functions (#11061)
  • Fix relative="path" issue when rendering Link/NavLink outside of matched routes (#11062)

Full Changelog: v6.20.1...v6.21.0

6.20.1 (from changelog)

Patch Changes

  • Revert the useResolvedPath fix for splat routes due to a large number of applications that were relying on the buggy behavior (see #11052) (#11078)
    • We plan to re-introduce this fix behind a future flag in the next minor version (see this comment)
    • This fix was included in versions 6.19.0 and 6.20.0. If you are upgrading from 6.18.0 or earlier, you would not have been impacted by this fix.

Full Changelog: v6.20.0...v6.20.1

6.20.0 (from changelog)

Minor Changes

  • Export the PathParam type from the public API (#10719)

Patch Changes

  • Updated dependencies:
    • react-router@6.20.0
    • @remix-run/router@1.13.0

6.19.0 (from changelog)

Minor Changes

  • Add unstable_flushSync option to useNavigate/useSumbit/fetcher.load/fetcher.submit to opt-out of React.startTransition and into ReactDOM.flushSync for state updates (#11005)
  • Allow unstable_usePrompt to accept a BlockerFunction in addition to a boolean (#10991)

Patch Changes

  • Fix issue where a changing fetcher key in a useFetcher that remains mounted wasn't getting picked up (#11009)
  • Fix useFormAction which was incorrectly inheriting the ?index query param from child route action submissions (#11025)
  • Fix NavLink active logic when to location has a trailing slash (#10734)
  • Updated dependencies:
    • react-router@6.19.0
    • @remix-run/router@1.12.0

6.18.0 (from changelog)

Minor Changes

  • Add support for manual fetcher key specification via useFetcher({ key: string }) so you can access the same fetcher instance from different components in your application without prop-drilling (RFC) (#10960)

    • Fetcher keys are now also exposed on the fetchers returned from useFetchers so that they can be looked up by key
  • Add navigate/fetcherKey params/props to useSumbit/Form to support kicking off a fetcher submission under the hood with an optionally user-specified key (#10960)

    • Invoking a fetcher in this way is ephemeral and stateless
    • If you need to access the state of one of these fetchers, you will need to leverage useFetcher({ key }) to look it up elsewhere

Patch Changes

  • Adds a fetcher context to RouterProvider that holds completed fetcher data, in preparation for the upcoming future flag that will change the fetcher persistence/cleanup behavior (#10961)
  • Fix the future prop on BrowserRouter, HashRouter and MemoryRouter so that it accepts a Partial<FutureConfig> instead of requiring all flags to be included. (#10962)
  • Updated dependencies:
    • @remix-run/router@1.11.0
    • react-router@6.18.0

Does any of this look wrong? Please let us know.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the dependencies Pull requests that update a dependency file label Mar 7, 2024
Copy link

socket-security bot commented Mar 7, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/react-router-dom@6.22.2 environment +2 5.7 MB mjackson

🚮 Removed packages: npm/react-router-dom@6.17.0

View full report↗︎

@pavanjoshi914 pavanjoshi914 enabled auto-merge (rebase) March 13, 2024 12:51
@pavanjoshi914 pavanjoshi914 merged commit f82ace0 into master Mar 13, 2024
6 checks passed
@pavanjoshi914 pavanjoshi914 deleted the depfu/update/yarn/react-router-dom-6.22.2 branch March 13, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant