RedwoodJS v0.21.0 🚀

:point_right: Join us for the upcoming RedwoodJS Meetup on Thursday, December 3rd.

v0.21.0 Highlights

A huge Thank You to everyone who contributed to documentation on redwoodjs.com. :star_struck:

And :rocket: to @dac09 and @Tobbe for these release highlights as well as all the fantastic individuals below who made this release possible!

Experimental support for React fast-refresh!

React fast refresh is a development-time feature that improves the “Hot reloading” functionality. The biggest benefit is that your components maintain state when you save them and they’re refreshed on the screen. Learn more here about this feature.

To add support for fast-refresh, edit your redwood.toml file and add the following:

[web] 
# ... others 
experimentalFastRefresh = true

Restart you development process and you should be good to go!

Added multiproviders to firebase auth!

Now, when you logIn() or signUp() with the firebase auth client, you can optionally specify the provider: google.com , facebook.com , github.com , twitter.com , microsoft.com or apple.com . The default is google.com .

Converted @redwoodjs/forms to TypeScript!

More progress toward the Redwood v1 TS support goals!

Changed

Added

  • Auth: added multiproviders to firebase auth! #1412 @dac09 :tada:
  • TS: converted @redwoodjs/forms to TypeScript! #1431 @Tobbe :tada:
  • Dev: experimental support for React fast-refresh! #1461 #1463 #1464 @dac09 :tada:
    • see “Highlights” above for instructions
  • Ops: GH Action to create packages from PRs #1459 #1485 #1477 @Tobbe
  • Storybook: add open flag, yarn rw storbook --open will now open the browsers. #1445 @jvanbaarsen
  • Storybook: add Redwood’s “node” Webpack config to Storybook’s Webpack config. #1491 @jderrough
  • Server: http server tweaks. #1441 @peterp
  • Prisma: added { redwood { prismaVersion } } field to GraphQL #1425 @jvanbaarsen
  • Prisma: add ability to specify a custom path for the prisma.schema #1424 @dhausser
  • CRWA: Quick start message added to yarn create redwood-app #1388 @kevPo

Fixes


Breaking :warning:

[Minor Change] In this release, the Apollo fetchPolicy and nextFetchPolicy were changed for Redwood Cell’s beforeQuery . It’s possible that cache behavior may change for custom implementations of Apollo cache configuration. However, it’s unlikely the majority of Redwood projects will experience any changes after upgrading — tests demonstrated backwards compatibility. (See #1428) Also relevant are updates to Scaffold Generators no longer requiring refetchQuery calls. Note: existing refetchQuery configuration is backwards compatible. (See #1497)


How to upgrade RedwoodJS to v0.21.0

: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 code modifications are recommended but not required.

  1. [Recommended] Rename api/prisma to api/db
    This change is not required. New installations of Redwood now use the directory api/db instead of api/prisma . If you change the directory name in your project, you must also add a schemaPath config to redwood.toml . See #116 for code change example.
// redwood.toml
...
[api]
  port = 8911
  schemaPath = "./api/db/schema.prisma"
...
  1. [Recommended] Remove schema.prisma “rhel-openssl-1.0.x” binaryTarget
    Prisma v2.11.0 (included in this release) fixes the requirement for adding “rhel-openssl-1.0.x”. Removing this binaryTarget may also reduce the size of the built API. See #115 for code change example.
// api/db/schema.prisma
...
generator client {
  provider      = "prisma-client-js"
  binaryTargets = "native"
}
...

Upgrade Packages

Run the following command within your App directory:

yarn rw upgrade

To run the upgrade command, your project must be using v0.6.0 or greater. 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

5 Likes