Redwood v0.38 🚀

Current release is v0.38.3

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

This is an amazing release crafted by an amazing community of contributors. Along with great new features, this release fixes many bugs and improves stability and performance across the project. You’ll need to make a few code modifications to upgrade, but our automated code mods and detailed guide will make it all silky smooth. So what are you waiting for? Just dive on in :rocket:

v0.38 Highlights :tada:

:microscope:Service Validations

This new feature (modeled after Rails validations) adds functions for validating data in services before passing the calls to your DB. We know to Never Trust the Client, so Service Validations provides a declarative way to perform a server-side check for the same validations you (hopefully) have in the front-end to avoid a round trip to the server just to find out your input is badly formatted.

This provides a nice way to see the requirements for your data right next to where it’s actually being sent to your data store. Less hunting through schema.prisma or an SDL file to see what formatting requirements your data has. They’re just a collection of functions that happen to make Prisma create/update/delete calls.

:round_pushpin:Improved API Path Configuration

Customizing your project’s API endpoints is now a snap with the addition of several configuration options plus enhanced flexibility. Want to use GraphCDN with Redwood or deploy on Fly.io? Or just get fancy with your API domain? Now you can! To learn more, see the configuration options and examples:

:closed_lock_with_key: dbAuth adds Forgot/Reset Password

This release adds Forgot/Reset Password functionality to dbAuth! You get two new generated pages at /forgot-password and /reset-password, which handle all of the UI for you. You can also build your own, getting the needed functions from useAuth() just as you would for logIn, signUp or logOut. If you do plan to build your own, the fastest way to get up to speed would be to generate these two pages and read through the code, then translate that to your own versions of those pages.

:atom_symbol: Node.js 16 Support

Node.js v16.13.0, codename ‘Gallium’, has transitioned to Long Term Support (LTS). And Redwood now fully supports v16! To use it, you’ll need to make a small change to your project’s package.json. Check out the “Code Modification” section to learn how.

Changelog

Unique contributors: 19
PRs merged: 55

Added

Changed

  • Prisma 3 Upgrade and seeding refactor #3507 #3603 by @dthyresson :tada:
    • Release Notes: v3.0.1, v3.0.2, v3.1.1, v3.2.0, v3.2.1, v.3.3.0
    • Highlights: revamped prisma db seed, Node-API is GA, improved MongoDB support, and Prisma Data Proxy in Early Access (now with support for Cloudflare Workers)
    • BREAKING: Named Constraints, Referential Actions, $queryRaw API changes, Changes to how you query Null values on JSON fields, Renamed Aggregate Fields
  • Upgrades Redwood Logger to Pino version 7 #3588 by @simoncrypta
  • Improved yarn rw console by adding persistent history #3221 by @corbt
  • Bump @apollo/client from 3.3.21 to 3.4.15 #3440 by @dependabot
  • Provide logger option to filter certain operations #3454 by @callingmedic911
  • Add type to type-only import aws-lambda #3498 by @jtoar
  • Router: Handle falsy params #3500 by @Tobbe
  • Renames GraphQL Healthcheck Path #3502 by @dthyresson
  • Pluralization: Avoid double negation #3535 by @Tobbe
  • Pokemon 2 - The return of the Pokemons #3536 by @Tobbe
  • Handle models with plural names #3543 by @Tobbe
  • remove deprecated ESBuild as a Web build option #3541 by @7shantanu7
  • Improve the positioning of the scenario comments in the generated function test #3552 by @orta
  • Redwood TypeChecker now runs for web and api simultaneously #3553 by @aggmoulik
  • Removes beforeResolver from api and graphql-server packages #3593 by @dthyresson
  • remove ‘() => null’ fallback for client argument to AuthProvider constructor #3597 by @doesnotexist
  • sdl generators: improve test coverage #3598 by @Tobbe
  • comment data in seed.js template #3630 by @thedavidprice
  • Supports setting a customized masked error message in GraphQL #3604 by @dthyresson
  • Change from FirebaseAuth to FirebaseClient for SupportAuthClients union type #3614 by @doesnotexist

Fixed

Chore

Breaking :warning:

1. Prisma v3: New db seed command

Prisma rewrote db seed, which means the previous command implementation was deprecated and replaced. It’s now been nicely integrated with Redwood, but you’ll need to go through a few steps. Just follow the upgrade instructions in the “Code Modifications” section below. #3507

2. beforeResolvers are Fully Deprecated

Redwood v0.37 introduced GraphQL Directives, which replaced beforeResolver functionality. #3593

3. Replace apiProxyPath config with apiUrl and two other config options

Your Redwood app’s API paths are now fully customizable, and apiProxyPath has been fully deprecated. To upgrade, there’s a simple name change you’ll need to make. See the “Code Modifications” section below. #2822

4. dbAuth: Adds Forgot/Reset Password functionality

The new features for dbAuth are a breaking change for some projects. If you have been using dbAuth since pre-0.37.0 there are a couple of steps to get Forgot/Reset Password added to your app. Follow the upgrade instructions in the “Code Modifications” section below. #3429

How to Upgrade

:compass: Code Modifications: Follow the v0.38 Upgrade Guide

The SuperOfficial™ upgrade guide will walk you through everything required to get up and running on v0.38. We’ve posted it on the Redwood Forums — be sure to ask questions as needed and let us know how it goes:

Here’s a list of the upgrade steps included:

  1. Improved Scaffold Styles
  2. Node.js v16
  3. redwood.toml: remove apiProxyPath and replace it with apiUrl
  4. Migrate to the new Prisma db seed
  5. dbAuth: add Forgot/Reset Password
  6. Magic.link: API token validation and decoding

Once you’re done, don’t forget to upgrade your packages!

Upgrade Packages from v0.37.x to v0.38.x

Run the following command within your App’s directory:

yarn redwood upgrade

:sparkles: New Step :sparkles: Yarn Dedupe and Install

Sometimes packages don’t get resolved correctly in yarn.lock. To make sure you project has a “healthy” lock file, run the following commands:

npx yarn-deduplicate
yarn install

This will fix any potential issues (if any) in your project’s yarn.lock :white_check_mark:and then install any necessary upgrades.

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

yarn redwood upgrade --tag 0.35.0

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

7 Likes

Patch Release v0.38.1

This release fixes the following issues:

  • Fix styling of logo on splash page after tailwind setup #3696 by @memarino92
  • dbAuth: Resolved typos and inconsistencies in templates #3698 by @realStandal
  • Fixes UserInputError mesage display in FormError #3704 by @dthyresson
  • Prerender: Base64 encode smaller required images during prerender #3705 by @dac09
  • Auth: Fixes syntax error Firebase Auth template initializeApp #3709 by @dthyresson
  • Tests: have Redwood figure out in what order tables need to be cleared during scenario teardown #3716 by @cannikin

Patch Release v0.38.2

This release fixes the following issue:

  • Scenario teardown needs to catch different error codes from Postgres and MySQL #3724 by @cannikin

Patch Release v0.38.3

This release fixes the following issue:

  • On scenario teardown, change table quote style based on provider #3738 by @cannikin