Redwood is kicking off 2021 with back-to-back releases. π This version also adds the final piece of code for the launch of the Redwood Tutorial Pt 2 βΒ stay tuned!
Come join us for a RedwoodJS Meetup on Thursday, January 14! π See this Forum post for details and free registration.
v0.23.0 Highlights
1. Redwood Console
Launch your very own interactive Redwood shell with yarn rw console
- This feature is experimental and limited to DB. Docs here.
2. Fix for Redwood v0.22 web/
hoisted node_modules
issue
Redwood v0.22 experienced a strange issue with node_modules
being hoisted to the web/
directory. If you are upgrading from a v0.22 project and/or are having an issue with 'node_modulesbeing hoisted to your
web/` directory, see the "Manual Code Modifications" section below for the fix.
Changed
- Console: resolve promises in the console #1619 by @jtoar
- Generators: Replace prisma deprecated fineOne() -> findUnique() #1629 by @cannikin
- Docs: Update All-contributors and include Learn repo #1621 #1634 @thedavidprice @adithyasunil26
- Ops: update PR package Action formatting #1635 #1638 @thedavidprice @Tobbe
Added
- Tests: adds mockCurrentUser() to API-side Jest #1624 by @cannikin
- Env: Add TEST_DATABASE_URL to the default .env create-redwood-app/#123 by @jvanbaarsen
Fixes
- Tests: move whatwg-fetch from devDep to dep #1625 by @Tobbe
- Template: fix issue with web/ dependencies being hoisted to
./web
11780ed by @peterp
Breaking β οΈ
Nothing to see here π
How to upgrade RedwoodJS to the latest v0.23
π 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. Add Test DB Env Var
Projects running a database other than SQLite will need to include an env var to config a local DB for testing. Admittedly, this has not (yet) been well documented.
- Add the env var
TEST_DATABASE_URL
to your projects.env
- See this commit, which adds an example to the installation template's
.env.defaults
.
2. Downgrade "react" and "react-dom" packages in web/package.json
(if applicable)
In the Redwood v0.22
release, both "react" and "react-dom" packages were upgraded to v17
. However, this created a weird/strange/unexpected issue where packages were being hoisted from root to the web/
directory, resulting in seemingly random errors with Jest test failures and React hook errors.
- The fix --> downgrade both "react" and "react-dom" in
web/package.json
to16.13.1
- See this commit for a reference
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
Need help or having trouble upgrading? See this forum topic for manual upgrade instructions and general upgrade help.