RedwoodJS v0.13.0 has been Released

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
  • Forms now automatically coerce values to the Prisma data type

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 :hugs: :rocket:

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

Added

  • Framework: Add @redwoodjs/project-model (+ Language Server) #810 #814 @aldonline :tada:
    • 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 :tada:
  • Forms: Coerce form values to Prisma type #749 @Tobbe :tada:
    • docs?
  • Storybook: Add support for Storybook #742 #815 :tada:
    • 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 :warning:

Nothing to see here! :see_no_evil:


How to upgrade RedwoodJS packages to v0.13.0

:point_right: 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.

:rotating_light: 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


Redwood Releases on GitHub

You can see all Redwood release notes and version history on GitHub

13 Likes

Excellent release team! Can’t wait to get my hands dirty with Storybook :smiley:

Feedback in regards to upgrade;
Even tho all upgradable packages was red (Major Update backward-incompatible updates) the upgrade went smooth. I did below steps from a relative fresh OOBE version 0.12.0.

  1. yarn rw upgrade
  2. rm -rf node_modules && yarn install
  3. yarn rw db generate
  4. Applying import alternative as of #788
  5. yarn rw dev
  6. Success :rocket:

The only issue I had was Prisma threw a Invalid feature flag: aggregations error when querying a model, but after generating a new Apollo client (yarn rw db generate) it was working like a charm again.

Congratulations team! :clap:

2 Likes

Hi @jeliasson Thanks for the update and good to know!!

Even tho all upgradable packages was red (Major Update backward-incompatible updates)

^^ Yeah, that visual colorization is something we can’t control – using yarn upgrade-interactive behind the scenes. It’s making assumptions using semver and what I think is going on is that it assumes minor version changes for anything with a 0 as a major version is “backward-incompatible”. And/or maybe it’s just buggy. Anyway…

rm -rf node_modules && yarn install

Did you try it first without doing this step? There was a strange side effect “Compile Error” we couldn’t always replicate locally with the node_modules packages. But it was happening sometimes. In general, deleting yarn.lock should never be required to upgrade. (Thus Alpha…) But we’re still trying to diagnose this case.

Yeah, that visual colorization is something we can’t control – using yarn upgrade-interactive behind the scenes.

Neat! Have not seen that one before. The semver reasoning behind it makes sense. Thanks.

Did you try it first without doing this step?

Now that I think of it, deleting the node_modules directory was maybe a troubleshooting step of fixing the Invalid feature flag: aggregations issue I was seeing at the time. So… maybe? :sweat_smile:

Again, excellent work!

1 Like