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

fix(deps): update dependency react-router-dom to v6 #3604

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 8, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-router-dom ^4.3.1 -> ^6.0.0 age adoption passing confidence

Release Notes

remix-run/react-router

v6.0.1

Compare Source

🐛 Bug Fixes

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

v6.0.0

Compare Source

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.

v5.3.0

Compare Source

This release of react-router-dom adds support for passing a function to either the className or style props to conditionally apply values based on the link's active state.

This provides similar functionality as the existing activeClassName and activeStyle props, but is a bit more powerful. For example, you can now easily apply styles exclusively to an inactive NavLink as well. This offers a nicer experience for folks who use utility class-based CSS tools such as Tailwind.

function Comp() {
  return (
    <NavLink
      to="/"
      className={isActive =>
        `px-3 py-2 ${isActive ? 'text-gray-200' : 'text-gray-800'}`
      }
    >
      Home
    </NavLink>
  );
}

Note that as of v6.0.0-beta.3, the activeClassName and activeStyle props are removed completely. Adding support for functional className and style props to both v5 and v6 will give v5 users an easier upgrade path.

Thanks to @​tim-phillips for raising the issue that inspired the change! 🥳

v5.2.1

Compare Source

This release fixes a bug with <Link> so that, when the to location is the same as the current, the history state entry is replaced instead of pushed to the stack. See https://github.com/remix-run/react-router/issues/5362 for details. 🥳

Thanks to @​guidobouman for the PR and for everyone else who weighed in for the fix!

v5.2.0

Compare Source

This release includes a notable performance boost by separating the "Router" context from the "History" context internally. We also allow every element type for Link's component prop and support a sensitive prop on NavLink for control over case sensitive matching.

Enjoy!

Changes

v5.1.2

Compare Source

List of commits
Bugfixes
  • Fix lingering <Link ref> error on React 15 (#​6954)

v5.1.1

Compare Source

List of commits
Bugfixes
  • Fix issue with useParams reading from null object (#​6940)
  • Fix regression passing ref to functional components in React <= 16.2 (#​6934)
  • Fix regression passing empty string to matchPath (#​6941)

v5.1.0

Compare Source

Read the blog post
List of commits
Features
  • Add useParams, useLocation, useHistory, and useRouteMatch hooks (d6224d6)
  • Add support for forwardRef in <Link> (b5528ed)
  • Add support for functions in <Link to> and <NavLink to> (#​5331, #​5368)
  • Add <Link component> API (#​5437)
Bugfixes
  • Don't render <Route children> elements when the <Route> does not match (9665659)

v5.0.1

Compare Source

Changes
Updates
  • Reduced component depth in withRouter() HOC. (10d78bb)
  • Changed misleading warning when withRouter is used outside a Router (10d78bb)
  • Reduced install size and bundle size by switching to mini-create-react-context (992af48)
Bugfixes
  • Fixed display name for router context consumer and provider (6a99c93)
  • Fixed infinite loop caused by Redirect in some scenarios (017f692 and 2ce1d32)
  • Fixed license issue for react context polyfill (f9849c8, then 992af48)
  • Fixed Redirect throwing an exception in StaticRouter without context (3ccbd19)
  • Fixed regression in matchPath that caused an exception for empty paths (7bd1407)
  • Fixed page reload when an exception was thrown in Link onClick (82ce94c)
  • Fixed warning about createRef or useRef values in wrappedComponentRef when using withRouter() (56c829b)
  • Fixed withRouter() wrapped component inside NavLink not working properly (a38ef04)
  • Fixed CJS build - previously, incorrect exports were emitted (caa9950)

Thanks to @​StringEpsilon for putting this list together. Enjoy!

v5.0.0

Compare Source

Note: While this does have a major version bump, it is actually a minor release. We screwed up some of the dependency version selection in 4.3.1, which necessitated a major bump. See this blog post for details.
⚠️ Upgrade Warning ⚠️

Please ensure you have upgraded both react-router and react-router-dom (react-router-native for RN users) to the exact same version. If different versions of those two packages are in your application, you will get errors when using <Link> and other react-router-dom-specific components. You can ensure you have the correct versions of both packages in your app using npm ls react-router react-router-dom.

Breaking Changes

  • Since the old context API is no longer used, any access to the old context will fail. Use of the react router context is not supported, please use withRouter() or a <Route/> instead.
  • Due to the new context API, mixing of imports will now result in an exception:
// Be careful, this won't work anymore!
import BrowserRouter from 'react-router-dom/BrowserRouter';
import { Route } from 'react-router-dom';

<BrowserRouter>
  <Route />
</BrowserRouter>

Refactor as follows:

// These are both from the same build and use the same context object
// so there won't be a mismatch :)
import { BrowserRouter, Route } from 'react-router-dom';
  • In development mode, we now throw an error when using 2 different builds (see b2c6fa0), i.E. combining CJS imports with ESM imports.

New Features

<Route path={["/BigApple", "/NYC", "NewYork"]} component={NewYork} />

Full Changelog

  • <Route /> now supports multiple child nodes when using react >= 16.0.
  • Migrated to new react context API, with a polyfill for react versions < 16.2
  • Removed deprecated lifecycle methods componentWillMount and componentWillReceiveProps
  • Introduced more warnings in development builds
  • Changed build-process to rollup:
    • Smaller build size
    • Package now includes pre-minified files
    • Package now consists of single-file builds that include all modules.
  • Upgraded to history 4.9.0
  • Per file imports are deprecated and will be removed in a future major version. For now, a warning will be logged.
  • Made sure that react router conforms to react <StrictMode/>
  • Fixed <Link /> not working properly with target="_self" - #​6138 (thanks @​ericyang89)
  • Fixed prop-type warning when using forwardRef - #​6417 (thanks @​frehner and @​eXon)
  • Added support for createRef in - #​6567 (thanks @​gcangussu)
  • Removed use of eval in development to be compliant with unsafe-eval CSP - #​6611
  • Migrated to babel-preset-env
  • Improved testing infrastructure to improve developer workflow
  • Several docs improvements - #​6410 (thanks @​justsml)

Configuration

📅 Schedule: "before 3am on Monday" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner November 8, 2021 00:54
@renovate
Copy link
Contributor Author

renovate bot commented Nov 8, 2021

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: site/package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: cli-docs-site@1.0.0
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR!   react@"^16.14.0" from the root project
npm ERR!   peer react@">=16.8" from react-router-dom@6.0.1
npm ERR!   node_modules/react-router-dom
npm ERR!     react-router-dom@"^6.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.2" from react-dom@17.0.2
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@">=16.8" from react-router-dom@6.0.1
npm ERR!   node_modules/react-router-dom
npm ERR!     react-router-dom@"^6.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/renovate-cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate-cache/others/npm/_logs/2021-11-08T00_54_36_272Z-debug.log

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 8, 2021
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

📊 Benchmark results

Comparing with 9165fe3

Package size: 363 MB

⬇️ 0.00% decrease vs. 9165fe3

^  362 MB  362 MB  362 MB  362 MB  362 MB  362 MB  363 MB  362 MB  362 MB  362 MB  362 MB  362 MB  363 MB 
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

@erezrokah erezrokah closed this Nov 8, 2021
@erezrokah erezrokah deleted the renovate/major-react-router-monorepo branch November 8, 2021 13:45
@renovate
Copy link
Contributor Author

renovate bot commented Nov 8, 2021

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 6.x releases. However, if you upgrade to 6.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants