Releases: redwoodjs/redwood
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
v0.3.1
v0.3.0
v0.2.5
Fixed
- Create-Redwood-App move ‘binaryTarge’ from
schema.prisma
to env var redwoodjs/create-redwood-app/pull/39 - skip
scaffold.css
if it already exists 325433c - Set fetchPolicy to
cache-and-network
for scaffolded list page #281
Items below include changes from v0.2.3 and v0.2.4
- Windows fix Cell regex issue #276
- Pass resolver info object to services e842179
- misc bug fixes and repo-specific CI improvements to tests and linter #247 #257 #262 #274
- return RWJS version in GraphQL query #255 | kudos @AryanJ-NYC
- improve README with links and fixes #266 | kudos @Thieffen
- security warning fix #274
How to Upgrade your RedwoodJS App
File Changes
You will need to replicate changes to three files shown in redwoodjs/create-redwood-app/#39
.env
.env.defaults
api/prisma/schema.prisma
Package Updates
Four packages should be updated to v0.2.5
Root directory package.json
"@redwoodjs/core": "^0.2.5”
web/package.json"@redwoodjs/web": "^0.2.5”
"@redwoodjs/router": "^0.2.5”
api/package.json"@redwoodjs/api": "^0.2.5”
After updating and saving the files, install the packages from the root directory:
$ yarn install
v0.2.2
Fixed
- Fix order of routes #211 @gielcobben
- Update submit button to accept references #230 @leonardoelias
- Do not duplicate routes #241 @sharcastic
- Automatic imports for page are now fixed in windows. #246
How to Upgrade your RedwoodJS App
Four packages should be updated to v0.2.2:
Root directory package.json
"@redwoodjs/core": "^0.2.2”
web/package.json"@redwoodjs/web": "^0.2.2”
"@redwoodjs/router": "^0.2.2”
api/package.json"@redwoodjs/api": "^0.2.2”
Once you’ve changed and saved the files, run yarn install from root directory.
v0.2.0
A huge shout out and thanks to everyone who tried Redwood, reported bugs, and contributed fixes!
Fixed
- Abort generator commands when they throw #203
- Build command for generators was not case sensitive #204 @bketelsen
- Dev server would restart when sqlite file was modified. Ignore
.db
and.sqlite
files #223 @m-leon - Update SDL generation to use scalar types for input types #229 @chris-hailstorm
- Drop requirement for
id
column kind to be namedid
#237 @m-leon - Support spaces in path for redwood-create-app #238
Added
Changed
- Run db commands explicitly with
yargs
#236 - Renamed DB_HOST env var to DATABASE_URL redwoodjs/create-redwood-app/pull/33
How to Upgrade your RedwoodJS App
Four packages should be updated to v0.2.0:
Root directory package.json
"@redwoodjs/core": "^0.2.0”
web/package.json
"@redwoodjs/web": "^0.2.0”
"@redwoodjs/router": "^0.2.0”
api/package.json
"@redwoodjs/api": "^0.2.0”
Once you’ve changed and saved the files, run yarn install
from root directory.