Come join us at the next RedwoodJS Meetup on Thursday, February 11th!
- 👉 See this Forum post for details and free registration.
This release contains Breaking Changes. See the "Breaking" section for more information.
v0.24.0 Highlights 🎉
Ethereum Auth Provider
Thanks to @pi0neerpat, you can now use Ethereum as an Auth provider in your Redwood App!
- Redwood Auth Doc
- Instructions and Package for API Setup
- Ethereum Auth Tutorial (note: this tutorial is also a great reference for anyone who wants to explore creating their own custom auth)
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 ⚠️🎉
- CLI: Move deploy and auth from generate to setup #1685 by @dac09
- this deprecates
rw g auth
,rw g deploy
, andrw g util
in favor ofrw setup [auth | deploy | etc]
- this deprecates
- 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
- Auth: Add Auth Provider - Ethereum #1594 by @pi0neerpat 🎉
- Auth: Support Supabase OAuth and Magic Link auth #1669 by @dthyresson
- TS: Make auto-import pages support .tsx files #1651 by @peterp
- Internal: Task script to update all packages #1662 by @peterp
- Doc: Update Contributing.md with all steps for Release Process #1686 by @thedavidprice
Fixes
- Auth: Fix/use fresh tokens #1627 by @dac09 ⚠️
- Auth: Verify supabase, netlify and goTrue auth tokens in prod #1653 by @Tobbe
- Auth: Azure Active Directory refresh access token #1675 by @jeliasson
- Auth: Netlify decoder specifically check for dev and test #1654 by @Tobbe
- CLI: tailwind setup use fully specified paths #1648 by @Tobbe
- CLI: Fixes scaffolded test template #1690 by @cannikin
- Prisma: GQL Playground: Only run in dev mode #1655 by @Tobbe
- Storybook: Small Storybook webpack fix #1656 by @pi0neerpat
- Structure: Fix cell comment #1657 by @Tobbe
- Internal: Ignore linting template folder in create-redwood-app #1674 by @dac09
- Internal: Add build:js script for CRWA #1678 by @peterp
- Internal: Remove package.json exports and use a subfolder hack instead #1679 by @peterp
- Internal: redwood-tools ignore crwa template #1680 by @Tobbe
- Internal: Make test-tutorial use template directory & fix azure imports #1684 by @peterp
- Internal: Update and fix package builds to match lerna build #1687 by @thedavidprice
- Internal: Add missing env changes to template #1699 by @thedavidprice
- Internal: Fix dependencies #1696 by @peterp
- Doc: Fix typo in Private Routes #1698 by @morganmspencer
Breaking ⚠️
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.
- Related PR #1627
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
👉 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
:
- Remove
<RedwoodProvider>
and import<RedwoodApolloProvider>
separately:
// index.js
...
import { FatalErrorBoundary } from '@redwoodjs/web'
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
...
- Replace
<RedwoodProvider>
with<RedwoodApolloProvider>
inindex.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.