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

Make sure to check out the 5.41.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.41.1.

2. Run the Upgrade Command
anchor

The next step is to run the project upgrade:

3. Breaking Changes❗
anchor

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

3.1 Updated Node.js to the Version 20
anchor

We have updated the Node.js version, which runs the code which gets deployed, to v20.

Users should update their development machines and CI deployments to use Node.js v20.

Node.js v22 is not supported as AWS Lambda runtime, so we did not go that far yet. As soon as AWS Lambda supports Node.js v22, we will update the runtime to that version, and users will get notified about it in the upgrade docs.

We have also updated the engines field in the package.json file to reflect this change.

3.2 Updated Typescript to the Version 4.9.5
anchor

We have updated the Typescript version to v4.9.5.

We also removed the typescript package from the package.json resolutions, so we are not forcing all the packages to use the same version.

If you notice any issues with your project because of that, feel free to add version 4.9.5 into the resolutions field in your package.json file.

Check and Update Your Code
Users should check their code for the potential breaking changes and update their code accordingly.

Unfortunately, updating the Typescript to the v5+ is a bit problematic because we need to change our build process. It will probably be done for Webiny v5.42.0 release.

3.3 Multiple Roles and Teams Assignments - Changes on theIdentityInterface
anchor

With the introduction of the Multiple Roles and Teams Assignments (#4198), we’ve done the following changes to the Identityexternal link interface:

  • group property was deprecated, users should use groups instead
  • team property was deprecated, users should use teams instead

These changes were done because a Webiny user can now be assigned to multiple roles and teams. Which is also why the new properties accept an array of strings (instead of a single string, as it was before).

Note that the outlined changes are essentially only relevant for users who are using custom IdP implementations, like Okta or Auth0. This is because the Identityexternal link interface and its group and team properties are only utilized in the context of custom IdP implementations. So, in case you’re using a custom IdP implementation, make sure to update your code accordingly. For updated code examples, revisit the Okta or Auth0 integration articles.

Note that if you continue using the old group and team properties, your code will still work. However, we recommend updating your code to use the new groups and teams properties, as the old properties will be removed in a future release.

4. 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.