Skip to content

Releases: redwoodjs/redwood

v7.4.0

12 Apr 21:25
8cdadf9
Compare
Choose a tag to compare

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

v7.3.2

11 Apr 21:48
0cb788d
Compare
Choose a tag to compare

Patch Release

  • fix(auth): Handle when authorization header is lowercased (#10442) by @dac09

    This fix handles an authentication error that occurred when the 'Authorization' header was presented in lowercase as 'authorization'.

v7.3.1

10 Apr 22:05
357efac
Compare
Choose a tag to compare

Patch Release

  • fix(vercel): write vercel.json as a part of setup (#10355) by @jtoar

    This fix smooths initial deploys to Vercel by writing a vercel.json file that specifies an env var that enables Corepack. Users that already successfully deploy to Vercel don't need to introduce this file.

  • fix(cli): only show webpack options for dev if bundler = "webpack" (#10359) by @jtoar

    A few flags for yarn rw dev don't apply to Vite but are shown nevertheless. One of them, watchNodeModules, is legacy at this point. It's only useful for testing out framework changes on a project using webpack. It makes the webpack dev server reload on changes to node_modules. The other, forward (aliased fwd) isn't fundamentally Webpack specific, but has been broken for quite a while because the fix is nontrivial. It seems better to hide these flags for now, otherwise we're just advertising broken or no-op behavior.

v7.3.0

29 Mar 08:08
0a67f19
Compare
Choose a tag to compare

Note

There was a hiccup in our release tooling for the v7.2.0 release so we're skipping that one here. v7.3.0 is the next release after v7.1.3.

Changelog

  • fix(deps): update prisma monorepo to v5.11.0 #10262

  • fix(deps): update dependency @apollo/client to v3.9.9 #10297

  • chore(deps): update dependency typescript to v5.4.3 #10308

  • fix(cli): Update build and serve to handle the absence of the api side (#10265) by @Josh-Walker-GM

    This change allows you to successfully build your app with yarn rw build even when you choose to totally delete your api side. Previously you would have seen errors related to both Prisma and GraphQL. It also improves the error messages produced by yarn rw serve in this case.

  • fix(esm): get lint working (#10152) by @jtoar

    This PR fixes yarn rw lint and some generators and setup commands for ESM projects.
    Before projects would get the following error:

    Oops! Something went wrong! :(
    ESLint: 8.55.0
    Error [ERR_REQUIRE_ESM]: require() of ES Module ~/redwood-app/prettier.config.js from ~/redwood-app/node_modules/prettier/third-party.js not supported.
    Instead change the require of prettier.config.js in ~/redwood-app/node_modules/prettier/third-party.js to a dynamic import() which is available in all CommonJS modules.
    
  • chore(babel-config): Fix error message grammar (#10280) by @Tobbe

    Fixed the grammar of the error message you see if you have more than one Page file in a single Page directory.

  • Fix react docs links (#10278) by @rxx

  • Update deployment.md (#10267) by @LAdanimo

  • Update Prisma Dataguide Link (#10254) by @pantheredeye

  • docs: fix typo on router page (#10251) by @thenewnickyzz

  • Update first-test.md (#10244) by @LAdanimo

Dependencies

Click to see all upgraded dependencies
  • chore(deps): update dependency @clerk/clerk-react to v4.30.7 #10129
  • chore(deps): update dependency @auth0/auth0-spa-js to v2.1.3 #10128
  • chore(deps): update dependency @types/babel-plugin-tester to v9.0.10 #10141
  • chore(deps): update dependency @types/babel__core to v7.20.5 #10142
  • chore(deps): update dependency @types/babel__generator to v7.6.8 #10144
  • chore(deps): update dependency @types/jsonwebtoken to v9.0.6 #10148
  • chore(deps): update dependency @types/memjs to v1.3.3 #10154
  • chore(deps): update dependency @types/lodash to v4.14.202 #10153
  • chore(deps): update dependency @types/prompts to v2.4.9 #10156
  • chore(deps): update dependency @types/mjml to v4.7.4 #10155
  • chore(deps): update dependency @types/uuid to v9.0.8 #10159
  • chore(deps): update dependency memjs to v1.3.2 #10163
  • chore(deps): update dependency esbuild to v0.20.1 #10161
  • chore(deps): update dependency node to v20.11.1 #10165
  • chore(deps): update dependency vitest to v1.3.1 #10166
  • chore(deps): update yarn monorepo #10180
  • chore(deps): update chore (major) #10186
  • fix(deps): update dependency @mdx-js/react to v3.0.1 #10203
  • fix(deps): update dependency @clerk/clerk-sdk-node to v4.13.11 #10198
  • fix(deps): update graphql-tools monorepo #10258
  • fix(deps): update dependency pino to v8.19.0 #10260
  • chore(deps): update dependency @supabase/supabase-js to v2.39.8 #10255
  • chore(deps): update dependency esbuild to v0.20.2 #10269
  • fix(deps): update dependency webpack-bundle-analyzer to v4.10.1 #10319
  • fix(deps): update dependency webpack to v5.91.0 #10318
  • fix(deps): update dependency dotenv to v16.4.5 #10315
  • fix(deps): update dependency dotenv-webpack to v8.1.0 #10316
  • fix(deps): update dependency @graphql-yoga/plugin-persisted-operations to v3.2.0 #10312
  • fix(deps): update dependency @graphql-yoga/plugin-graphql-sse to v3.2.0 #10311
  • fix(deps): update dependency @fastify/http-proxy to v9.5.0 #10309
  • chore(deps): update dependency nodemon to v3.1.0 #10304
  • chore(deps): update dependency @testing-library/react to v14.2.2 #10303
  • chore(deps): update dependency @testing-library/jest-dom to v6.4.2 #10302
  • fix(deps): update dependency msw to v1.3.3 #10299
  • fix(deps): update dependency webpack-dev-server to v4.15.2 #10300
  • fix(deps): update dependency @sdl-codegen/node to v0.0.13 #10298
  • chore(deps): update dependency tsx to v4.7.1 #10307
  • fix(deps): update dependency graphql-yoga to v5.2.0 #10317
  • fix(deps): update dependency css-loader to v6.10.0 #10314
  • chore(deps): update dependency semver to v7.6.0 #10306
  • chore(deps): update dependency vitest to v1.4.0 #10259
  • fix(deps): update dependency @graphql-yoga/plugin-defer-stream to v3.2.0 #10310
  • fix(deps): update dependency core-js to v3.36.1 #10313
  • fix(deps): update dependency react-hook-form to v7.51.2 #10329
  • fix(deps): update dependency archiver to v7 #10334
  • chore(deps): update babel monorepo #10331

v7.1.3

12 Mar 16:09
f333d3f
Compare
Choose a tag to compare

Patch Release

  • fix(dbAuth): restore behavior of checking whether a search query is present (#10204) by @cannikin

    Previously dbAuth would check whether or not query string variables were present at all before invoking the proper function. During a refactor we updated this code to assume a query would always be present. Which it would be during normal browser behavior. But, we had a complaint from a user who relied on this optional check in one of their tests. So we're restoring the optional check here.

v7.2.0-rc.36

11 Mar 00:15
b280ade
Compare
Choose a tag to compare
v7.2.0-rc.36 Pre-release
Pre-release

Changelog

This release candidate used to include Vite v5 and Prettier v3. While they weren't breaking for simple projects, they are technically breaking changes since users can configure both the Vite and Prettier config in their projects so we've decided to include them in the next major instead. Considering that these changes are minimal and ready to go, the next major may come sooner than the last and only consistent of these changes.

This minor just consists of dependency upgrades:

  • chore(deps): update dependency @clerk/clerk-react to v4.30.7 #10129
  • chore(deps): update dependency @auth0/auth0-spa-js to v2.1.3 #10128
  • chore(deps): update dependency @supabase/supabase-js to v2.39.7 #10140
  • fix(deps): update dependency @apollo/client to v3.9.6 #10185

v7.1.2

09 Mar 13:40
d0a0c07
Compare
Choose a tag to compare

Patch Release

  • Fix storybook preview config path reference (#10160) by @pvenable

    This change fixes a small regression related to storybook preview config which resulted it in your config not being loaded. Details of this issue can be found in #10113.

v7.1.1

08 Mar 22:20
14ebfc3
Compare
Choose a tag to compare

Patch Release

  • Enable CSS nesting syntax by default when using Tailwind (#10116) by @cannikin

    This lets you use nested CSS syntax in your web/src/index.css right after you install Tailwind.

    .button {
      @apply p-2 font-semibold bg-gray-500;
    
      &:hover {
        @apply bg-red-500;
      }
    
      .icon {
        @apply w-4 h-4;
      }
    
      span {
        @apply text-sm;
      }
    }
  • fix(setup realtime): remove "exp" from suggested setup command (#10151) by @jtoar

    The realtime setup command was still suggesting running the experimental server file setup command if the server file wasn't setup. This fixes it so that it points users to the stable setup command, yarn rw setup server-file, instead.

  • fix(esm): use CJS wrapper for ESM default interop (#10119) by @jtoar

    This PR builds on the work started in #10083 around ESM. One of the caveats of that PR was that the default export from @redwoodjs/vite broke. The workaround was referencing the default property on the Redwood Vite plugin, like redwood.default(). This fixes the ES module default export interoperability so that no change is necessary in switching between module types.

v7.1.0

07 Mar 15:47
a0bdec9
Compare
Choose a tag to compare

Changelog

  • fix(deps): update prisma monorepo to v5.10.2 (#10088)

    This release updates Prisma to v5.10.2. Here are quick links to all the release notes since the last version (v5.9.1):

  • Add support for loading more env var files (#9961, #10093, #10094, and #10123) by @orta

    Fixes #9877. This PR adds CLI functionality to load more .env files via NODE_ENV and an --load-env-files flag.
    Env vars loaded via either of these methods override the values in .env:

    # Loads '.env.production', which overrides values in '.env'
    NODE_ENV=production yarn rw exec myScript
    
    # Load '.env.stripe' and '.env.nakama', which overrides values
    yarn rw exec myScript --load-env-files stripe nakama
    # Or you can specify them individually:
    yarn rw exec myScript --load-env-files stripe --load-env-files nakama
    

    Note that this feature is mainly for local scripting. Most deploy providers don't let you upload .env files (unless you're using baremetal) and usually have their own way of determining environments.

  • fix(api-server): Preserve original host header for proxied API requests (#10082) by @magJ

    Some apps rely on reading the host header (e.g. multi-tenant apps served over multiple subdomains). This change forwards on the original host header on proxied Fastify requests, and the experimental SSR/RSC server.

  • fix(deps): update opentelemetry-js monorepo (#10065) by @Tobbe

    Updates our opentelemetry packages. This is a breaking change for users of our experimental opentelemetry support. This is what their changelog says is breaking:

    • fix(exporter-metrics-otlp-grpc): programmatic headers take precedence over
      environment variables #2370 @Vunovati
    • fix(exporter-metrics-otlp-http): programmatic headers take precedence over
      environment variables #2370 @Vunovati
    • fix(exporter-metrics-otlp-proto): programmatic headers take precedence over
      environment variables #2370 @Vunovati
    • fix(otlp-exporter-base)!: decrease default concurrency limit to 30 #4211
      @pichlermarc
      • fixes a memory leak on prolonged collector unavailability
      • this change is marked as breaking as it changes defaults
    • fix(instrumentation)!: pin import-in-the-middle@1.7.1 #4441
      • Fixes a bug where, in some circumstances, ESM instrumentation packages
        would try to instrument CJS exports on ESM, causing the end-user
        application to crash.
      • This breaking change only affects users that are using the experimental
        @opentelemetry/instrumentation/hook.mjs loader hook AND Node.js 18.19 or
        later:
        • This reverts back to an older version of import-in-the-middle due to
          DataDog/import-in-the-middle#57
        • This version does not support Node.js 18.19 or later

Dependencies

Click to see all upgraded dependencies
  • fix(deps): update opentelemetry-js monorepo #10065
  • fix(deps): update prisma monorepo to v5.10.2 #10088
  • Update dependency @apollo/client to v3.9.5 #10087
  • Update storybook monorepo to v7.6.17 #10089
  • Update babel monorepo to v7.24.0 #10090
  • fix(deps): update dependency fastify to v4.26.2 #10092
  • fix(deps): update dependency @fastify/http-proxy to v9.4.0 #10091

v7.0.7

06 Mar 11:00
ddb7f9d
Compare
Choose a tag to compare

Patch Release

  • fix(context): Re-export context from graphql-server (#10117) by @Josh-Walker-GM

    This change re-exports the context and setContext properties in @redwoodjs/graphql-server from the @redwoodjs/context package where they are now (as of v7) located. This is done to retroactively ease the v7 transition and provide a non-breaking rather than a breaking change.

    See this forum post and the links within for more information on this change.

  • fix(scenario): Make sure to clean up scenarios even if tests fail (#10112) by @dac09

    Fixes an issue where a unit test failure would cause the scenario cleanup to be skipped. Thanks @peraltafederico and @cjreimer for highlighting this!

  • fix(serve): Allow periods in most paths (#10114) by @Tobbe

    Fixes #9969. Partial fix for route paths with periods in them.

    It's only "partial" because it doesn't fix it for yarn rw dev, as that's a Vite bug (vitejs/vite#2415 (comment)). There's also an edge case for yarn rw serve where this doesn't fully handle client-side routes that start with /assets/ and that also have a last-segment that accepts a period, like /assets/client-route-image.jpg.