RedwoodJS v0.22 🚀

Happy New Year :partying_face: And what an exciting year it’s going to be for Redwood. Things are kicking off with a :rocket:

:point_right: Join us for the upcoming RedwoodJS Meetup on Thursday, January 14th. We’re going to be talking about plans for the upcoming v1, all the shiny new things in this release, and have a demo of a new production Redwood app.

:point_right: Help us improve the upcoming Redwood Tutorial Pt 2. In preparation for the v1 release, we’re again using Tutorial-Driving-Development to guide the way. We need your help trying it out before it’s published.

And now on to the amazing work included in this release thanks to the amazing, collaborative community of people listed below.

v0.22 Highlights

Note: Current stable release is v0.22.1

Azure AD Authentication Provider

That’s right, Azure AD is supported out of the box thanks to @jeliasson.

New Test Scenarios

Testing with mock data just got a whole lot easier thanks to @cannikin The new Scenarios are data that is pre-set into the database at the start of your test and removed afterward.

  • Read the full explanation and how to use in #1465
  • And keep a lookout for the deep-dive in the upcoming Tutorial Pt 2

Bring your own GraphQL Client Library

Redwood ships with Appollo GraphQL Client, but we recognize that’s not necessarily the right choice for every project. Thanks to @peterp, you can now swap out for the tool of your choice!

Changed

  • CLI: update diagnostics to display a success message when no errors or warnings are encountered #1405 by @M0nica
  • CLI: Update Setup TailwindCSS to v2 using PostCSS v7 compatible install #1540 by @jtoar
  • CLI: Tailwind setup use fs.renameSync instead of mv #1579 by @Tobbe
  • GraphQL: Allow users to “bring your own” GraphQL Library #1498 by @peterp :tada:
  • Forms: Improve typings for errors #1510 by @Tobbe
  • UI: Only stop rendering on Private routes #1519 by @peterp
  • Webpack: Make webpack load .mjs extensions #1528 by @peterp
  • Auth: upgrade to Supabase 1.0; supabase@1.1.1 with cleaner imports #1536 #1564 by @Tobbe
    • this is a breaking change for projects currently using Supabase. See “Breaking Changes” section below.
  • MSW: Explicit target environment for MSW #1574 by @peterp
  • Docs: Contributors consolidate Core Team with Roles and update with new contributors #1541 by @thedavidprice
  • Docs: Clarify CONTRIBUTING.md #1580 by @jtoar
  • Prisma: Upgrade Prisma v2.12.1 #1604 by @thedavidprice
    • Release Notes for v2.12.0 and v2.12.1
    • Standalone Prisma Studio app for macOS
    • Prisma codemods help upgrading your codebase
    • Microsoft SQL Server now supports native database types (Preview)
    • BREAKING: Remove non-$ methods
    • BREAKING: 1-1-relations must now have an optional side
    • BREAKING: Fix how data for Json fields is stored
    • DEPRECATION: Rename findOne to findUnique
    • DEPRECATION: Move most types under the Prisma namespace

Added

Fixes

  • Lint: Orderliness and break avoiding lint rules, package.json flags #1381 by @Krisztiaan
  • Lint: Fix jest-dom lint errors #1575 by @peterp
  • Lint: Fixed a few eslint warnings #1582 by @Tobbe
  • Storybook: Fixes Storybook/Webpack Out of Memory Error by using relative path to config stories location #1509 by @dthyresson
  • Auth: Fix FetchConfigProvider to reprise handling no auth #1515 by @jtoar
  • Auth: Supabase getToken uses session to get access_token so that graphql calls are authenticated #1539 by @dthyresson
  • GraphQL: Fix renamed export QueryHooksProvider to GraphQLHooksProvider #1520 by @peterp
  • Router: Include queryParams in redirectTo #1526 by @dac09
  • Deploy: Fix aws_serverless config when api folder missing #1553 by @bennettrogers
  • Babel: Make glob import dir ignore .scenarios. files. #1607 by @peterp

Breaking :warning:

For projects using Supabase Auth

  1. This release upgrades to Supabase v1, which requires a new env var SUPABASE_JWT_SECRET:

  2. Additionally, the Supabase token is now decoded whereas before it was returned undecoded.

Prisma custom implementations

This version uses Prisma v2.12, which includes the following breaking changes affecting some projects with related custom implementation:

  • Remove non-$ methods
  • 1-1-relations must now have an optional side
  • Fix how data for Json fields is stored

If your project is affected, you’ll need to review the Prisma v2.12 Release Notes.

Note: Prisma now includes a code mode command, which will help fix any issue. See the release notes for more info. General example:

cd my-app

npm install @prisma/cli @prisma/client
npx @prisma/codemods update-2.12 ./

How to upgrade RedwoodJS to the latest v0.22

: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.

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

FYI - I almost thought this applied to a few of my apps, but I believe that this issue only applies if you are using an array of JSON (Json[] in your schema) – not just Json.

And that is not terribly common, I expect.

1 Like

FYI: Possible Prisma bug with write EPIPE error See: