- Run
yarn outdated
to check what all dependencies needs upgrading. - Use command
yarn upgrade <package-name> --latest
to upgrade dependency. - The dependencies need to be upgraded in batches via multiple PRs for ease of review and testing.
- While making a major version change (
X.Y.Z
toX+1.Y.Z
), the changelog (from the concerned library) should be added to the PR description for reviewing the breaking changes. - The core dependencies should preferably be upgraded first. The suggested sequence is: (React -> Storybook -> Webpack -> Typescript -> ESLint -> Remaining).
- All the dependencies related to a particular dependency should be clubbed together. For ex:
react
,@react/types
,react-dom
,@types/react-dom
should be clubbed together. - The standalone dependencies can be clubbed together in batches of 3 or less after the core dependencies have been upgraded.
- To upgrade all dependencies related to Storybook. Simply run
npx storybook@latest upgrade
. - Avoid upgrading anything that is related to babel. It automatically gets upgraded to the version required while upgrading Storybook.
- To upgrade the dependencies placed in resolutions, change the version of the dependency to the desired version manually and then simply run
yarn
. - Always run the following commands before raising a PR and try fixing the errors that arise (if any). If unsuccessful, raise an issue for the same.
yarn
yarn lint
yarn compile
yarn build