Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit a9c572d

Browse files
build(deps): bump react-router-dom from 6.3.0 to 6.4.2 in /api-editor/gui (#1068)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.3.0 to 6.4.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/remix-run/react-router/releases">react-router-dom's releases</a>.</em></p> <blockquote> <h2>[email protected]</h2> <h3>Patch Changes</h3> <ul> <li> <p>fix: remove internal router singleton (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9227">#9227</a>)</p> <p>This change removes the internal module-level <code>routerSingleton</code> we create and maintain inside our data routers since it was causing a number of headaches for non-simple use cases:</p> <ul> <li>Unit tests are a pain because you need to find a way to reset the singleton in-between tests <ul> <li>Use use a <code>_resetModuleScope</code> singleton for our tests</li> <li>...but this isn't exposed to users who may want to do their own tests around our router</li> </ul> </li> <li>The JSX children <code>&lt;Route&gt;</code> objects cause non-intuitive behavior based on idiomatic react expectations <ul> <li>Conditional runtime <code>&lt;Route&gt;</code>'s won't get picked up</li> <li>Adding new <code>&lt;Route&gt;</code>'s during local dev won't get picked up during HMR</li> <li>Using external state in your elements doesn't work as one might expect (see <a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9225">#9225</a>)</li> </ul> </li> </ul> <p>Instead, we are going to lift the singleton out into user-land, so that they create the router singleton and manage it outside the react tree - which is what react 18 is encouraging with <code>useSyncExternalStore</code> anyways! This also means that since users create the router - there's no longer any difference in the rendering aspect for memory/browser/hash routers (which only impacts router/history creation) - so we can get rid of those and trim to a simple <code>RouterProvider</code></p> <pre lang="jsx"><code>// Before function App() { &lt;DataBrowserRouter&gt; &lt;Route path=&quot;/&quot; element={&lt;Layout /&gt;}&gt; &lt;Route index element={&lt;Home /&gt;}&gt; &lt;/Route&gt; &lt;DataBrowserRouter&gt; } <p>// After let router = createBrowserRouter([{ path: &quot;/&quot;, element: &lt;Layout /&gt;, children: [{ index: true, element: &lt;Home /&gt;, }] }]);</p> <p>function App() { return &lt;RouterProvider router={router} /&gt; } </code></pre></p> <p>If folks still prefer the JSX notation, they can leverage <code>createRoutesFromElements</code> (aliased from <code>createRoutesFromChildren</code> since they are not &quot;children&quot; in this usage):</p> <pre lang="jsx"><code>let routes = createRoutesFromElements( &lt;Route path=&quot;/&quot; element={&lt;Layout /&gt;}&gt; &lt;Route index element={&lt;Home /&gt;}&gt; &lt;/Route&gt; ); </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md">react-router-dom's changelog</a>.</em></p> <blockquote> <h2>6.4.2</h2> <h3>Patch Changes</h3> <ul> <li>Respect <code>basename</code> in <code>useFormAction</code> (<a href="https://github-redirect.dependabot.com/remix-run/react-router/pull/9352">#9352</a>)</li> <li>Enhance console error messages for invalid usage of data router hooks (<a href="https://github-redirect.dependabot.com/remix-run/react-router/pull/9311">#9311</a>)</li> <li>If an index route has children, it will result in a runtime error. We have strengthened our <code>RouteObject</code>/<code>RouteProps</code> types to surface the error in TypeScript. (<a href="https://github-redirect.dependabot.com/remix-run/react-router/pull/9366">#9366</a>)</li> <li>Updated dependencies: <ul> <li><code>[email protected]</code></li> <li><code>@remix-run/[email protected]</code></li> </ul> </li> </ul> <h2>6.4.1</h2> <h3>Patch Changes</h3> <ul> <li>Updated dependencies: <ul> <li><code>[email protected]</code></li> <li><code>@remix-run/[email protected]</code></li> </ul> </li> </ul> <h2>6.4.0</h2> <p>Whoa this is a big one! <code>6.4.0</code> brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the <a href="https://reactrouter.com/">docs</a>, especially the <a href="https://reactrouter.com/en/6.4.0/start/overview">feature overview</a> and the [tutorial][rr-tutorial].</p> <p><strong>New APIs</strong></p> <ul> <li>Create your router with <code>createMemoryRouter</code>/<code>createBrowserRouter</code>/<code>createHashRouter</code></li> <li>Render your router with <code>&lt;RouterProvider&gt;</code></li> <li>Load data with a Route <code>loader</code> and mutate with a Route <code>action</code></li> <li>Handle errors with Route <code>errorElement</code></li> <li>Submit data with the new <code>&lt;Form&gt;</code> component</li> <li>Perform in-page data loads and mutations with <code>useFetcher()</code></li> <li>Defer non-critical data with <code>defer</code> and <code>Await</code></li> <li>Manage scroll position with <code>&lt;ScrollRestoration&gt;</code></li> </ul> <p><strong>New Features</strong></p> <ul> <li>Perform path-relative navigations with <code>&lt;Link relative=&quot;path&quot;&gt;</code> (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9160">#9160</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Path resolution is now trailing slash agnostic (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/8861">#8861</a>)</li> <li><code>useLocation</code> returns the scoped location inside a <code>&lt;Routes location&gt;</code> component (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9094">#9094</a>)</li> <li>respect the <code>&lt;Link replace&gt;</code> prop if it is defined (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/8779">#8779</a>)</li> </ul> <p><strong>Updated Dependencies</strong></p> <ul> <li><code>[email protected]</code></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/remix-run/react-router/commit/92425b888a2844ef4a5796afcfe89a6f685e04f8"><code>92425b8</code></a> chore: Update version for release</li> <li><a href="https://github.com/remix-run/react-router/commit/1317087335c71b26b1bfe8c2e7b1b484b407671f"><code>1317087</code></a> chore: Update version for release (pre) (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9395">#9395</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/590510901f692f3863d44bc47998599e37f3715b"><code>5905109</code></a> chore: Update version for release (pre) (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9380">#9380</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/540f94b0f53335c1f0043bbf97606c79277cf820"><code>540f94b</code></a> fix: Strengthen route typings (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9366">#9366</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/434003d3c815827646eb034daa43c85b1a030c34"><code>434003d</code></a> fix: respect basename in useFormAction (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9352">#9352</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/779d4af8feb80717490449eddd0a90f14377e344"><code>779d4af</code></a> fix: update matchPath to avoid false positives on dash-separated segments (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9">#9</a>...</li> <li><a href="https://github.com/remix-run/react-router/commit/d8e6d7fec0019e7a133ab940156e588b0c0f0280"><code>d8e6d7f</code></a> docs: add better docs and console errors for data router features (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9311">#9311</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/d405320891350dcb1d84f6f696e771cbc44b21bc"><code>d405320</code></a> chore: update versions for release</li> <li><a href="https://github.com/remix-run/react-router/commit/c4a27f7baafe8235d8feaf0d75915e22bc69203d"><code>c4a27f7</code></a> chore: Update version for release (pre) (<a href="https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom/issues/9316">#9316</a>)</li> <li><a href="https://github.com/remix-run/react-router/commit/aeceb7dcdf58c13eaf62e0657e79e8dba0122675"><code>aeceb7d</code></a> fix changeset config + update changelogs</li> <li>Additional commits viewable in <a href="https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=react-router-dom&package-manager=npm_and_yarn&previous-version=6.3.0&new-version=6.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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 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) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent ef63b8b commit a9c572d

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

api-editor/gui/package-lock.json

Lines changed: 38 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-editor/gui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"react-markdown": "^8.0.3",
3636
"react-redux": "^8.0.2",
3737
"react-router": "^6.3.0",
38-
"react-router-dom": "^6.3.0",
38+
"react-router-dom": "^6.4.2",
3939
"react-syntax-highlighter": "^15.5.0",
4040
"react-window": "^1.8.7",
4141
"rehype-katex": "^6.0.1",

0 commit comments

Comments
 (0)