Redwood v0.29.0

This is a MakesItBetter™ release, including incremental improvements and fixes across tooling, TypeScript, api-server, auth, docs, and more. Thank you to everyone in the community who helped make this possible!

:warning: This release contains a minor breaking change and code modifications that are applicable to some projects. See the “Breaking” and “How to Upgrade” sections for more details.

Changed

  • Storybook: CLI Storybook command — add output directory option and change default #2168 #2176 by @thedavidprice :warning:
  • Tooling: Enables fast refresh by default in dev mode #2085 by @dac09
    • you can disable it through the redwood.toml file via [web] fastRefresh = false
  • API: Add root-path to api-server #1691 by @jeliasson
  • Tooling: Improved yarn rwt link, with selective copy #2122 by @dac09
  • Router: Set —Forward props to wrapper components #2125 by @Tobbe
  • Docs: update CRWA quick-start Node requirement #2151 by @thedavidprice
  • CI: Update E2E Tutorial test: add Toast and per Tutorial #2164 by @thedavidprice
  • CI: Router tests — Don’t use window.__REDWOOD__USE_AUTH #2174 by @Tobbe
  • Auth: Just decode, not verify, auth0 token during development and test #2172 by @peterp
  • TS: Improved types | Handling for Boolean and Float route params #2177 by @dac09
  • CLI: add api-server to upgrade command #2245 by @thedavidprice
  • Prisma: upgrade Prisma v2.20 #2223 by @thedavidprice
    • v2.20.0 and v2.20.1 Release Notes
      • New push operation available for arrays on PostgreSQL
      • groupBy and createMany are now Generally Available

Added

  • Generators: Add generator message with info on how to secure a function #2211 by @dthyresson
  • Forms: Adding Transform Capability to SelectField #2138 by @cjreimer
  • Auth: Implement Supabase OAuth Provider Scopes and Redirects #2207 by @dthyresson
  • CLI: Adds yarn rw serve api #2217 by @dac09

Fixes

  • TS: Correctly type GraphQLHookOptions #2166 by @corbt
  • TS: Fix types for CurrentUser #2216 by @dac09
  • Auth: Firebase fix for 8.3.x #2134 by @noire-munich
  • Forms: fixed form submission to be more resilient with abnormal inputs and transformValue properties #2167 by @cjreimer
  • Tooling: Fix rwt link performance issues #2200 by @dac09
  • Tooling: fix(build-link) — Wait for build to complete before copying #2221 by @dac09
  • Docs: fix typo for --javascript option #2213 by @jangxyz
  • CI: e2e Fix for step 1 #2229 by @Tobbe
  • Webpack: (webpack-chunks) Don’t merge all modules into vendors #2082 by @dac09

Breaking :warning:

This is a minor change only affecting projects using yarn redwood storybook --build

The output directory for yarn redwood storybook --build can now be configured with the --build-directory flag. And the output directory default has been changed from web/storybook-static to web/public/storybook, taking advantage of Redwood’s public web directory to serve static files. See #2168 #2176

Users can still output to web/storybook-static via:

yarn redwood storybook --build --build-directory storybook-static

How to upgrade to Redwood v0.29 from v0.28

:point_right: IMPORTANT: Skipping versions when upgrading is not recommended and will likely cause problems. Do read through all Release Notes between your current version and this latest version. Each minor release will likely require you to implement breaking change fixes and apply manual code modifications.

Manual Code Modifications

The following modifications will not be necessary for all projects.

1. Install @redwoodjs/api-server

This modification applies to projects created prior to v0.28.1

In patch release v0.28.1, the @redwoodjs/api-server package was added to api/package.json. See this commit for reference.

Add the dependency:

//api/package.json
...

"version": "0.0.0",
  "private": true,
  "dependencies": {
    "@redwoodjs/api": "^0.29.0",
+   "@redwoodjs/api-server": "^0.29.0"
  }

}

And then install:

yarn install

2. Remove apollo-server-core package resolution

This modification applies to projects created after v0.28.0

In patch v0.28.1 (#2129), we added an apollo-server-core resolution to ./package.json as a workaround for an Apollo Server bug. The bug was resolved and the fix applied to Redwood in patch v0.28.4.

If it exists, remove the resolution from your project (see reference commit here):

// ./package.json
...

"resolutions": {
    "react": "17.0.1",
-   "react-dom": "17.0.1",
+   "react-dom": "17.0.1"
-   "// Temporary fix for": "https://github.com/redwoodjs/redwood/issues/2127",
-   "apollo-server-core": "2.21.2"
  }

And then run a forced install:

yarn --force

Upgrade Packages to v0.29

Run the following command within your App’s directory:

yarn redwood upgrade

Double Check api/package.json: For some projects, it is possible the package dependency @redwoodjs/api-server in api/package.json will not be correctly upgraded to v0.29.0. Confirm it is"@redwoodjs/api-server": "^0.29.0" in your project. If not, manually update the package version and then run yarn --force.

How to upgrade to an incremental version that is not the latest release

The command yarn rw upgrade will always upgrade to the latest (i.e. most recent) Redwood version. If you need to upgrade incrementally to an earlier, specific release, use the --tag option. For example, if you need to upgrade from v0.27.0 to v0.28.4 (which is not the latest release), run the following command:

yarn redwood upgrade --tag 0.28.4

Need help or having trouble upgrading packages? See this forum topic for manual upgrade instructions and general upgrade help.


Redwood Releases on GitHub

You can see all Redwood release notes and version history on GitHub

4 Likes

Upgrade report :sunglasses: upgraded from v0.28.3 without any troubles, app is working fine and I don’t see any regression/bugs anywhere. Will try a deploy soon.

1 Like

There’s a new error wrapper?

I’m pretty sure I saw this error wrapper before 0.29.0.

1 Like

Deploy tried & failed on netlify:

Update for anyone who’d see this: there’s a workaround in the issue, and it’s a prisma related issue.

1 Like