Redwood v0.24.0 šŸš€

Come join us at the next RedwoodJS Meetup on Thursday, February 11th!

This release contains Breaking Changes. See the ā€œBreakingā€ section for more information.

v0.24.0 Highlights :tada:

Ethereum Auth Provider

Thanks to @pi0neerpat, you can now use Ethereum as an Auth provider in your Redwood App!

Change GraphQL Client

This has been a work in progress by both @peterp and @Tobbe. Redwood still ships with first-class Apollo Client support, but as of this release, itā€™s been fully decoupled. You can use another client of your choice (or no provider if youā€™d like), and Apollo Client will not be referenced or installed.

  • For instructions, see this Blog Post by Tobbe Lundberg
  • This update is a breaking change. See the ā€œBreakingā€ section below.

Changed

  • GraphQL: Donā€™t bundle Apollo Client if the user specifies their own client #1639 by @Tobbe :warning::tada:
  • CLI: Move deploy and auth from generate to setup #1685 by @dac09
    • this deprecates rw g auth, rw g deploy, and rw g util in favor of rw setup [auth | deploy | etc]
  • Auth: Azure Active Directory updating default auth request for acquireTokenSilent #1703 by @jeliasson
  • Router: TypeScript rewrite #1666 by @Tobbe
  • Internal: Replaced merge-graphql-schemas with graphql-tools #1322 by @himankpathak
  • Internal: vendor create app template #1637 by @pepibumur
  • Internal: add codemod to e2e so web tests pass #1708 by @thedavidprice
  • Docs: Revise the CRWA package README #1668 by @thedavidprice

Added

Fixes


Breaking :warning:

This release includes a breaking change that affects all projects. There are two other items that may affect some projects.

1. Breaking: Removed and Replaced <RedwoodProvider> (affects ALL projects)

To support switching GraphQL Clients, <RedwoodProvider> has been removed and replaced with <RedwoodApolloProvider>, which imports from @redwoodjs/web/apollo.

  • See ā€œManual Code Modificationsā€ below for upgrade instructions
  • Related PR #1639

2. Deprecation Warning: Auth Tokens are now refreshed when they expire

authToken is being deprecated and will be removed in future release. Use getToken() instead.

3. Bug: Prisma intermittent write EPIPE error

There is a known API bug in Prisma v2.12 through v2.14 (v2.12 is used by Redwood in this release). This issue affects deployed projects using Serverless API and causes intermittent 502 errors with a console log message including ā€œwrite EPIPE + Cannot read property ā€˜onErrorā€™ of undefinedā€. Until Redwood is upgraded to the most recent version of Prisma with the bug fix, v2.15, you can work around the issue based on your projectā€™s needs and infrastructure. See this Redwood Forum Topic for more information.

  • This does not affect the Redwood Tutorial experience. If you see a 502 error after deployment, simply refresh the page
  • For production apps using the Prisma Dynamic Provider option (e.g. both SQLite and PostgreSQL), it is recommended you downgrade your project to Prisma v2.11. Run yarn add -W @prisma/sdk@2.11.0 @prisma/client@2.11.0 @prisma/cli@2.11.0.
  • For production apps not using Dynamic Provider, it is recommended you upgraded to Prisma v2.15, which will also require using the Prisma CLI new migrate commands (until they are supported by Redwood CLI in a future release). See this Forum Discussion Topic for an overview and instructions.
  • Related Prisma Issues #4557 and #4744

How to upgrade RedwoodJS to the latest v0.24

: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

1. Remove <RedwoodProvider> and Replace with <RedwoodApolloProvider>

See this commit for reference.

In your project, you must replace each instance of <RedwoodProvider> with <RedwoodApolloProvider>. The following example shows the steps to update index.js:

  1. Remove <RedwoodProvider> and import <RedwoodApolloProvider> separately:
// index.js 
... 
import { FatalErrorBoundary } from '@redwoodjs/web' 
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo' 
...
  1. Replace <RedwoodProvider> with <RedwoodApolloProvider> in index.js
// index.js 
... 
    <RedwoodApolloProvider> 
        <Routes />
    </RedwoodApolloProvider> 
...

Search your project for other instances of <RedwoodProvider> and follow the steps above.

Upgrade Packages

Run the following command within your Appā€™s directory:

yarn rw upgrade

Need help or having trouble upgrading? 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