Skip to content

[Snyk] Upgrade react-router from 6.0.0-beta.0 to 6.0.2 #5

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snyk-bot
Copy link

Snyk has created this PR to upgrade react-router from 6.0.0-beta.0 to 6.0.2.

merge advice
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 11 versions ahead of your current version.
  • The recommended version was released 2 months ago, on 2021-11-09.
Release notes
Package name: react-router
  • 6.0.2 - 2021-11-09

    ✨ Features

    • Added the reloadDocument prop to <Link>. This allows <Link> to function like a normal anchor tag by reloading the document after navigation while maintaining the relative to resolution.

    🗒️ Docs

    • Fixed several issues in docblocks and the docs themselves. See the full changelog for the deets!

    🤝 New Contributors

    Full Changelog

    v6.0.1...v6.0.2

  • 6.0.1 - 2021-11-05

    🐛 Bug Fixes

    • Add a default <StaticRouter location> value (#8243)
    • Add invariant for using <Route> inside <Routes> to help people make the change (#8238)
  • 6.0.0 - 2021-11-03

    React Router v6 is here!

    Please go read our blog post for more information on all the great stuff in v6 including notes about how to upgrade from React Router v5 and Reach Router.

  • 6.0.0-beta.8 - 2021-10-22

    Remember last week when we said

    We anticipate this will be the last beta release before v6 stable next week.

    Yeah, about that … 😅

    We found and squashed a few high-priority bugs that needed to be addressed first. But it's coming very soon, we promise! In the mean time, here's what you'll get from our eight-est and greatest beta release:

    🐛 Bug Fixes

    • We fixed a few bugs in useHref that resulted in the incorrect resolved value in cases where a basename is used on the <Router /> component (See #8133 and #8142 for details).
    • We also fixed a bug in our path ranking algorithm so that splat routes (routes with a * path value) are now correctly ranked ahead of layout routes.

    🗒️ Docs

    We've added lots of goodies to our docs and examples, and there's a lot more yet to come. Take a look and see if you find something that makes your work a little easier! We think the lazy loading and custom query parsing examples are particularly cool! 🤓

  • 6.0.0-beta.7 - 2021-10-15

    In this release we made a small but significant change to how <Link to=".."> works. This is going to help out a lot if you were trying to use links in a * route.

    We have also backed out our blocking/prompt APIs for the stable v6 release. We will revisit this post 6.0 when we have a little more time to get it right.

    ✨ Features

    The major change in this release could also be classified as a bugfix or a breaking change, depending on how you look at it. We essentialy altered the way <Link to=".."> works. See #8086 for the motivation behind this change.

    You'll probably want to reread the section in the v5 => v6 migration guide about <Link to> values (it has been updated), but it basically boils down to this: any leading .. segment in a <Link to> value traverses "up" one route and builds upon that route's path instead of just removing one URL segment. This feature really completes the story of relative routes and links.

    We could consider this a bugfix, since this is how it was always intended to work in the first place. Without it, you'd have a difficult time linking predictably in * routes because your <a href> would be different depending on the number of segments in the current URL.

    The reason this could also be considered a breaking change is that .. now works slightly differently in <Link to> than it would in <a href>. When you have <a href=".."> it operates on the URL pathname, removing one segment of the current URL. However, since many routes really only match a single segment of the URL, there is often no difference between <Link to=".."> and <a href="..">.

    💔 Breaking Changes

    • We removed useBlocker(), usePrompt(), and <Prompt> for now. We will revisit these post 6.0 when we have more time to get it right. But we don't want it to block (see what I did there) the release of all the other awesome stuff we've got in v6.

    🛠 Roadmap

    We anticipate this will be the last beta release before v6 stable next week. Please give it a shot and let us know how it goes!

    👍 Upgrading

    If you're thinking about upgrading to v6, I published a few notes this past week that may help you:

    Both of those posts contain steps you can take today in your v5 app without upgrading to v6.

    We are also developing a backwards compat lib that should help some of you upgrade from v5 to v6. We'll post more about this when it's ready.

    💻 Installing

    Development for v6 has switched from dev to the main branch.

    If you'd like to test it out, install from npm:

    $ npm install history react-router-dom@next
  • 6.0.0-beta.6 - 2021-10-07

    No big enhancements in this release, just squashing bugs and writing lots of tests! Also, we are hard at work on cranking out examples for v6. See the end of this post for an update on our roadmap between here and v6 stable.

    🧰 Examples

    We have begun creating some examples for v6 that we hope will help developers make effective use of all the new features we have. So far, we have examples for the following:

    • Basic Example – A basic client-side app for v6 showing how to use nested routes, layouts, links, and the new <Outlet> API
    • Auth Example – Demonstrates an authentication flow including using the new useNavigate() hook, the <Navigate> element, and location.state
    • Search Params Example – Demonstrates how to build a simple search form that uses the new useSearchParams() hook
    • SSR Example – A server-rendered app that uses <StaticRouter> on the server and uses a <BrowserRouter> with ReactDOM.hydrate() on the client

    Each example includes a button in the README that allows you to instantly launch a running instance on StackBlitz that you can play with. We hope you enjoy exploring!

    🐛 Bugfixes

    • Make <NavLink> match only whole URL segments instead of pieces. This means that <NavLink to="/home/users"> will still be active at /home/users, but not at /home/users2. See #7523
    • Makes "layout routes" (routes with no path) never match unless one of their children do. See #8085
    • Fixes a route matching regression with splat routes that was introduced in beta.5. See #8072 and #8109
    • Fixes matching a nested splat route. See af7d038
    • Provide all parent route params to descendant <Routes>. This reverses a decision that we made in beta.5 to remove them. See #8073

    💔 Breaking Changes

    • Splats in route paths (*) match only after a / in the URL. This means that <Route path="files*"> will always match as if it were <Route path="files/*">. The router will issue a warning if your route path ends with * but not /*

    🛠 Roadmap

    We are very close to a stable release! The last big code changes we need to make are:

    • Fixing "linking up". Currently a <Link to=".."> operates on the URL pathname. However, this makes it difficult to link to the parent route when you're in a splat route. See #8086. This will be a breaking change.
    • We are going to remove useBlocker() and <Prompt> in our initial v6 release, with plans to revisit them and possibly add them back at some point in the future. I still need to write up something here that explains our rationale. This will also be a breaking change.
    • We are going to add some animation primitives (see #8008). The <Routes location> prop will be in v6, but it isn't ideal for animation.

    💻 Installing

    Development for v6 is chugging along on the dev branch.

    If you'd like to test it out, install from npm:

    $ npm install history react-router-dom@next
  • 6.0.0-beta.5 - 2021-09-25
    Read more
  • 6.0.0-beta.4 - 2021-09-11
    Read more
  • 6.0.0-beta.3 - 2021-09-03
    Read more
  • 6.0.0-beta.2 - 2021-08-20
  • 6.0.0-beta.1 - 2021-08-13
  • 6.0.0-beta.0 - 2020-06-19
from react-router GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant