Current release is
v0.38.3
This release has breaking changes. Please see the âBreakingâ section for more info.
This is an amazing release crafted by an amazing community of contributors. Along with great new features, this release fixes many bugs and improves stability and performance across the project. Youâll need to make a few code modifications to upgrade, but our automated code mods and detailed guide will make it all silky smooth. So what are you waiting for? Just dive on in
v0.38 Highlights
Service Validations
This new feature (modeled after Rails validations) adds functions for validating data in services before passing the calls to your DB. We know to Never Trust the Client, so Service Validations provides a declarative way to perform a server-side check for the same validations you (hopefully) have in the front-end to avoid a round trip to the server just to find out your input is badly formatted.
This provides a nice way to see the requirements for your data right next to where itâs actually being sent to your data store. Less hunting through schema.prisma or an SDL file to see what formatting requirements your data has. Theyâre just a collection of functions that happen to make Prisma create/update/delete calls.
- For a full overview, see the detailed PR#3532 introduction
- To start implementing, check out the Redwood Docs
Improved API Path Configuration
Customizing your projectâs API endpoints is now a snap with the addition of several configuration options plus enhanced flexibility. Want to use GraphCDN with Redwood or deploy on Fly.io? Or just get fancy with your API domain? Now you can! To learn more, see the configuration options and examples:
dbAuth adds Forgot/Reset Password
This release adds Forgot/Reset Password functionality to dbAuth! You get two new generated pages at /forgot-password
and /reset-password
, which handle all of the UI for you. You can also build your own, getting the needed functions from useAuth()
just as you would for logIn
, signUp
or logOut
. If you do plan to build your own, the fastest way to get up to speed would be to generate these two pages and read through the code, then translate that to your own versions of those pages.
- For a full overview and getting started, see the detailed PR#3429 introduction
- Read the Auth Docs
Node.js 16 Support
Node.js v16.13.0, codename âGalliumâ, has transitioned to Long Term Support (LTS). And Redwood now fully supports v16! To use it, youâll need to make a small change to your projectâs package.json
. Check out the âCode Modificationâ section to learn how.
Changelog
Unique contributors: 19
PRs merged: 55
Added
- Service Validations #3532 by @cannikin
- Add
apiUrl
andapiGraphQLServerPath
to redwood.toml. #2822 by @peterp @dthyresson @dac09 - Adds Forgot/Reset Password functionality to dbAuth #3429 by @cannikin
- Glob routing #3533 by @macovedj
- can now use
path="/path/{filePath...}/end"
. See the Redwood Router Doc
- can now use
- MagicLink: api side token validation and decoding #3432 by @doesnotexist
- Add TextDecoder as jest global #3611 by @jtoar
- add customToken authentication to firebase auth client #3613 by @doesnotexist
Changed
- Prisma 3 Upgrade and seeding refactor #3507 #3603 by @dthyresson
- Release Notes: v3.0.1, v3.0.2, v3.1.1, v3.2.0, v3.2.1, v.3.3.0
- Highlights: revamped
prisma db seed
, Node-API is GA, improved MongoDB support, and Prisma Data Proxy in Early Access (now with support for Cloudflare Workers) - BREAKING: Named Constraints, Referential Actions, $queryRaw API changes, Changes to how you query Null values on JSON fields, Renamed Aggregate Fields
- Upgrades Redwood Logger to Pino version 7 #3588 by @simoncrypta
- Improved
yarn rw console
by adding persistent history #3221 by @corbt - Bump @apollo/client from 3.3.21 to 3.4.15 #3440 by @dependabot
- Provide logger option to filter certain operations #3454 by @callingmedic911
- Add type to type-only import aws-lambda #3498 by @jtoar
- Router: Handle falsy params #3500 by @Tobbe
- Renames GraphQL Healthcheck Path #3502 by @dthyresson
- Pluralization: Avoid double negation #3535 by @Tobbe
- Pokemon 2 - The return of the Pokemons #3536 by @Tobbe
- Handle models with plural names #3543 by @Tobbe
- remove deprecated ESBuild as a Web build option #3541 by @7shantanu7
- Improve the positioning of the scenario comments in the generated function test #3552 by @orta
- Redwood TypeChecker now runs for web and api simultaneously #3553 by @aggmoulik
- Removes beforeResolver from api and graphql-server packages #3593 by @dthyresson
- remove â() => nullâ fallback for client argument to AuthProvider constructor #3597 by @doesnotexist
- sdl generators: improve test coverage #3598 by @Tobbe
- comment data in seed.js template #3630 by @thedavidprice
- Supports setting a customized masked error message in GraphQL #3604 by @dthyresson
- Change from FirebaseAuth to FirebaseClient for SupportAuthClients union type #3614 by @doesnotexist
Fixed
- Pass through GraphQL operation variable type #3497 by @callingmedic911
- fix: check no âERR!â string is in stderr when running Storybook build #3509 by @virtuoushub
- force removal of @webpack-cli/serve@1.6.0 from yarn.lock #3530 by @thedavidprice
- Minor typo fix in dbAuth.auth.js.template #3548 by @orta
- Adding missing object properties to honour object type in router test #3545 by @facinick
- Fixes lint errors on router test #3592 by @dac09
- Fix comments and template for firebase Auth #3615 by @doesnotexist
- Fix netlify deploy: Cleans up dependencies for rwjs/api and rwjs/graphql #3629 by @dac09
- Fixed input border issue #3591 by @SarveshLimaye
- duplicate scaffold import #3620 by @thedavidprice
Chore
- Misc dependency upgrades v0.38 #3625 @thedavidprice
- Upgrade Framework to Yarn v3 #3154 by @thedavidprice
- add Node v16 to CI matrix and template package.json engine #3437 by @thedavidprice
- test(e2e): add
stderr
check to Storybook build #3508 by @virtuoushub - Run netlify-build on release edit event #3510 by @callingmedic911
- move babel plugins from core package to internal #3518 by @peterp @thedavidprice
- ignore VS Codeâs
.code-workspace
so that personal settings used by devs are not committed to the codebase #3526 by @virtuoushub - update README to emphasize framework for both serverless and traditional #3556 by @thedavidprice
- Add automation to projects beta #3557 by @jtoar
- Add e2e script shortcut #3565 by @simoncrypta
- Add yarn constraint preventing carets in dependency ranges #3571 by @jtoar
- replace router README with contributors template #3606 by @thedavidprice
- packages/cli: Spelling and naming fixes topic/cli #3633 by @Tobbe
- Add codemods for the v0.38 release #3634 by @jtoar
- Fix typo in apiProxyPath codemod #3636 by @jtoar
- v0.38.x codemods update #3637 by @dac09
- List codemods in kebab-case #3639 by @dac09
Breaking
1. Prisma v3: New db seed
command
Prisma rewrote db seed, which means the previous command implementation was deprecated and replaced. Itâs now been nicely integrated with Redwood, but youâll need to go through a few steps. Just follow the upgrade instructions in the âCode Modificationsâ section below. #3507
2. beforeResolvers
are Fully Deprecated
Redwood v0.37 introduced GraphQL Directives, which replaced beforeResolver
functionality. #3593
3. Replace apiProxyPath
config with apiUrl
and two other config options
Your Redwood appâs API paths are now fully customizable, and apiProxyPath
has been fully deprecated. To upgrade, thereâs a simple name change youâll need to make. See the âCode Modificationsâ section below. #2822
- Config Doc for all the new API Path options
4. dbAuth: Adds Forgot/Reset Password functionality
The new features for dbAuth are a breaking change for some projects. If you have been using dbAuth since pre-0.37.0 there are a couple of steps to get Forgot/Reset Password added to your app. Follow the upgrade instructions in the âCode Modificationsâ section below. #3429
How to Upgrade
Code Modifications: Follow the v0.38 Upgrade Guide
The SuperOfficial⢠upgrade guide will walk you through everything required to get up and running on v0.38. 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:
- Improved Scaffold Styles
- Node.js v16
redwood.toml
: removeapiProxyPath
and replace it withapiUrl
- Migrate to the new Prisma
db seed
- dbAuth: add Forgot/Reset Password
- Magic.link: API token validation and decoding
Once youâre done, donât forget to upgrade your packages!
Upgrade Packages from v0.37.x to v0.38.x
Run the following command within your Appâs directory:
yarn redwood upgrade
New Step Yarn Dedupe and Install
Sometimes packages donât get resolved correctly in yarn.lock
. To make sure you project has a âhealthyâ lock file, run the following commands:
npx yarn-deduplicate
yarn install
This will fix any potential issues (if any) in your projectâs yarn.lock
and then install any necessary upgrades.
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 Releases ¡ redwoodjs/redwood ¡ GitHub, 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.
Redwood Releases on GitHub
You can see all Redwood release notes and version history on GitHub