Redwood v0.33 🚀

current release is v0.33.3

v0.33 Highlights :tada:

This release moves Redwood within striking distance of a v1 release candidate. If you haven’t looked in a while, check out the Roadmap to v1 for current status.

For everyone who contributed below (and in all the previous releases), thank you for making Redwood amazing :rocket: The project just wouldn’t be the same if not for the vibrant, helpful community making it happen.

:package: TypeScript Support is (almost) :100:

With this release, you’ll immediately notice all the new TypeScript features and support. @peterp @dac09 @Tobbe and so many others have been chipping away for many months — their hard work is really starting to shine.

There are a few remaining pieces to put in place. In the meantime, check out what’s included, and then let us know what you think (or what’s missing) via the Redwood Forums.

:woman_technologist::man_technologist: Contributing is getting even easier

We :heart: contributors! Just look at all the different names below of individuals who contributed to this release alone. Several of them are first-time contributors who attended a recent Contributing Workshop (keep a lookout for another one soon).

The local development tooling for contributing is just getting better and better. We highlight the new yarn redwood-tools linkcommand in this Contributing Doc as well as the :sparkles:brand new :sparkles: script to spin-up a local test project, bells and whistles included! Just run yarn build:test-project from a local clone of the Redwood framework, and then thank @renansoares for a job well done.


Changelog

Added

Changed

Fixed

Package Dependencies

View all Dependency Version Upgrades
  • upgrade magic-sdk from 2.7.0 to 4.3.0 #2463
  • build(deps): bump core-js from 3.10.1 to 3.12.1 #2481
  • build(deps): bump @graphql-tools/merge from 6.2.13 to 6.2.14 #2516
  • build(deps): bump esbuild-loader from 2.10.0 to 2.13.0 #2518
  • build(deps-dev): bump firebase-admin from 9.7.0 to 9.8.0 #2522
  • updating minor dependency versions across packages #2532 by @thedavidprice
  • build(deps): bump concurrently from 6.0.2 to 6.1.0 #2533
  • build(deps): bump pino-pretty from 4.7.1 to 4.8.0 #2534
  • build(deps): bump http-proxy-middleware from 1.1.0 to 2.0.0 #2536
  • Upgrade eslint and prettier packages including formatting fixes #2540 by @thedavidprice
  • Upgrade Babel 7.14.2 including misc babel packages #2541 by @thedavidprice
  • build(deps-dev): bump @types/findup-sync from 2.0.2 to 4.0.0 #2574
  • build(deps): bump @apollo/client from 3.3.18 to 3.3.19 #2576
  • build(deps): bump @babel/cli from 7.13.16 to 7.14.3 #2578
  • build(deps): bump esbuild from 0.11.21 to 0.12.1 #2579
  • build(deps): bump apollo-server-lambda from 2.22.2 to 2.24.1 #2580
  • build(deps-dev): bump @supabase/supabase-js from 1.11.13 to 1.11.14 #2583
  • Aggregate Dependabot misc patch minor upgrades #2596 by @thedavidprice
  • build(deps-dev): bump @types/lodash from 4.14.169 to 4.14.170 #2597
  • build(deps): bump babel-plugin-graphql-tag from 3.2.0 to 3.3.0 #2600
  • build(deps): bump @types/node from 15.3.1 to 15.6.0 #2601
  • build(deps): bump @babel/plugin-transform-runtime from 7.14.2 to 7.14.3 #2603
  • upgrade eslint-plugin-import v2.23.3 with lint fixes #2604 by @thedavidprice
  • build(deps): bump eslint from 7.26.0 to 7.27.0 #2610
  • build(deps): bump msw from 0.28.2 to 0.29.0 #2618
  • bump concurrently from 6.1.0 to 6.2.0 #2620
  • build(deps-dev): bump @supabase/supabase-js from 1.11.14 to 1.11.15 #2621
  • build(deps): bump @typescript-eslint/parser from 4.24.0 to 4.25.0 #2624
  • build(deps): bump @types/node from 15.6.0 to 15.6.1 #2626
  • build(deps): bump @typescript-eslint/eslint-plugin from 4.24.0 to 4.25.0 #2627
  • build(deps): bump esbuild from 0.12.1 to 0.12.5 #2654
  • build(deps): bump ts-morph from 10.1.0 to 11.0.0 #2656
  • build(deps): bump core-js from 3.12.1 to 3.13.1 #2680
  • Upgrade axios due to security issue #2688 by @peterp
  • Misc Dependabot upgrades including mostly patches #2694 by @thedavidprice
  • bump react types and eslint packages patch version #2695 by @thedavidprice
  • downgrade jest-watch-typeahead 0.6.3 #2699 by @thedavidprice

Breaking :warning:

Projects with api/prisma/ directory will error

This release changes the default path to api/db/ and fully deprecates default support for api/prisma. There are two ways to resolve this, including changing the directory name. See the “Code Modifications” section for more info.

How to Upgrade

Code Modifications

1. Projects created at Redwood v0.20 (or earlier) must update api/prisma/ or add config

Redwood projects now default to the directory structure api/db/. This release fully deprecates default support for projects with an api/prisma/ directory. This can be resolved by either of the following:

  1. rename api/prisma/ to api/db/
  2. add the following config to redwood.toml
[api]
  schemaPath = './api/prisma/schema.prisma'

Any projects using api/db can remove the schemaPath config from redwood.toml, which now defaults to './api/db/schema.prisma'

2. TypeScript Projects: Update your tsconfig.json in web/ and api/ folders (recommended)

To take advantage of new TS support features, TS projects should update their two tsconfig.json files. There are two options:

  1. If you haven’t modified the files, run yarn rw setup tsconfig --force to overwrite your old configs with the latest
  2. Manually apply the updates:

3. Update graphql.config.js (recommended)

Redwood now writes the graphql.schema to disk when you run yarn rw dev or yarn rw generate types! You should modify your project’s graphql.config.js file so the VSCode GraphQL plugin reads the schema from disk rather than from the api-server. This will be faster, doesn’t require your API server to be running, and you won’t see a bunch of unwanted requests in your api-server!

Manually update graphql.config.js (see this reference file):

const { getPaths } = require('@redwoodjs/internal')

module.exports = {
  schema: getPaths().generated.schema,
}

4. Rename Prisma Schema Datasource (recommended)

Prisma boilerplate renames the api/db/schema.prisma Datasource from DS to db. We recommend all projects do the same. See PR #1941 for reference.

5. Add ESbuild config option to redwood.toml (not required)

The commands yarn rw dev and yarn rw build both offer experimental support with the --esbuild option. You can now add the config to your redwood.toml instead of passing as a command option.

[experimental] 
  esbuild = false

The default is false. Set to true to enable.

6. Firebase Auth: Add additional initialization check

A firebase app will throw an error if you try to reinitialize it after it is already initialized. It is recommend you modify your code to add an additional check if already initialized (see this comment for reference):

export const firebaseClient = ((config) => {
  if (!firebase.apps.length) {
    firebase.initializeApp(config)
  }
  return firebase
})(firebaseClientConfig)

Upgrade Packages to v0.33.x from v0.32.x

Run the following command within your App’s directory:

yarn redwood upgrade

Upgrading from an earlier version?

Please follow the “how to upgrade” sections for each newer version here :point_right: 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.27.0 to v0.28.4, run the following command:

yarn redwood upgrade --tag 0.28.4

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

10 Likes

Hey All, I’ve created a thread here to house discussions about how TypeScript support in v0.33.x+ has been for you. Look forward to hearing from the community!

1 Like

Thanks for all the hard work.

3 Likes

Thanks all! Looks like great progress

1 Like

Just upgraded locally - will reach staging soon! So far so good. The new types helped me get rid of old code cause of all the warnings :stuck_out_tongue:

One thing I had noticed is that if you have the dev server running and you delete a file, it throws an exception in the filewatcher.

So stoked to see the CLI contribution in there :tada: I will be able to contribute some docs soon with real world use cases.

2 Likes

I saw that too. So I wrote an issue about it. Please add to that if you have any more info to share RW 0.33.0 rw-gen-watch crashes on Windows · Issue #2745 · redwoodjs/redwood · GitHub

yarn create redwood-app new-app seems to be generating projects with a missing .gitignore file. Could this be a repeat of what happened in v0.30 or something else? I generated a v0.32 project a few days ago which was fine and had .gitignore included.

yarn create redwood-app gitignore-wut

Output:

success Installed "create-redwood-app@0.33.0" with binaries:
      - create-redwood-app
  ✔ Creating Redwood app
    ✔ Creating directory '/Users/ajcwebdev/gitignore-wut'
  ✔ Installing packages
    ✔ Checking node and yarn compatibility
    ✔ Running 'yarn install'... (This could take a while)
  ✔ Convert TypeScript files to JavaScript
cd gitignore-wut
ls -a

Output:

.
..
.DS_Store
.editorconfig
.env.defaults
.env.example
.nvmrc
.redwood
.vscode
LICENSE
README.md
api
babel.config.js
graphql.config.js
node_modules
package.json
prettier.config.js
redwood.toml
web
yarn.lock

Info:

System:
  OS: macOS 11.4
  Shell: 5.8 - /bin/zsh
Binaries:
  Node: 14.17.0 - /var/folders/4r/lcm_4z051cdg60f0v15vwljr0000gn/T/yarn--1623019857291-0.23452658258355275/node
  Yarn: 1.22.10 - /var/folders/4r/lcm_4z051cdg60f0v15vwljr0000gn/T/yarn--1623019857291-0.23452658258355275/yarn
Databases:
  SQLite: 3.32.3 - /usr/bin/sqlite3
Browsers:
  Chrome: 91.0.4472.77
  Firefox: 87.0
  Safari: 14.1.1
npmPackages:
  @redwoodjs/core: ^0.33.0 => 0.33.0 

Thanks for your report Anthony! An issue has been filed Create Redwood App v0.33 missing .gitignore · Issue #2749 · redwoodjs/redwood · GitHub (thanks @dthyresson for writing it)

v0.33.2

Patch Release

Includes the following fixes:

Code Modifications

If you installed a new project at version v0.33.0 using yarn create redwood-app ..., your project is likely missing a .gitignore file. Please confirm and then follow these steps if needed:

  1. create the file in your project root: .gitignore
  2. copy and paste the ignore paths using this template file as a reference: template/.gitignore
.idea
.DS_Store
.env
.netlify
.redwood
dev.db*
dist
dist-babel
node_modules
yarn-error.log
web/public/mockServiceWorker.js

Should we be committing these graphql type files? Cause I have noticed it can cause git merge conflicts.

I’ve raised the same question to Danny and Peter. The vote was to wait for community feedback.

Could you comment over here directly? [Community help wanted!] TypeScript Feedback v0.33.x+

1 Like

v0.33.3

Patch Release

Includes the following fixes, mostly enhancing support for new TypeScript features:

  • Add tstoolbelt as dependency #2799 by @dac09
  • Run “yarn rw-gen” during create redwood app #2770 by @jtoar
  • Improve prerender errors and remove unnecessary warnings #2767 by @dac09
  • fix(rw-deploy): Deploy cmd fails correctly if one of the steps fail #2796 by @dac09
  • Use consistent GQL operation name case in cell scaffolds generators #2785 by @dthyresson
  • Remove unused QUERY variable generated through scaffolding #2150 by @leighhalliday
3 Likes