Redwood 1.0.0-rc.final is Available 🚀

:tada: On April 4th, RedwoodJS goes 1.0!
We’ll be celebrating all week with a series of announcements and events around the Redwood ecosystem. It all leads up to a BIG announcement on Thursday.

Check out this announcement for details and event registrations.

Two years ago, we announced Redwood v0.1. Today, we’re releasing the final candidate for the 1.0.0 release. Between now and then, expect only bug fixes and lots of work behind the scenes to prepare for an exciting Redwood v1 Launch Week.

See you on April 4th!

Your faithful ReleaseMaster9000,
@thedavid

:warning: This release has breaking changes. Please see the “Breaking” section for more info.

This release is two patches ahead of Redwood v0.50.0

tl;dr:

  • :yarn: Yarn 3 Hits the Primetime
  • :comet: So. Many. New Deploy Providers: baremetal, Flightcontrol, and Layer0
  • :atom_symbol: GraphQL Server goes Yoga

v1.0.0-rc.final.1 Highlights :tada:

:yarn: Yarn 3 Hits the Primetime

All new project now ship with Yarn 3, which is a boon for stability and performance. If you’re starting a new project, just enjoy all the gains from the get got. To update your project, just run:

npx @redwoodjs/codemods@canary upgrade-yarn

:comet: So. Many. New Deploy Providers: baremetal, Flightcontrol, and Layer0

Want to deploy Redwood everywhere? This release adds built-in support for three great hosting providers — including managing your own server (baremetal).

baremetal
For deploying to your own server, see these instructions. Or just run:

  • yarn rw setup deploy baremetal

Flightcontrol
Managed AWS Fargate and Cloudfront. Check out the Docs. Or just run:

  • yarn rw setup deploy flightcontrol

Layer0
Edge platform. 'Nuff said. Read the Docs. Or just run:

  • yarn rw setup deploy layer0

:atom_symbol: GraphQL Server goes Yoga

Just when you thought Redwood’s API couldn’t get any better, along come The Guild and drop in an improved GraphQL Server, Yoga — a platform agnostic GraphQL Server for JavaScript environment that follows Web standards and supports GraphQL-over-HTTP spec together with GraphQL Multipart spec, defer/stream and SSE subscriptions.

Ready to do some Yoga? Just install a new app or upgrade to this version. It’s beautifully backwards compatible.

Changelog

Unique contributors: 19
PRs merged: 76

See links for the individual minor version Changelogs included in this RC.

Breaking :warning:

This release removes prior deprecations and has breaking changes.

Removed binary rw-api-server; replaced with rw-server [side]

This bin is used for running the Fastify server, which is called when you run yarn rw serve.

Projects should use yarn rw-server api. Also takes web positional (or both).

dbAuth: removed COOKIE_META cookies

PR #4722 dbAuth cookie config has moved to api/src/function/auth.js for better customization. See:

Refer to Code Modification below to update.

DevFatalErrorPage now pretty prints query

PR #4696 updates src/components/FatalErrorPage.tsx

Refer to Code Modification below to update.

Private routes and Set now use roles (instead of role)

PR #4681 Changes the use of Router role to be replaced by roles plural.

Projects using role for RBAC will need to make a Code Modification

How to Upgrade

Code Modifications

These upgrade instructions were also included with the semantic version 0.50 Release Notes.

1. Update DevFatalErrorPage

We’ve made a small change to FatalErrorPage make sure your bundle sizes are as small as possible!
If you only have the default FatalErrorPage, you can run our automatic codemod to pull in the latest changes.

npx @redwoodjs/codemods@canary update-dev-fatal-error-page

If you’ve customised your error page, just a small tweak is needed:

// src/components/FatalErrorPage.tsx
if (process.env.NODE_ENV === 'development') {
-  RedwoodDevFatalErrorPage = require('@redwoodjs/web').DevFatalErrorPage
+  RedwoodDevFatalErrorPage = require('@redwoodjs/web/dist/components/DevFatalErrorPage').DevFatalErrorPage
}

2. Update roles for role in Private routes and Sets

Projects using roles and RBAC will need to change any prop in Routes.tsx|js named role to roles. The value can be a string or array of strings, which is consistent with previous behavior.

Example:

- <Private unauthenicated="home" role="admin">
+ <Private unauthenicated="home" roles="admin">

3. Netlify Deploy: Update .toml

PR #4782 improves prerender performance on Jamstack deploy providers. For most cases, the changes are automatic.

It is recommended that projects deploying to Netlify should update netlify.toml:

[[redirects]]
   from = "/*"
-  to = "/index.html"
+  to = "/200.html"
   status = 200
 `

4. Nhost Auth: Upgrade to v2

PR #4770 updates Nhost Auth provider to use Nhost v2.

Existing projects using Nhost need to use the new Nhost SDK. Make the following changes to Auth.ts|js:

- import { createClient } from 'nhost-js-sdk'
+ import { NhostClient } from '@nhost/nhost-js'

- const nhostClient = createClient({
-  baseUrl: 'url'
+ const nhostClient = new NhostClient({
+  backendUrl: 'url' 
})

5. dbAuth: Set Secure Cookie Attribute in Config Template

If you’re using dbAuth with the new cookie config that we added to api/src/functions/auth.js in the last release, you’ll need to make a change if you use Safari as your dev browser, or if you access your dev server at a host other than localhost (you may have noticed that you can’t stay logged in).

Change the Secure config to this:

cookie: {
  HttpOnly: true,
  Path: '/',
  SameSite: 'Strict',
- Secure: true,
+ Secure: process.env.NODE_ENV !== 'development' ? true : false,
},

This will set the cookie to not secure when in a development environment, but otherwise true everywhere else (like in production). Chrome has an exception that you can set a secure cookie over HTTP, but only if the domain is localhost. Safari does not have this exception!

6. Deploy Redwood Record on Netlify (experimental)

See #4618

Redwood Record datamodel file
In order to fix the Netlify deploy when using Redwood Record the datamodel.json generated by running yarn rw record init was moved and will now be tracked under git.

How to Update
If you are using the RedwoodRecord lib the only thing you have to do is run yarn rw record init again and you’ll be good to go.

Upgrade Packages from v1.0.0-rc.6 to v1.0.0-rc.final.1

Run the following command within your App’s directory:

yarn redwood upgrade --tag rc

The --tag rc option targets the most recent “release candidate” published to NPM

:white_check_mark: Don’t forget to git commit your updated yarn.lock file

Upgrading from an earlier version?

Please follow the “how to upgrade” sections for each newer version here :point_right: Releases · redwoodjs/redwood · GitHub, as there may be manual code mods needed for each version.

Upgrading to a version that is not the latest?

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.44.0 to v0.45.0, run the following command:

yarn redwood upgrade --tag 0.45.0

Need help or having trouble upgrading packages?

See this forum topic for manual upgrade instructions and general upgrade help.

6 Likes