Hammer是一个完整堆栈,无服务器的JAMstack Web应用程序框架
Hammer是一个完整堆栈,无服务器的JAMstack Web应用程序框架Happy New Year
👉 Join us for the upcoming RedwoodJS Meetup on Thursday, January 14th. We're going to be talking about plans for the upcoming v1, all the shiny new things in this release, and have a demo of a new production Redwood app.
👉 Help us improve the upcoming Redwood Tutorial Pt 2. In preparation for the v1 release, we're again using Tutorial-Driving-Development to guide the way. We need your help trying it out before it's published.
And now on to the amazing work included in this release thanks to the amazing, collaborative community of people listed below.
v0.22 Highlights
Azure AD Authentication Provider
That's right, Azure AD is supported out of the box thanks to @jeliasson.
- Documentation
- PR #1311
New Test Scenarios
Testing with mock data just got a whole lot easier thanks to @cannikin The new Scenarios are data that is pre-set into the database at the start of your test and removed afterward.
- Read the full explanation and how to use in #1465
- And keep a lookout for the deep-dive in the upcoming Tutorial Pt 2
Bring your own GraphQL Client Library
Redwood ships with Appollo GraphQL Client, but we recognize that's not necessarily the right choice for every project. Thanks to @peterp, you can now swap out for the tool of your choice!
Changed
- CLI: update diagnostics to display a success message when no errors or warnings are encountered #1405 by @M0nica
- CLI: Update Setup TailwindCSS to v2 using PostCSS v7 compatible install #1540 by @jtoar
- CLI: Tailwind setup use fs.renameSync instead of mv #1579 by @Tobbe
- GraphQL: Allow users to "bring your own" GraphQL Library #1498 by @peterp
🎉 - Forms: Improve typings for errors #1510 by @Tobbe
- UI: Only stop rendering on Private routes #1519 by @peterp
- Webpack: Make webpack load .mjs extensions #1528 by @peterp
- Auth: upgrade to Supabase 1.0; supabase@1.1.1 with cleaner imports #1536 #1564 by @Tobbe
- this is a breaking change for projects currently using Supabase. See "Breaking Changes" section below.
- MSW: Explicit target environment for MSW #1574 by @peterp
- Docs: Contributors consolidate Core Team with Roles and update with new contributors #1541 by @thedavidprice
- Docs: Clarify CONTRIBUTING.md #1580 by @jtoar
- Prisma: Upgrade Prisma v2.12.1 #1604 by @thedavidprice
- Release Notes for v2.12.0 and v2.12.1
- Standalone Prisma Studio app for macOS
- Prisma codemods help upgrading your codebase
- Microsoft SQL Server now supports native database types (Preview)
- BREAKING: Remove non-$ methods
- BREAKING: 1-1-relations must now have an optional side
- BREAKING: Fix how data for Json[] fields is stored
- DEPRECATION: Rename findOne to findUnique
- DEPRECATION: Move most types under the Prisma namespace
Added
- Auth: Support Azure AD authentication #1311 by @jeliasson
🎉 - CLI: Add redwood console #809 by @jtoar
- CLI: Add flags to generators to skip tests and story files #1454 by @jvanbaarsen
- CLI: Add --pr to upgrade command #1552 by @Tobbe
- Tests: Test Scenarios #1465 by @cannikin
🎉 - Storybook: Add --build option to
yarn rw storybook
#1516 by @peterp - Ops: GitHub Action PR packages #1530 by @Tobbe
- Auth: Firebase Signup login with email, password #1555 by @byudaniel
Fixes
- Lint: Orderliness and break avoiding lint rules, package.json flags #1381 by @Krisztiaan
- Lint: Fix jest-dom lint errors #1575 by @peterp
- Lint: Fixed a few eslint warnings #1582 by @Tobbe
- Storybook: Fixes Storybook/Webpack Out of Memory Error by using relative path to config stories location #1509 by @dthyresson
- Auth: Fix FetchConfigProvider to reprise handling no auth #1515 by @jtoar
- Auth: Supabase getToken uses session to get access_token so that graphql calls are authenticated #1539 by @dthyresson
- GraphQL: Fix renamed export QueryHooksProvider to GraphQLHooksProvider #1520 by @peterp
- Router: Include queryParams in redirectTo #1526 by @dac09
- Deploy: Fix aws_serverless config when api folder missing #1553 by @bennettrogers
- Babel: Make glob import dir ignore .scenarios. files. #1607 by @peterp
Breaking
⚠️
For projects using Supabase Auth
-
This release upgrades to Supabase v1, which requires a new env var
SUPABASE_JWT_SECRET
:- See https://redwoodjs.com/docs/authentication#supabase
- For reference, see #1536 and #1564
-
Additionally, the Supabase token is now decoded whereas before it was returned undecided.
- See how this is handled starting here in the package unit tests
Prisma custom implementations
This version uses Prisma v2.12, which includes the following breaking changes affecting some projects with related custom implementation:
- Remove non-$ methods
- 1-1-relations must now have an optional side
- Fix how data for Json[] fields is stored
If your project is affected, you'll need to review the Prisma v2.12 Release Notes.
Note: Prisma now includes a code mode command, which will help fix any issue. See the release notes for more info. General example:
cd my-app npm install @prisma/cli @prisma/client npx @prisma/codemods update-2.12 ./
How to upgrade RedwoodJS to the latest v0.22
👉 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.
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
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.
Assets
2
👉 Join us for the upcoming RedwoodJS Meetup on Thursday, December 3rd.
v0.21.0 Highlights
A huge Thank You to everyone who contributed to documentation on redwoodjs.com.
And
Experimental support for React fast-refresh!
React fast refresh is a development-time feature that improves the "Hot reloading" functionality. The biggest benefit is that your components maintain state when you save them and they're refreshed on the screen. Learn more here about this feature.
To add support for fast-refresh, edit your redwood.toml
file and add the following:
[web]
# ... others
experimentalFastRefresh = true
Restart you development process and you should be good to go!
Added multiproviders to firebase auth!
Now, when you logIn()
or signUp()
with the firebase auth client, you can optionally specify the provider: google.com
, facebook.com
, github.com
, twitter.com
, microsoft.com
or apple.com
. The default is google.com
.
Converted @redwoodjs/forms
to TypeScript!
More progress toward the Redwood v1 TS support goals!
Changed
- Apollo: Add fetchPolicy and nextFetchPolicy to beforeQuery #1428 @cannikin
- Apollo: Remove unnecessary refetchQuery calls #1497 @cannikin
- Tests: update Cell tests to just test that nothing is thrown #1397 @cannikin
- Tests: default sides to "all" in test command #1414 @cannikin
- CLI: updated the CLI command rw generate deploy anchor links to match the documentation for Netlify and Vercel #1422 @dhausser
- Docs: update contributors #1430 @thedavidprice
- Docs: Update create-redwood-app readme to fix npm result #1484 @jacebenson
- Ops: use api/db for E2E test #1500 @thedavidprice
- Prisma: Upgrade to Prisma
v2.11.0
#1499 @thedavidprice- 2.11.0 Release Notes
- Native database types in the Prisma schema (Preview)
- New types in the Prisma schema: BigInt, Bytes and Decimal (Preview)
- Set foreign keys directly (Preview)
- 2.10.2 Release Notes
- 2.10.1 Release Notes
- 2.10.0 Release Notes
- Support for Microsoft SQL Server (Preview)
- Single-command schema changes for prototyping
prisma db push
(Preview)
- 2.11.0 Release Notes
Added
- Auth: added multiproviders to firebase auth! #1412 @dac09
🎉 - TS: converted @redwoodjs/forms to TypeScript! #1431 @Tobbe
🎉 - Dev: experimental support for React fast-refresh! #1461 #1463 #1464 @dac09
🎉 - see "Highlights" above for instructions
- Ops: GH Action to create packages from PRs #1459 #1485 #1477 @Tobbe
- Storybook: add
open
flag,yarn rw storbook --open
will now open the browsers. #1445 @jvanbaarsen - Storybook: add Redwood's "node" Webpack config to Storybook's Webpack config. #1491 @jderrough
- Server: http server tweaks. #1441 @peterp
- Prisma: added
{ redwood { prismaVersion } }
field to GraphQL #1425 @jvanbaarsen - Prisma: add ability to specify a custom path for the
prisma.schema
#1424 @dhausser - CRWA: Quick start message added to
yarn create redwood-app
#1388 @kevPo
Fixes
- Prisma: fix field resolver not working #1440 @AntonioMeireles
- Prisma: bug fix
prisma.disconnect
deprecated warning #1404 @guillaumeLamanda - Prisma: fixes setting Prisma Version in root redwood schema #1442 @AntonioMeireles
- Prisma: use original prisma schema path #1486 #1488 @peterp
- Generator: fix nested scaffolding QUERY import paths #1432 @forresthayes
- Fixes DB Generators failing when a schema path includes spaces or other problematic characters #1492 @dthyresson
- Tests: fix
rw test
logic #1415 @cannikin - Tests: overwritten DATABASE_URL wasn't being used in actual Jest run #1446 @cannikin
- Tests: run jest api tests in sequence. #1447 @cannikin
- Tests: fix tests when the project app path includes spaces or other problematic characters #1494 @dthyresson
- Setup: fix tailwindcss setup command #1407 @mohinderps
- Docs: fix a typo in the contribution guide :) #1401 @olance
- Docs: fix typo in User route param types section #1466 @ajcwebdev
- Storybook: launch Storybook with path w/ spaces #1495 @dthyresson
Breaking
⚠️
[Minor Change] In this release, the Apollo fetchPolicy
and nextFetchPolicy
were changed for Redwood Cell's beforeQuery
. It's possible that cache behavior may change for custom implementations of Apollo cache configuration. However, it's unlikely the majority of Redwood projects will experience any changes after upgrading — tests demonstrated backwards compatibility. (See #1428) Also relevant are updates to Scaffold Generators no longer requiring refetchQuery
calls. Note: existing refetchQuery
configuration is backwards compatible. (See #1497)
How to upgrade RedwoodJS to v0.21.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
The following code modifications are recommended but not required.
- [Recommended] Rename
api/prisma
toapi/db
This change is not required. New installations of Redwood now use the directoryapi/db
instead ofapi/prisma
. If you change the directory name in your project, you must also add aschemaPath
config toredwood.toml
. See #116 for code change example.
// redwood.toml
...
[api]
port = 8911
schemaPath = "./api/db/schema.prisma"
...
- [Recommended] Remove
schema.prisma
"rhel-openssl-1.0.x"binaryTarget
Prisma v2.11.0 (included in this release) fixes the requirement for adding "rhel-openssl-1.0.x". Removing thisbinaryTarget
may also reduce the size of the built API. See #115 for code change example.
// api/db/schema.prisma
...
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
...
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
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.
Assets
2
This is definitely a mega release!
⚠️ This version contains breaking changes and manual code modifications. See the "Breaking" and "Manual Code Modifications" sections below for more info and upgrade instructions.
v0.20.0 Highlights
If this version has a theme, it's performance. Most of the highlights below are under-the-hood improvements and hard-earned fixes.
- Improved Router Performance #1284
- Improved GraphQL Cache Handling (Apollo) #1250 #1387 #1342
- Improved TypeScript Support for Web #1232 #1241 #1247 #1291
- Added Setup Command for one-step install and config and install #1154 #1234 #1269 #1282 #1294
- after upgrading, run
yarn redwood setup --help
to see current commands
- after upgrading, run
- Fixed Jest Test Command #1376
- Fixed Storybook Command on Windows #1324
Additionally, a huge Thank You to everyone who contributed to documentation on redwoodjs.com.
Changed
- Apollo: Revert to default Apollo fetch policy #1250 by @amorriscode
⚠️ - Apollo: Add refetch queries to create and delete mutations #1387
⚠️ - CLI: modify generated tailwind config to opt-in to upcoming change #1179 by @forresthayes
- CLI: add compatibility comment to color/style palettes in cli packages #1210 by @jeliasson
- CLI: improve Upgrade command so
-t
accepts any string #1270 - CLI: add validation for tag supplied to rw upgrade #1304 by @dac09
- CLI: improved Scaffold error output #1320 by @santhoshle
- CLI: SDL generator: id only needed for CRUD #1327 by @Tobbe
- CRWA: improve installation success message #1195 by @jeliasson
- CRWA: update CRWA success message #1373 by @robobunny
- Prisma: remove deprecated argument from prisma studio call #1298 by @AntonioMeireles
- Prisma: upgrade prisma v2.9.0 #1206 #1300 #1344
- v2.9.0 Release Notes, v2.8.1 Release Notes, v2.8.0 Release Notes, v2.7.1 Release Notes, v2.7.0 Release Notes
findFirst
- Case insensitive filters for PostgreSQL are now stable
- Prisma Studio is Stable
- Configure Prisma schema location via package.json for more flexibility
- v2.9.0 Release Notes, v2.8.1 Release Notes, v2.8.0 Release Notes, v2.7.1 Release Notes, v2.7.0 Release Notes
- Structure: update VS Code private icon logic #1331 by @M0nica
- Router: add validation for private routes #1340 by @esteban-url
Added
- CLI: add the setup command #1154 #1234 #1269 #1282 by @noire-munich
🎉 - CLI: add setup webpack.config.js for web #1294 by @dac09
- TS: make "@redwoodjs/web" TypeScript ready #1232
🎉 - TS: add types to createGraphQLClient and GraphQLProvider #1241 by @kimadeline
🎉 - TS: add types to withCell #1247 by @kimadeline
🎉 - TS: converted FatalErrorBoundary to typescript #1273 by @shzmr
🎉 - TS: Add types to RedwoodProvider #1291 by @kimadeline
🎉 - Tests: add jest-watch-typeahead #1208 by @RobertBroersma
- Docs: add structure/CONTRIBUTING.md #1357 by @aldonline
- Docs: Added Quick Start callout to Quick Start page #1386 by @kevPo
Fixed
- Router: Fix loaders initialization #1284 @jtoar @mojombo
🎉 - Test: fix usage of private variable #1207 by @RobertBroersma
- Test: fix cwd in getConfigPath to actual cwd #1209 by @RobertBroersma
- Docs: Fix typos #1211 by @androiddevnotes
- Docs: updating contributing.md with install instructions #1231 by @M0nica
- Docs: fix misspelling of "contained" #1338 by @Irev-Dev
- Docs: redwoodjs.com docs Introduction link to node/yarn requirements #1358 by @brentguf
- CLI: don't create an AuthProvider if one exists #1251 by @amorriscode
- CLI: replace
<tt>
HTML elements with semantic<code>
HTML elements #1260 by @Thieffen - Structure: fix env visibility bug #1308 by @aldonline
- Structure: diagnostics throws error if a notfound route is within a Private tag #1325 by @M0nica
- Structure: fix router "Create Page..." codelens positon #1326 by @mbucchi
- Storybook: fix storybook on Windows #1324 by @Tobbe
🎉 - Storybook: Fix auto-mocking #1378
- Babel: fix importing .ts/.tsx files in web with directory-named-import plugin #1332 by @dac09
- Bable: fix directory named imports #1364
- Forms: fix form error message display #1337 by @forresthayes
- Apollo: fix scaffold mutation #1342
⚠️ - Apollo: fix Apollo Client imports (and Test command) #1376
🎉
Breaking
⚠️
Appollo Client v3 Cache Behavior for GraphQL Mutations
Prior to this version, Redwood Cells used Apollo's cache and network
fetch policy. This has been removed in favor of the default policy (see #1250). This change, along with the new Apollo v3 behavior, changes the behavior of mutations — state changes will often not render without a page reload.
From the ApolloDocs: If a mutation modifies multiple entities, or if it creates or deletes entities, the Apollo Client cache is not automatically updated to reflect the result of the mutation.
tl;dr: if things with your App's CRUD rendering seem broken after upgrading, you'll need to update the Mutations in your components to use Apollo's new features like refetchQueries
:
- See this Apollo Doc about Mutations and Cache
- For a more advanced approach and example using
inMemoryCache
, see this Forum Topic by @jtoar - Redwood Scaffold generated CRUD will also need to be updated. See the "Manual Code Modifications" section below.
Prisma Query Engine Deploy Error
Prisma v2.9.0
now requires setting an additional binaryTarget
in schema.prisma
. Otherwise, the Prisma query engine will not build correctly, resulting in an error affecting the production deploy.
- See the "Manual Code Modifications" section below for required changes
How to upgrade RedwoodJS to v0.20.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
- Prisma
v2.9
requires an additionalbinaryTarget
for production deploys to build correctly:- add the additional binaryTarget
"rhel-openssl-1.0.x"
toapi/prisma/schema.prisma
- see this example
- add the additional binaryTarget
- VS Code GraphQL extension required config:
- this GraphQL Extension is recommend for VS Code projects
- add
graphql.config.js
to your project root; see this example with code
- Update Scaffold generated Component files (or, in some cases, your own custom mutation implementations)
- Redwood Scaffold generated CRUD needs to be updated in order to work with the new Apollo v3 Cache. There are four generated component files that need to be updated for each generated Scaffold. The specific names will be different based on your schema models. For the Tutorial
post
model as an example, the files to update are the components/Post/Post.js
,/Posts/Posts.js
,/NewPost/NewPost.js
, and/EditPostCell/EditPostCell.js
- Note: One way to handle this is to re-run Scaffold Generator with the
--force
option.🚨 It's the fastest. But this will overwrite any customization. - Edit [Model].js, [Model]s.js, and New[Model].js Components (e.g. Post.js, Posts.js, and NewPost.js):
- See the three files in this commit for reference. Note: the reference file are
Name.js.template
,Names.js.template
, andNewName.js.template
- For each file, add
import { QUERY } from 'src/components/${pluralPascalName}Cell'
- For the respective
DELETE
andCREATE
mutation'sonCompleted
property, addrefetchQueries: [{ query: QUERY }], awaitRefetchQueries: true,
- For the [Model]s.js file, remove the current
refetchQueries
property from theonDeleteClick
conditional
- See the three files in this commit for reference. Note: the reference file are
- Edit the Edit[Model]Cell.js Component (e.g. EditPostCell.js):
- See the
EditNameCell.js.template
file in this commit for reference - The
UPDATE
mutation requires passing all properties, not justid
in the same manner as theQUERY
- Add all
QUERY
properties (e.g.id
,title
,body
,createdAt
) to theUPDATE_[Model]_MUTATION
- See the
- Redwood Scaffold generated CRUD needs to be updated in order to work with the new Apollo v3 Cache. There are four generated component files that need to be updated for each generated Scaffold. The specific names will be different based on your schema models. For the Tutorial
Upgrading is worth it! And, more importantly, there's a vibrant community for help (and encouragement) if you need it.
- Have questions or need help upgrading? Check out this Forum Topic.
- We're evaluating how to handle the Redwood Client GraphQL. Check out this Forum Topic to learn more and share your experience and suggestions.
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
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.
Assets
2
thedavidprice released this
Patch release fixing VS Code extension on Windows:
Assets
2
thedavidprice released this
This is a patch release to get VS Code extension working:
- Small Language Server fixes (to get VSCode extension working) #1267 by @aldonline
- Suppress most error responses from the Language Server
- Improve initialization order of LSP components
- Tolerate certain missing files and folders
Assets
2
peterp released this
This is a quick bug fixing release:
- Export some additional Apollo methods:
useClient
,useSubscription
anduseLazyQuery
. #1185 @KrisCoulson - Incorrect import of default
merge
versus named exportmerge
. #1188 @jeliasson - Make
yarn rw generate util tailwind
use the correct pinned version of postcss-loader and autoprefixer. #1189 @dthyresson
Assets
2
thedavidprice released this
v0.18.0 Highlights
- Supabase Authentication Provider
🔐 - More Typescript and Conventions Support
⚡️
Changed
- Generators: quote paths and keywords with
<tt>
instead of quotation marks in JSX template generator #1094 by turadg
Added
- TS: Create Directory Named Import plugin #1102 by peterp
🎉 - TS: Add typedefs to router #1110 by peterp
🎉 - Auth: Add supabase auth provider #1033 by amorriscode
🎉 - Auth: Adds signup() to Auth to default UI to a signup tab/form when available #1057 by dthyresson
Fixed
Breaking
⚠️
nothing to see here
How to upgrade RedwoodJS to v0.18.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.
Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
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.
Assets
2
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
🚀 - 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
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.
Assets
2
thedavidprice released this
v0.14.0 Highlights
- New project Diagnostics command
- run the command
yarn rw diagnostics
- run the command
- Customize Jest configuration per Side (e.g.
web/
andapi/
)- one more example of Redwood handling the painful integration parts so you can have more fun building your app
🥳 -
⚠️ this introduces a breaking change to existing applications, see "How to upgrade" section for required manual code changes
- one more example of Redwood handling the painful integration parts so you can have more fun building your app
Thank you to @aldonline and @RobertBroersma for the highlights above
And to all the documentation contributors, thank you and keep up the great work!
Changed
- Tests: configure Jest dynamically per-Side #805
🎉 - Tests: increase Jest test timeout #845 @Tobbe
- Cells: Cell's queries are now given an operation name #867 #847
- Generators: scaffold's table styles #844 @SimeonGriggs
- Generators: improved Scaffold's details/show page #840 @Tobbe
- Generators:
updatedAt
is now ignored in SDL creation #777 @leibowitz - Forms: use context to handle coercions #834 @Tobbe
Added
- CLI: added "diagnostics" command to CLI #842 @aldonline
🎉 - CLI: added
yarn rw sb
alias to start Storybook #833
Fixed
- Auth: fixed the auth generator regex #832
- Storybook: import the user's default CSS file #821
- Tests: map MockRouter also map private routes #820
- Generators: use field name for relation generation #813 @Rosenberg96
Breaking
⚠️
#805 changes how Jest is configured, which breaks yarn rw test
for existing applications. See "How to upgrade" below for manual code modification instructions.
How to upgrade RedwoodJS packages to v0.14.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.
Step 1 of 2: Upgrade Packages
Run the following command within your App directory:
yarn rw upgrade
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.
Step 2 of 2: Manual Code Additions
Add two new Jest config files to your Redwood project. For a code example, see PR #78
1. Create api/jest.config.js
:
const { getConfig } = require('@redwoodjs/core')
const config = getConfig({ type: 'jest', target: 'node' })
config.displayName.name = 'api'
module.exports = config
2. Create web/jest.config.js
const { getConfig } = require('@redwoodjs/core')
const config = getConfig({ type: 'jest', target: 'browser' })
config.displayName.name = 'web'
module.exports = config
Assets
2
thedavidprice released this
v0.13.0 Highlights
- Initial Storybook Integration and Support
- read this Forum Post to get started
- tl;dr run the command
yarn rw storybook
- Prisma Studio Integration: explore and manage your data interactively
- run using the command
yarn rw db studio
- video overview of Prisma Studio in action
- run using the command
- Forms now automatically coerce values to the Prisma data type
- see the updated Forms documentation
Documentation contributors, we salute you! @Terris @jeliasson @amorriscode @tctrautman @SimeonGriggs @dfundingsland
And Thank You to the amazing community for being awesome to each other across GitHub, Discord, and the Forums. The encouraging good vibes are contagious
Changed
- Auth: getCurrentUser given both decoded & access tokens #779 @dthyresson
- Tests: Allow configuring test database #691 @RobertBroersma
- Generator: humanize scaffold
<th>
#733 @Tobbe - Config: Make sub-directories work in import-dir #788
- Deprecation Note: this replaces
@redwoodjs/api/importAll.macro
, which is now deprecated - See "How to upgrade" section for optional code modification
- Deprecation Note: this replaces
Added
- Framework: Add @redwoodjs/project-model (+ Language Server) #810 #814 @aldonline
🎉 - This is the exciting beginning of what will soon become a kind of API for the Framework itself. More details to come over the next several weeks.
- Learn more via this README
- Prisma: Add prisma studio via db studio command #799 #801
🎉 - Forms: Coerce form values to Prisma type #749 @Tobbe
🎉 - docs?
- Storybook: Add support for Storybook #742 #815
🎉 - initial support including Generators for Layouts, Components, Cells and Pages
- run using
yarn rw storybook
- TS: Add initial types to Router #790
- Cells: Add cache-and-network fetchPolicy to beforeQuery #796
- Framework: Add test script to web #800 @Tobbe
Fixed
- Generators: Workaround for POSIX-to-Windows path conversion #763 @Tobbe
- Generators: fix generated relational arrays #772 @Rosenberg96
- API: Fix for function-based context to run on each request #770 @nexneo
- Build: Do not build test files for API #789
Breaking
⚠️
Nothing to see here!
How to upgrade RedwoodJS packages to v0.13.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.
🚨
Potential Failed to Compile Error
When upgrading, some individuals have reported an error having to do with a babel module not being found, which results in a compile error. If you encounter this, here's the simple workaround:
- after upgrading, delete
yarn.lock
- run
yarn install
Manual Code Modification (Optional)
The macro @redwoodjs/api/importAll.macro
is now deprecated in favor of a new babel plugin supporting improved syntax. See #788
To use the new babel plugin in your Redwood App, you'll need to manually modify the file api/src/functions/graphql.js
with these changes from #71
Upgrade Packages: If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
Upgrade Packages: If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.13.0”
web/package.json
"@redwoodjs/web": "^0.13.0”
"@redwoodjs/router": "^0.13.0”
"@redwoodjs/auth": "^0.13.0”
(if installed)
api/package.json
"@redwoodjs/api": "^0.13.0”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
This version includes many improvements and fixes across CLI, Generators, Auth, TypeScript support, and Unit Tests.
To everyone in the community who's been contributing via issues, forum conversations, and PRs, thank you for making Redwood better!
v0.12.0 Highlights
- upgrade to Prisma v2.1.1 (v2.1.0 Release Notes and v2.1.1 Release Notes)
- adds basic filtering on Json data
- prepared statement caching for PostgreSQL
upsert
operation on a related row by usingconnectOrCreate
(experimental)transactionApi
: perform multiple unrelated write operations in a transaction and rollback if needed (experimental)
- improved TypeScript support for Deploy and Generators #744 #685
Changed
- Prisma: upgrade to Prisma-2.1.1 #748
- Tests: wrap MSW graphql for convenience #689 @RobertBroersma
- CLI: leverage yargs arg-parser lib #704 @jamesgeorge007
- CLI: commandeer ports when they are in use #736
- Generators: scaffolds use checkbox fields #719 @Tobbe @lachlanjc
- Generators: scaffolds use checkbox to display boolean value #732 @Tobbe
- Auth: change custom authHeader to return type #720 @dac09
- Ops: updates GH Actions and RW Tasks to use Main as Triggers #723
- Flash: optimize Flash component #724 @Terris
Added
- TS: convert layout generator to TypeScript #685 @kimadeline
- Router: add useLocation hook to Redwood Router #650 @Terris
- Auth: add reauthenticate method to useAuth #721
- CI: add cypress integration tests for tutorial #728
Fixed
- Auth: fixes auth firebase #729 @noire-munich
- CLI: generate Prisma client if it doesn't exist #735
- TS: actually build TS files. #744
- Config: fix(import-dir) Ignore file extensions | Ignore .test files #746 @dac09
- Generators: properly append array syntax #747
Breaking
⚠️
How to upgrade RedwoodJS packages to v0.12.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.
If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.12.0”
web/package.json
"@redwoodjs/web": "^0.12.0”
"@redwoodjs/router": "^0.12.0”
"@redwoodjs/auth": "^0.12.0”
(if installed)
api/package.json
"@redwoodjs/api": "^0.X”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
This release improves the existing Auth package (including a new Auth provider), adds the new "Flash" Messaging Bus, and has numerous CLI improvements and bug fixes.
⚠️ BREAKING: If you are upgrading, there are breaking changes to the Auth package and manual code changes required. See "Breaking Changes" and "How to Upgrade" below.
v0.11.0 Highlights
- Added Firebase provider to the Auth package, including a Generator
🎉 - Read the documentation
- Added a "Flash" Messaging Bus to pass temporary message objects between components
🎉 - Read the documentation
- See a demo of Redwood CRUD
- Want to help contribute to the Redwood framework but not sure where to get started? There's brand new documentation to help you do just that! And for all you Windows users out there, Redwood has a lot of fixes and improvements to make your contributions much easier.
Special thanks go out to @noire-munich, @Terris, @jtoar, and @Tobbe for the highlights above. And to everyone else who contributed so much to this release, Redwood is better because of you! As a community, we are grateful.
Changed
- Auth: Reorganize @redwoodjs/auth #637
- CLI: Add --auto-approve to
db up
#661 @rockymeza - CLI: Centralize yargs defaults #674 @kimadeline
- CLI: Remove
prisma generate --watch
task from dev command #699 - CLI: Add
--create-db
toyarn rw db save
command #708 - Generator: Remove cleanup from some generator test templates #681 @jtoar
- CSS: Use PostCSS loader if a PostCSS config file is present #696 @bjackson
- Config: Clean up the way exported global values are defined #697
- Config: Set browser.open default to false #712 @jtoar
- Prisma: upgrade prisma 2.0.1 #713
- Release Notes
- prisma introspect improvement
Added
- Forms: Add generic typeless InputField component #590 @gfpacheco
- Auth: Firebase generator #643 @noire-munich
🎉 - Auth: Send logOut options to auth client #690 @dnprock
- Messaging: Add flash message component #654 @Terris
🎉 - CLI: feat(create-redwood-app) cli flags to show up help and version information #671 @jamesgeorge007
- Tests: Add MSW to testing package #687 @RobertBroersma
Fixed
- Router: Links: Use browser default behavior for ctrl-clicks etc #677 @Tobbe
- Generator: Fix pluralization in gen page name #683 @evanmoncuso
- CLI:
rwt copy
fix for Windows #694 @Tobbe - CLI: nodemon double quotes to fix windows issue #702 @Tobbe
- TS: Make
yarn rw build api
also transpile .ts extensions #703
Breaking
⚠️
Auth Package Changes
The following changes were made to the Auth package, which will break existing implementations when upgrading to v0.11.0.
currentUser
was renamed touserMetadata
currentUser
is now populated from data from./api/src/auth.js::getCurrentUser
magic.link
provider type was renamed tomagicLink
How to upgrade RedwoodJS packages to v0.11.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 Change
This release includes an improvement to the command used by Netlify build, which was added to the Redwood template in this commit. To manually implement the change, follow these steps:
- In your project root directory, open the file
netlify.toml
- Change the build command to be
yarn rw db up --no-db-client --auto-approve && yarn rw build
This adds the flag --auto-approve
, which fixes an error some users experienced when applying migration changes to the DB.
If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.11.0”
web/package.json
"@redwoodjs/web": "^0.11.0”
"@redwoodjs/router": "^0.11.0”
"@redwoodjs/auth": "^0.11.0”
(if installed)
api/package.json
"@redwoodjs/api": "^0.11.0”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
Prisma v2.0.0 General Availability
🎉
Prisma has released version 2, and we are celebrating their hard-earned release by including it in v0.10! From all of us, we offer a huge congrats to the entire Prisma Team for building something amazing. Without it, the Redwood experience just wouldn't be the same.
General Availability Announcement and Release Notes
Note: Prisma Migrate is not part of this GA release -- it is still experimental.
Prisma v2 Highlights and Changes
- Improved Pagination: added
cursor
andtake
- This is a Breaking Change: see beta.7 release notes
- Improved Raw SQL Queries: splitting
.raw
intoqueryRaw
and.executeRaw
- This is a Breaking Change: see beta.8 release notes
- Enforcing Arrays in
OR
- This is a Breaking Change: see beta.9 release notes
Other Redwood v0.10.0 Highlights
- Improved Windows Support and Bug Fixes (with more to come!)
- Added Firebase Auth Provider
- Initial Typescript Support for Generators including SDL, Service, and Component
Thank You to everyone below who contributed. This release includes several PRs that were especially above and beyond thanks to @jtoar @jmreidy and @Tobbe
Redwood is better because of you!
Changed
- TS: Convert packages/api/makeMergedSchema/* to TypeScript #592 @MarkPollmann
- CLI: Audit CLI commands, improve
--help
#594 @jtoar🎉 - Console: Format errors in terminal #599
- Prisma: Upgrade to Prisma-2.0.0 #645 #655 #668 #672
Added
- TS: enable typescript services and sdl #515 @jmreidy
🎉 - TS: Convert component generator to TS #632 @kimadeline
🎉 - Auth: Adding Firebase to the AuthClients #593 @noire-munich
- Auth: add cli support for generating Magic.Link authentication provider #644 @gizmoGremlin
- CSS: SCSS/CSS Module support #662 @bjackson
Fixed
- CI: Fix Windows CI Runner Failing Tests #543
- Auth: Auth0Client needs to be destructured from @auth0/auth0-spa-js #640
- Apollo: upgrade apollo-server-lambda per security alert #659
- Router: Fix windows matching paths in babel #665
- CSS: Fix style loader order #667
Breaking
⚠️
- See Prisma "Highlights and Changes" above for related breaking changes
- Scaffold Generator CSS has been updated to use Semantic Classes, which breaks styling when new CRUD is added alongside existing. To learn more and resolve any issues, see this forum topic How to Upgrade Scaffold CRUD Styling to v0.8.0 (or greater)
How to upgrade RedwoodJS packages to v0.10.0
If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.10.0”
web/package.json
"@redwoodjs/web": "^0.10.0”
"@redwoodjs/router": "^0.10.0”
"@redwoodjs/auth": "^0.10.0”
(if installed)
api/package.json
"@redwoodjs/api": "^0.10.0”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
Changed
- Forms: Show authentication errors in
<FormError>
#621 @Terris - Config: Add
babel-plugin-redwood-import-dir
#598 - Template: remove
api/tsconfig
file, fixes prisma default autocomplete redwoodjs/create-redwood-app#60 @guledali- note: to apply this change to an existing project, see "How to Upgrade" section below
Fixed
- Config: Test and fix babel plugin for routes auto-loader #628
- Config: Files that end with
Cell
are not considered Cells if they have a default export #597 - Config: Convert route auto import to TypeScript #635
Breaking
⚠️
No breaking changes.
How to upgrade RedwoodJS packages to v0.8.2
Manual Code Change
The tsconfig.json
file was removed from api/
. Because this file existed alongside a jsconfig.json
file, it was blocking Prisma's autocomplete feature. See redwoodjs/create-redwood-app#60
To apply this change to your project, remove the following file:
api/tsconfig.json
⚠️ Do not remove this file if you previously modified the API-side language target to be TypeScript. If this is your case, you might not need thejsconfig.json
file and it could be possible to restore Prisma autocomplete via its removal -- proceed according to your own testing and needs.
If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.8.2”
web/package.json
"@redwoodjs/web": "^0.8.2”
"@redwoodjs/router": "^0.8.2”
"@redwoodjs/auth": "^0.8.2”
(if installed)
api/package.json
"@redwoodjs/api": "^0.8.2”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
v0.8.0 Highlights
- New Magic.Link Auth provider
🔐 (documentation) #562 - New Destroy command
💥 allows you to undo yourrw generate
fails. See all the options viayarn rw destroy --help
. #487 - Jest Tests Mocks for Web (initial documentation) #521
- Upgrades Prisma to v2.0.0-beta.6 (release notes)
Thank You to everyone below who contributed to this release. Redwood is better because of you!
Changed
- Prisma: Upgrade to Prisma-2.0.0-beta.6 #619
- Cell: enable cell to take functions for a query #505 @eurobob
- Cell: allow non-cell files name end with Cell #554 @gfpacheco
- Tests: Improve testing capabilities for Web #521 @RobertBroersma
- Dev-Server: add IP address to the Lambda event's requestContext in dev server #553 @bjackson
- Dev-Server: refactor Dev Server #573
- CLI: updates CLI build option to set default based on existing Sides (API or Web) #576
- CLI: Improve building api by first checking if
api/prisma/
exists #595 - Docs: add reference section to CONTRIBUTING.md #577 @jtoar
- Docs: add Private and Redirect to Router README #616 @twmilli
- Forms: allow override of input props #580 @gfpacheco
- Forms: update scaffold css to use semantic classes #611 @Terris
Added
- CLI: add destroy command #487 @antonmoiseev
- Auth: Magic.Link added as provider to @redwoodjs/auth #562 @Burnsy
Fixed
- CLI: fix db/generate (nested command-dirs) help messages #555 @jtoar
- Cell: Fix cell plugin not handling default and named export #601 @gfpacheco
- Dev-Server: Fix dev server run error when path contains spaces #609
Breaking
⚠️
No breaking changes.
How to upgrade RedwoodJS packages to v0.8
If the Current Version is > v0.6.0
Redwood v0.6.0 included a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the following @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.8.0”
web/package.json
"@redwoodjs/web": "^0.8.0”
"@redwoodjs/router": "^0.8.0”
"@redwoodjs/auth": "^0.8.0”
(if installed)
api/package.json
"@redwoodjs/api": "^0.8.0”
Install the upgraded packages
$ yarn install
Assets
2
thedavidprice released this
v0.7.1-canary.8
Assets
2
thedavidprice released this
This release introduces the new
Getting Started with Redwood Auth
Documentation
- Redwood Auth Guide has all the details
- Complete the new Redwood Tutorial Authentication section to add Auth to your RedwoodBlog
Example App Implementations
- Learn to implement Netlify Auth via the Redwood Example Blog tutorial
- Explore Auth implementation in the Example Invoice project
CLI Trailblazing
- Feeling
😜 ? Just dive in withyarn rw g auth [netlify|auth0]
Other v0.7.0 Highlights
🚀
- New Function generator and Custom Function Cookbook guide
- New Scaffold generator option to add 'path/' structure via
yarn rw g scaffold <path/model>
#423 - New Form fields (too many to list!) and improvements to Redwood Forms
- Upgrades Prisma to v2.0.0-beta.5 (release notes for beta.4 and beta.5)
And a gigantic Thank You to all the amazing contributors below who are making Redwood better every day. It's a blast to build this with you!
Changed
- Dev-server: improve Error Handling at FatalErrorBoundary #486
- Generators: humanize labels on scaffold forms #493 @lachlanjc
- Config: convert custom webpack cell-loader into Babel Plugin #512 @RobertBroersma
- Prisma: upgrade to Prisma v2.0.0-beta.5 #525 #532
-
⚠️ possible breaking change to migration files; see "Breaking" below
-
Added
- Auth: add @redwoodjs/auth package #497 #536
🎉 - Generators: adds auth generator #539
🎉 - Generators: adds function generator #517
🎉 - Generators: add path specification to scaffolds #423 @jtoar
🎉 - CLI: add console log on rebuild complete #504 @vikash-eatgeek
- CLI: add @redwoodjs/auth package to CLI upgrade command #556
- CLI upgrade command: add option --tag with choices 'canary' or 'rc' #560
- Docs: add router docs for useMatch and NavLink #470 @RobertBroersma
- Forms: add Radio Field #479 @vikash-eatgeek
- Forms: add checkbox field #488 @vikash-eatgeek
- Forms: adds all input type Field form helpers #511
Fixed
- CLI: fix
yarn rw info
not displaying redwoodjs packages on Windows #476 - Generators: remove excess closing braces from foreign key map on scaffold generator #482 @eurobob
- Generators: fixes possible null error in truncate #485 @kwyoung11
- Generators: switch out "Hammer" data source in tests #506 @lachlanjc
- Generators: fix NamesCell reload after deleting item #519 @cephalization
- Dev-server: 'yarn rw dev' now only starts the API and DB servers when the api folder is present #490 @ackinc
- Dev-server: fix Prisma Client error when running dev server w/out DB #524
- Router: Convert children into array to do array things #547
Breaking
⚠️
For previously deployed applications, it is possible the new Prisma migration files from beta.5 are incompatible with previous migrations. If you encounter a migration error on deployment, follow these steps after you backup your deployment DB:
- Remove your local Prisma "migrations/" directory and files.
- Create a new migration via
yarn rw db save
- Drop the "_Migrations" table on your deployment DB
- If you are using the netlify-plugin-prisma-provider, make sure it is at
v0.3.0
Rerun your deployment, which should complete successfully.
How to upgrade RedwoodJS packages to v0.7.0
If the Current Version is v0.6.0
Redwood v0.6.0 includes a new CLI command to upgrade @redwoodjs NPM packages. Run the following command within your App directory:
yarn rw upgrade
If the Current Version is < v0.6.0
Manually update the four @redwoodjs/*
packages.
Root directory package.json
"@redwoodjs/core": "^0.7.0”
web/package.json
"@redwoodjs/web": "^0.7.0”
"@redwoodjs/router": "^0.7.0”
api/package.json
"@redwoodjs/api": "^0.7.0”
Install the upgraded packages
$ yarn install
Assets
2
v0.7.0-rc.3
Assets
2
thedavidprice released this
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
Assets
2
v0.6.0-rc.1
Assets
2
thedavidprice released this
This release includes Prisma-2.0.0-beta.2, which is a big update that has many improvements, bug fixes, and new features.
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
Assets
2
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
Assets
2
thedavidprice released this
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) Add the db import to each of your Services files
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'
Add the import to your api/src/functions/graphql.js
file
// api/src/functions/graphql.js
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
Assets
2
db
automatically (#334). See "How to upgrade to v0.3.0" 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
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.0
(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) Add the db import to each of your Services files
For each Services file within api/src/services/*
, do the following:
- add this line at the top:
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.0
Root directory package.json
"@redwoodjs/core": "^0.3.0”
web/package.json
"@redwoodjs/web": "^0.3.0”
"@redwoodjs/router": "^0.3.0”
api/package.json
"@redwoodjs/api": "^0.3.0”
After updating and saving the files, install the packages from the root directory:
$ yarn install
Assets
2
thedavidprice released this
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
Assets
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.
Assets
2
peterp released this
Added
- A splash page that's shown when you don't have any routes. #17 @mojombo
- Router parameter types. #47 @mojombo
- Added forms to
web
#45 @cannikin - Alias
redwood
CLI command torw
#79 @sw-yx - FatalErrorBoundary #61 @mojombo
- Use the
Empty
branch the data returned from a cell is empty. #54 @cannikin - Added a way to create a new Redwood project using
yarn create redwood-app path/to/project
#60 @peterp - An import all marco that runs at build time. #86 @peterp
Changed
- We're having some trouble with
favicons-webpack-plugin
. So we've removed it. #37 @cannikin - Automatically adds the
withCell
code at build time in Webpack. #48 @mojombo
Fixed
Assets
2
peterp released this
In this release we continue towards making the steps in our tutorial a reality.
Added
- A webpack plugin that automatically imports components from
web/src/pages/*
intoRoutes.js
and an accompanying ESLint plugin that'll let you know when you're referencing a page that doesn't exist. #21 @mojombo getPaths
into@redwoodjs/core
that gives Redwood packages a single and stable place to references paths in a Redwood project. #24 @peterp
Assets
2
peterp released this
This is the first release of hammer and it doesn't actually do anything useful
I've added the hammer-cli
that allows anyone to add new commands in the the src/commands
directory. Right now we only have a single generate
command with a single component
generator. The component generator plops a ⚒ hammer style
component into the web/src/components
folder of your hammer project.
Assets
2
Watchers:83 |
Star:6193 |
Fork:270 |
创建时间: 2019-06-10 04:17:57 |
最后Commits: 12天前 |
许可协议:MIT |
d427179
Compare
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!
v0.23.0 Highlights
1. Redwood Console
Launch your very own interactive Redwood shell with
yarn rw console
2. Fix for Redwood v0.22
web/
hoistednode_modules
issueRedwood v0.22 experienced a strange issue with
node_modules
being hoisted to theweb/
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
Added
Fixes
./web
11780ed by @peterpBreaking
⚠️
Nothing to see here
🎉
How to upgrade RedwoodJS to the latest v0.23
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.
TEST_DATABASE_URL
to your projects.env
.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 tov17
. However, this created a weird/strange/unexpected issue where packages were being hoisted from root to theweb/
directory, resulting in seemingly random errors with Jest test failures and React hook errors.web/package.json
to16.13.1
Upgrade Packages
Run the following command within your App directory:
Need help or having trouble upgrading? See this forum topic for manual upgrade instructions and general upgrade help.