Releases: redwoodjs/redwood
v0.7.0-rc.3
v0.7.0-rc.3
v0.7.0-rc.2
v0.7.0-rc.2
v0.7.0-rc.1
v0.7.0-rc.1
v0.6.0
Along with bug fixes, ENV var support, Router enhancements, and improved TypeScript support, this release introduces a new workflow with CLI tools for contributing to the RedwoodJS Framework. For more information, please read CONTRIBUTING.md 🤩
Changed
- Prisma: upgrade to Prisma-2.0.0-beta.3 #457
- Config: Only use redwood-eslint-plugin when in a redwood project #443
- Framework: build core packages and reference them correctly #456
- TypeScript: Let api-dev-server and webpack load .ts and .tsx files #438
Added
- CLI: Add workflow tools for local development #429 #442
- Config: support ENV vars in webpack projects #430 @snormore
- write tests and docs for environmental variables #444
- Router: add useMatch for crafting stateful links #416 @RobertBroersma
- TypeScript: Setup TS Project References #359 @mohsen1
- CLI: add 'yarn rw upgrade' helper to upgrade
@redwoodjs
packages #436
Fixed
- Router: fixes
validatePath
duplicate params & reject spaces in routes #420 @olance - Deploy: add process.exit(1) to ensure Netlify build fails on error #447
- CLI: fixes mutation constant names in generated code #458
- Docs: fix link markup #459 @benmccann
Breaking ⚠️
Breaking changes only apply to Apps upgrading from previous versions.
Prisma-2.0.0-beta.3 has two major changes that may affect some applications upgrading from previous Redwood versions.
- Enums are now disallowed for SQLite
- Required 1-1 self relations are forbidden now
Release notes are available here.
How to upgrade RedwoodJS packages to v0.6.0
Redwood v0.6.0 includes a new CLI command to upgrade
@redwoodjs
NPM packages. However, you must first upgrade to v0.6.0 to useyarn rw upgrade
Update your @redwoodjs/*
packages.
Four packages should be updated to v0.6.0
Root directory package.json
"@redwoodjs/core": "^0.6.0”
web/package.json
"@redwoodjs/web": "^0.6.0”
"@redwoodjs/router": "^0.6.0”
api/package.json
"@redwoodjs/api": "^0.6.0”
After updating and saving the files, install the packages from the root directory:
$ yarn install
v0.6.0-rc.2
v0.6.0-rc.2
v0.6.0-rc.1
v0.6.0-rc.1
v0.5.0
This release includes Prisma-2.0.0-beta.2, which is a big update that has many improvements, bug fixes, and new features. 🚀Prisma introduced a new relation syntax and support, which allows for complex relationships within `schema.prisma' models. RedwoodJS has improved its generators to support many model relations' use-cases. However, there are generator support limitations, which you can read about here on our community Forum. 👈
Additionally, Redwood now has a Netlify Plugin to set the DB provider during deployment. See the section below "Using the New Netlify Provider Plugin" for more information.
Changed
- 🎉Update Prisma to 2.0.0-Beta.2 (see release notes for Beta.2 and Beta.1)
- change Prisma CLI command usage to
prisma
fromprisma2
- introduces new relation syntax and support for
@relation
. See the documentation here.
- change Prisma CLI command usage to
- Improve create-redwood-app release fetching #397 @satyarohith
- Misc documentation improvements #396 #406 #393 #422 @jtoar @petukhov @nhristov @cball
- Use URLSearchParams for parsing search params #357 @mohsen1
- Update GraphQL SDL "Required Types" logic #432
Added
- Netlify plugin to handle 'provider' as an env var during Netlify build. See CRA release v0.4.0-plugin
- CLI generator tests #401
- Export useApolloClient for one-off queries #413 @RobertBroersma
- CLI command
yarn rw db introspect
#385 @Jaikant - Support table relationships in service generators #412
Fixed
- Router rendering bug #380
- Windows support for redwoodjs/redwood build scripts #363
- Windows support for create-redwood-app build scripts #410
- Redwood Router: fix route matching by enforcing type constraints #353 @olance
- Redwood Forms: fix setState warning from setError call #411 @dominicchapman
Breaking ⚠️
This breaking change only applies to Apps upgrading from previous versions.
Migration files from previous Prisma versions are incompatible with prisma-2.0.0-beta.2
. This means new local and deploy migrations will likely fail for Apps upgrading. Workaround:
- Remove the migration directory and files (delete
api/prisma/migrations
directory) and then re-create usingyarn rw db save
- If that doesn't resolve the issue, then delete the contents of the deployed DB
_Migration
table (if applicable)
Using the New Netlify Provider Plugin (optional)
These steps only apply to Apps upgrading from previous versions. New Apps already include these changes.
Redwood apps running any version can use the Netlify Provider plugin, which eliminates workarounds required to use ’SQLite’ for local development and ‘PostgreSQL’ (or other DBs) for production deployment.
If you are using PostgreSQL in production, follow the steps below.
If you need to customize your DB provider (to use MySQL, for example), refer to documentation for 'netlify-plugin-prisma-provider’. Changing the provider is as simple as adding a new environment variable in Netlify.
Add the plugin package to your App
Redwood uses yarn workspaces. Run this command to add the package to the root package.json
.
yarn add -W netlify-plugin-prisma-provider
Update Netlify deployment settings
Add the following configuration to your App’s netlify.toml
:
[[plugins]]
package = 'netlify-plugin-prisma-provider'
[plugins.inputs]
path = 'api/prisma/schema.prisma'
How to upgrade RedwoodJS packages to v0.5.0
Update your @redwoodjs/*
packages.
Four packages should be updated to v0.5.0
Root directory package.json
"@redwoodjs/core": "^0.5.0”
web/package.json
"@redwoodjs/web": "^0.5.0”
"@redwoodjs/router": "^0.5.0”
api/package.json
"@redwoodjs/api": "^0.5.0”
After updating and saving the files, install the packages from the root directory:
$ yarn install
v0.4.0
Changed
- Upgraded Prisma2 to preview025 #350
⚠️ Prisma introduced a new relation syntax, which is not compatible with previous migration files. If you have a deployed app and need to migrate DB changes, see this Issue providing a workaround.
- Context handlers accept an asynchronous function #348 @RobertBroersma
- Upgrade package dependencies including Babel 7.9, React Hook Form v5, and Prettier v2 #349
- Forward refs to anchors in Links #356 @RobertBroersma
Added
- Support for graphql directives! #347 @RobertBroersma
- Format generated templates using the local
prettier.config.js
#351 @satyarohith - Docs for webpack config #354 @maximgeerinck
Fixed
- Fixed a problem with the Router where it would try to render a
Page
without the correct params. #380
How to upgrade to v0.4.0*
Update your @redwoodjs/*
packages.
Four packages should be updated to v0.4.0
Root directory package.json
"@redwoodjs/core": "^0.4.0”
web/package.json
"@redwoodjs/web": "^0.4.0”
"@redwoodjs/router": "^0.4.0”
api/package.json
"@redwoodjs/api": "^0.4.0”
After updating and saving the files, install the packages from the root directory:
$ yarn install
v0.3.2
db
automatically (#334). See "How to upgrade to v0.3.2" for more information.
Changed
- Do not import
db
automatically. #334
Added
- new command
yarn rw info
to get system environment #329 create redwood-app
can be instantiated in an empty directory #315 @olance- Prisma is updated to preview24 #303
- Added a way to change the webpack configuration #312 @Idered
Fixed
- Fix Netlify deploy issue with
src
path #338 - Fix scaffold and sdl generator `Routes.js’ insertion order #336
- Fix
yarn rw test
#290 - Change the way that routes are matched so that it works in Firefox #308
- Fix ‘yarn rw help’ issue with output on Windows #331
👉 How to upgrade to v0.3.2
(1 of 3) Create a new folder and file api/src/lib/db.js
This adds a way to instantiate the database.
- create
api/src/lib/db.js
file - copy and paste the following into
db.js
// See https://github.com/prisma/prisma2/blob/master/docs/prisma-client-js/api.md#constructor
// for options.
import { PrismaClient } from '@prisma/client'
export const db = new PrismaClient()
(2 of 3) Manually update Files
First, add an import and update the export in your api/src/functions/graphql.js
file.
See this example of the updated template file.
- Add this line to your list of imports:
import { db } from 'src/lib/db'
- Export
db
inexport const handler = createGraphQLHandler({...})
. Add this to the end of the export afterschema: makeMergedSchema({...})
(approx. line 18):
db,
Secondly, for each Services file within api/src/services/*
, do the following:
- add this line at the top:
// api/src/services/*
import { db } from 'src/lib/db'
For example, if you completed the RedwoodJS Tutorial you would have posts.js
and contacts.js
within api/src/services/posts/
and api/src/services/contacts/
, respectively. You would add the import statement to the top of each of those files.
(3 of 3) Update your @redwoodjs/*
packages.
Four packages should be updated to v0.3.2
Root directory package.json
"@redwoodjs/core": "^0.3.2”
web/package.json
"@redwoodjs/web": "^0.3.2”
"@redwoodjs/router": "^0.3.2”
api/package.json
"@redwoodjs/api": "^0.3.2”
After updating and saving the files, install the packages from the root directory:
$ yarn install