npm @redwoodjs/core 0.24.0
v0.24.0

latest releases: 9.0.0-canary.239, 9.0.0-canary.237, 9.0.0-canary.236...
3 years ago

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 🎉

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 ⚠️🎉
  • 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 ⚠️

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

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

Don't miss a new core release

NewReleases is sending notifications on new releases.