What you’ll learn
  • how to upgrade Webiny from 5.41.x to 5.42.x

Make sure to check out the 5.42.0 changelog to get familiar with the changes introduced in this release.

Step-by-Step Guide
anchor

1. Upgrade Webiny Packages
anchor

Upgrade all Webiny NPM packages by running the following command:

Once the upgrade has finished, running the yarn webiny --version command in your terminal should return 5.42.0.

2. Upgrade Yarn to 4.6.0
anchor

This is really important step, as the project upgrade will not work without the correct Yarn version.

We have updated the Yarn version to 4.6.0 and we cannot update it automatically in the project, so you need to do it manually.

To upgrade Yarn to version 4.6.0, run the following command:

This will effectively set your project Yarn to v4.6.0 and install all the packages with that Yarn version.

3. Run the Upgrade Command
anchor

The next step is to run the project upgrade:

4. Breaking Changes❗
anchor

This release contains a couple of breaking changes that might affect your project.

We have updated a lot of dependencies, and we are syncing Webiny dependency versions with your project, so they might cause some issues.

4.1. if You Have@editorjs/*Packages in Your Project
anchor

If there are packages starting with @editorjs/* in your project, they will probably produce an error during Typescript compile time.

We have added a code mode in our update script, but if there are any leftovers, please sort them out before deploying. If there are any issues, it is due to the // ts-expect-error comment in the code.

Build Your Project
anchor

After the upgrade, build your project (api, admin and website):

API
Admin UI
Website
All at Once

6. Deploy Your Project
anchor

Proceed by redeploying your Webiny project:

Make sure you deploy the entire system using the command shown above! You have to deploy all apps before using the system. Partial deploys will cause the upgrade to be applied incorrectly.
As stated in the Upgrade Webiny section, we recommend that you first deploy your changes into one of your pre-production environments, like dev or staging.
Learn more about different deployment environments in the CI/CD / Environments key topic.