Skip to content

v7.4.0

Compare
Choose a tag to compare
@Josh-Walker-GM Josh-Walker-GM released this 12 Apr 21:25
· 680 commits to main since this release
8cdadf9

Changelog

  • docs(redirect): Add docs for redirect routes (#10374) by @Tobbe

    There were no docs for <Route path="/some/path" redirect="/some/other/path" />. This change introduces docs for the redirect prop.

  • feat(router): Allow redirect routes to use route names as target (#10376) by @Tobbe

    When specifying a redirect route like
    <Route path="/simple" redirect="/newSimple" name="simple" /> the value of redirect is the path of the page the user should be redirected to. However, the paths can be long and annoying to type out. And if they ever change the redirect would now be broken.

    Also, for private routes we do this:

    <Router>
      <Route path="/" page={HomePage} name="home" />
      <PrivateSet unauthenticated="home">
        <Route path="/admin" page={AdminPage} name="admin" />
      </PrivateSet>
    </Router>

    Here, if a user isn't authenticated, the user will be redirected to the home route. Notice how the target route is specified by its name (home) instead of its path (/).

    With this it's now also possible to redirect using the name of the target route, making our route behavior more consistent. So this will now work

    <Router>
      <Route path="/" page={HomePage} name="home" />
      <Route path="/no-longer-exists" redirect="home" />
    </Router>

    Old style paths still works. The logic is super simple. If the redirect value starts with / it's assumed to be a path. If not, it's assumed to be a route name. This should make this change fully backwards compatible.

  • docs: Adds important admonition for generate dbAuth to clarify that must setup dbAuth not just generate the pages (#10293) by @dthyresson

  • docs: Add information about how to turn off Prisma/db operations during a Vercel deploy to reduce Postgres Storage use (#10294) by @dthyresson

  • chore(CLI): build with esbuild (#10323) by @jtoar

    This change speeds up the CLI by up to 50ms.

Dependencies

Click to see all upgraded dependencies
  • fix(deps): update docusaurus monorepo to v3.1.1 #10337
  • fix(deps): update graphqlcodegenerator monorepo #10338
  • fix(deps): update opentelemetry-js monorepo #10339
  • fix(deps): update dependency @graphql-codegen/client-preset to v4.2.5 #10349
  • fix(deps): update dependency html-webpack-plugin to v5.6.0 #10352
  • chore(deps): update dependency supertokens-auth-react to v0.39.1 #10347
  • chore(deps): update babel monorepo #10363
  • chore(deps): update dependency firebase to v10.11.0 #10366