Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Feb 24, 2025

Bumps @react-router/dev from 7.1.3 to 7.2.0.

Release notes

Sourced from @​react-router/dev's releases.

v7.2.0

See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v720

v.7.1.5

See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v715

v7.1.4

See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v714

Changelog

Sourced from @​react-router/dev's changelog.

7.2.0

Minor Changes

  • Generate a "SPA fallback" HTML file for scenarios where applications are prerendering the / route with ssr:false (#12948)

    • If you specify ssr:false without a prerender config, this is considered "SPA Mode" and the generated index.html file will only render down to the root route and will be able to hydrate for any valid application path
    • If you specify ssr:false with a prerender config but do not include the / path (i.e., prerender: ['/blog/post']), then we still generate a "SPA Mode" index.html file that can hydrate for any path in the application
    • However, previously if you specified ssr:false and included the / path in your prerender config, we would prerender the / route into index.html as a non-SPA page
      • The generated HTML would include the root index route which prevented hydration for any other paths
      • With this change, we now generate a "SPA Mode" file in __spa-fallback.html that will allow you to hydrate for any non-prerendered paths
      • You can serve this file from your static file server for any paths that would otherwise 404 if you only want to pre-render some routes in your ssr:false app and serve the others as a SPA
      • npx sirv-cli build/client --single __spa-fallback.html
  • Allow a loader in the root route in SPA mode because it can be called/server-rendered at build time (#12948)

    • Route.HydrateFallbackProps now also receives loaderData
      • This will be defined so long as the HydrateFallback is rendering while children routes are loading
      • This will be undefined if the HydrateFallback is rendering because the route has it's own hydrating clientLoader
      • In SPA mode, this will allow you to render loader root data into the SPA index.html
  • New type-safe href utility that guarantees links point to actual paths in your app (#13012)

    import { href } from "react-router";
    export default function Component() {
    const link = href("/blog/:slug", { slug: "my-first-post" });
    return (
    <main>
    <Link to={href("/products/:id", { id: "asdf" })} />
    <NavLink to={href("/:lang?/about", { lang: "en" })} />
    </main>
    );
    }

Patch Changes

  • Handle custom envDir in Vite config (#12969)

  • Fix typegen for repeated params (#13012)

    In React Router, path parameters are keyed by their name. So for a path pattern like /a/:id/b/:id?/c/:id, the last :id will set the value for id in useParams and the params prop. For example, /a/1/b/2/c/3 will result in the value { id: 3 } at runtime.

    Previously, generated types for params incorrectly modeled repeated params with an array. So /a/1/b/2/c/3 generated a type like { id: [1,2,3] }.

... (truncated)

Commits

Dependabot compatibility score

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 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 <dependency name> 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)

Bumps [@react-router/dev](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dev) from 7.1.3 to 7.2.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dev/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/@react-router/dev@7.2.0/packages/react-router-dev)

---
updated-dependencies:
- dependency-name: "@react-router/dev"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 24, 2025
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Mar 10, 2025

Superseded by #23.

@dependabot dependabot bot closed this Mar 10, 2025
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/react-router/dev-7.2.0 branch March 10, 2025 09:13
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.

0 participants