v0.15.0
This release comes jam-packed with new features, improvements, and fixes. It's hard to believe it's only been 9 days since our previous release. None of this would be possible without the amazing Redwood Community that continues to grow and support each other and this project. To everyone who helped out on the forums, created an issue, opened a PR, or improved documentation, thank you π
v0.15.0 Highlights
- Data Migrations: 'cause everybody needs to move data around sometimes π
- Documentation
- CLI Command
- Note: code modification are required to use this feature. See "How to upgrade" section below.
- Prisma Dynamic Provider Syntax π
- all your DBs, all in one syntax
- fully backwards compatible
- if you want to use the new syntax, first read this, then remove the Netlify plugin from
netlify.toml
- GraphQL Mocks working with Jest π
- this advances an integrated DX for Jest across both Web and API (using magic)
- documentation
Changed
- DB: upgrade Prisma v2.3.0 #841
- Router: convert LocationProvider to function component and add cleanup effects #836 @Terris
- Dev-server: wildcard match lambda functions #848 @Tobbe
- API: Lambda function list with no comma #850 @Tobbe
- Forms: ignore coercion for unsupported form fields #874 @betocmn
- Auth: redirectTo a url on login after authenticated #876 @dthyresson
- Tests: Remove warnings about "act" in router tests #885
- Forms: Create @redwoodjs/forms #886 #903
- CLI: after create redwood-app prompt to join #889 @dthyresson
- Project: Improve Language Server #899 @aldonline
Added
- DB: data migrations #852
- Tests: Add graphQL mocks to jest #894
- API: add a way to mock data in Storybook and Jest #856
- Tests: add Router tests #858 @Terris
- Config: Add .idea/ dir for Jetbrains IDE's config to .gitignore #863 @biphobe
- Config: add global declarations for automatically imported functions #884
- Apollo Client: export useLazyQuery/useSubscription from @apollo #865 @biphobe
- CLI: Add
yarn rw dev
option to pass any Webpack config as a string #904
Fixed
- Generators: fix sdl generator to support Json type #824 @redstab
- Dev-server: Bump kill-port #862 @Tobbe
- Tests: fix test db path on Windows #869 @Tobbe
- Auth: small Firebase scaffolding fixes. #873 @janimo
- Auth: isAuthenticated should be false when getCurrentUser fails #878
- API: Stringify function body prevents Netlify 502 error #877 @dthyresson
- API: Cell Operation Names not PascalCased #888 @dthyresson
- Config: Set cwd for generator babel transforms #879
- Tests: fix jest module alias resolution #906
Breaking β οΈ
Nothing to see here! π
How to upgrade RedwoodJS to v0.15.0
π 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
-
To support
dataMigrations
during deploy, the following code modifications are required to the files.env.defaults
,schema.prisma
, andnetlify.toml
:- Set Prisma binaryTargets to be "native". Edit the files
.env.defaults
andapi/prisma/schema.prisma
with changes via this commit - Add the
dataMigrate up
command to Netlify deploy build by editing the filenetlify.toml
with changes via this commit
- Set Prisma binaryTargets to be "native". Edit the files
-
Update
.env.defaults
to silence the Prisma "update available" notifier ('cause we don't actually want you to do that)- See Env Var addition via this commit.
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
Upgrade Tip: for this upgrade, you might have some issues with the old generated Prisma Client saved in
node_modules
. You can remove thenode_modules
directory and/or tryyarn install --force
. And you'll need to regenerate the Prisma Client withyarn rw db up
.
To run the upgrade
command, your project must be using v0.6.0 or greater. See this forum topic for manual upgrade instructions and general upgrade help.