⚠️ This release has breaking changes. Please see the "Breaking" section for more info.
This release is equivalent to
v0.39.3
🗓 RedwoodJS Meetup: December 9th
Join us for a very special RedwoodJS Meetup next Thursday! With v1.0.0-rc as the focus, there will be presentations, demos, and discussions from community members and startup founders. You won’t want to miss it!
Changelog
Unique contributors: 25
PRs merged: 78
Added
- Add Chakra UI integration #3715 by @TimKolberger
- Move api-server to fastify 🏎️ #3681 by @kibertoad @dac09 @dthyresson
- Support env var interpolation in redwood.toml #3708 by @dac09
- Create Tailwind version of scaffold.css if Tailwind installed #3644 by @cannikin
- Storybook: Add support for a custom
manager.js
#3688 by @realStandal - Allow to override
isEmpty
in Cells #3694 by @callingmedic911 - Adds experimental RedwoodRecord package #3734 by @cannikin
- MockParamsProvider for jest/storybook #3523 by @doesnotexist
- Adds warning in auth templates about the return of getCurrentUser() on the web side #3635 by @cannikin
- Add RWJS_API_URL to global #3735 by @dac09
- Add svg type definition #3768 by @jacobarriola
- Implements a wrapper for serverless functions to support requireAuth #3785 by @dthyresson
Changed
- [Breaking] Removes babel configuration from users project #3719 by @dac09
- [Breaking] Remove deprecated features #2896 by @callingmedic911
- [Breaking] Upgrade Azure Active Directory authentication from msal to @azure/msal-* #3490 #3631 by @jeliasson
- [Breaking] Upgrade Clerk Auth to v2 #3651 by @aggmoulik
- [Breaking] Upgrade ESLint from v7 to v8 #3725 by @nzdjb
- [Breaking] Rename paramType properties #3732 by @Tobbe
- [Breaking] deprecate
setup tailwind
and move into new commandsetup ui <library>
#3749 by @thedavidprice - [Breaking] Upgrade setup tailwind to v3 #3758 #3886 by @jtoar @thedavidprice
- [Breaking] Upgrade misc dependencies for v0.39.0 (including TS 4.5) #3759 by @thedavidprice
- [Breaking] Upgrade graphql v16.0.1 #3760 by @thedavidprice @dthyresson
- [Breaking] bump CRWA node engine to 14.17 #3761 by @thedavidprice
- [Breaking] Update Supabase to favor use of session over deprecated data and use ApiError in auth api responses #3771 by @dthyresson
- [Breaking] Make Cell mocks only support functions as standard mock #3778 by @dac09
- Upgrade to Prisma v3.5.0 #3757 by @thedavidprice
- Upgrade Apollo Client #3774 by @jtoar
- Use a green hue shift for the app favicon #3584 by @orta
- RedwoodApolloProvider: Make Apollo Link configurable #3658 by @jtoar
- Run dedupe at end of
rw upgrade
#3689 by @callingmedic911 - Teach named route function to handle glob routes #3702 by @mojombo
- Throw error on missing param in named route function #3714 by @mojombo
- Set Apollo's verbosity to debug and update Cell's error message #3720 by @callingmedic911
- Add errorCode as prop to Failure component #3721 by @simoncrypta
- Make Apollo Client cache resilient to changes in Auth #3746 by @jtoar
- Move default watchQuery config out of Cells #3747 by @jtoar
- Running tests no longer warn about api and graphql-server multiple jest configurations #3766 by @dthyresson
- onClick should be optional on Link #3770 by @Tobbe
- Give Cells a displayName #3769 by @jtoar
- Refactor createCell #3776 by @jtoar
Fixed
- Fix prerender if run inside
web
directory #3657 by @callingmedic911 - Capitalization inconsistency with yarn rw g page generator #3570 by @aggmoulik
- Support case-insensitive model name #3616 by @DukeManh
- Scaffold Checkbox required field #3656 by @aggmoulik
- Skip
undefined
routes in splash page #3684 by @callingmedic911 - Fix lint of all package.json #3691 by @simoncrypta
- Glob param type should not include ellipsis in extracted variable name #3699 by @mojombo
- Update Auth templates for CurrentUser types and JWT/Error imports #3713 by @dthyresson
- Fix prerender if run inside
web
directory #3657 by @callingmedic911 - Update serverless framework integration for TS compatibility #3723 by @virtuoushub
- Don't show splashPage on production #3748 by @DukeManh
- Various gql codegen fixes #3736 by @dac09
- fix yarn engine requirements in CRWA package.json #3773 by @thedavidprice
- Allow configuration of preset-react on the web side #3790 by @dac09
- Windows babel fixes for v0.39.x #3815 by @dac09
- Fix/prerender explicit page imports #3828 by @dac09
- fix(babel): Fix jest.mock module resolution #3830 by @dac09
- Uses current RW version for setup commands auth and deploy #3885 @dac09
Chore
- Add release note script #2846 by @jtoar
- Try fixing Test-project codemod execution on windows #3439 by @dac09
- Set env variables on Gitpod per terminal #3573 by @mikenikles
- Update README.md with testing details #3618 by @dac09
- Update supported node version #3645 by @jtoar
- Update contributors #3649 by @7shantanu7
- yet another batch of spelling typo squashing #3652 by @AntonioMeireles
- Update docs for codemod to make contributions easier #3653 by @dac09
- Update package.json to include the repository #3687 by @v-gjy
- createCell tests #3697 by @Tobbe
- Add CodeSee architecture diagram workflow to repository #3700 by @codesee-architecture-diagrams
- Remove Codesee integration #3717 by @mojombo
- More router tests #3718 by @mojombo
- Regenerate lock file(s) #3722 by @dac09
- Document setLogVerbosity in RedwoodApolloProvider #3745 by @jtoar
- Run jscodeshift programmatically #3754 by @callingmedic911
- Add tests for isEmpty #3763 by @callingmedic911
- Add codemods for Router paramTypes changes #3751 by @callingmedic911
- Codemod: Remove babel config #3775 by @dac09
Breaking ⚠️
1. Babel configuration changes
This release improves the internal babel configuration, resulting in a few important change for Redwood projects:
.babelrc
files are now ignored; if present, will throw an error during dev or build- the root
babel.config.js
file has been removed in favor of side-specificbabel.config.js
files (i.e.api/babel.config.js
andweb/babel.config.js
)
For reference, see #3719
See "Code Modifications" section below for upgrade instructions.
2. Rename Router paramType
properties
When specifying custom router param types there are two things you can (optionally) specify
- The regexp to use when "finding" the part of the route to use your custom type for. This is now called
match
. - A function that interprets the string in the route and then makes it into the type you want. This is now called
parse
.
For reference, view #3732 and the "Code Modifications" section below for upgrade instructions.
3. Minimum Node.js Version is v14.17
A dependency of Jest, jest-watch-typeahead
, requires Node.js ^12.22.0 || ^14.17.0 || >=16.0.0. New Redwood projects now require Node.js >=14.17. See #3761
We recommend updating your project's package.json Node.js engine to be "node": ">=14.17 <=16.x"
.
4. Cell mocks only support functions
In this version, Cell mocks no longer support exporting an object. #3778
See "Code Modifications" section below for upgrade instructions.
5. Dependency Upgrades: typescript
, eslint
, and graphql
The following packages have been upgraded to versions with breaking changes, which may affect Redwood projects with custom implementations. See the respective PRs, which include links to package release notes:
6. Deprecated Router Globals
This release fully deprecates:
__REDWOOD__API_URL
__REDWOOD__API_GRAPHQL_SERVER_PATH
__REDWOOD__API_PROXY_PATH
See "Code Modifications" section below for upgrade instructions.
7. Supabase Auth changes
This release removes the option to use data instead of the session in the Supabase auth provider. This may be a breaking change for some projects if they use the client directly. See #3771
8. Tailwindcss v3 and New Setup Command
We've made two changes to the Tailwindcss setup in this release:
- deprecated the command
redwood setup tailwind
and replaced it withredwood setup ui tailwindcss
- now setup tailwindcss at v3
See #3758
To upgrade and use Tailwindcss v3, see the section "Code Modifications" below.
9. Azure Auth: upgrade from msal
to @azure/msal-*
This PR will break current Azure Active Directory authentication implementations and will require code modifications. See #3490
Microsoft's msal
package used for Azure Active Directory authentication is deprecated in favor of @azure/msal-browser
. This new library uses the OAuth 2.0 Authorization Code Grant with PKCE instead of Implicit Flow. Previously msal's popup method was used to initialize the login process. On modern browsers, combined with corporate policies, this becomes challenging. For that reason, Redwood Azure Auth now uses redirects.
See the "Code Modifications" section below for upgrade instructions.
10. Clerk Auth v2
This release upgrades to Clerk v2, which has breaking changes. Projects using Clerk should read through the following references to make sure they update implementations accordingly:
- Clerk v2 main concepts
- Cleark v2 Release Notes
- Upgrade packages
@clerk/clerk-react
and@clerk/clerk-sdk-node
- Reference PR #3651
How to Upgrade
🧭 Code Modifications: Follow the Upgrade Guide
The guide will walk you through everything required to get up and running. Fast! 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:
- Update Babel Config (required)
- Rename Router
paramType
Properties (required if applicable) - Node.js package.json Engine (recommended)
- Update your Cell Mocks (required if applicable)
- Accessing API Paths (required if applicable)
- Upgrade Tailwindcss to v3 (recommended if applicable)
- Use Tailwindcss for Scaffolds (recommended if applicable)
- dbAuth: harden
getCurrentUser()
implementation (required if applicable) - Upgrade Azure Active Directory Auth from
msal
to@azure/msal-*
(required if applicable)
Once you're done, don't forget to upgrade your packages!
Upgrade Packages from v0.38.x to v1.0.0-rc
Run the following command within your App's directory:
yarn redwood upgrade --tag rc
The
--tag rc
option target the most recent "release candidate" published to NPM
✅ Don't forget to
git commit
your updatedyarn.lock
file
Upgrading from an earlier version?
Please follow the "how to upgrade" sections for each newer version here 👉 https://github.com/redwoodjs/redwood/releases, 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.