Updating Sage 9 DevDependencies

Since Sage 9 went out of beta I decided to check whether I have any outdated project dependencies using yarn outdated, and noticed that I had several updates available, which I installed using yarn upgrade-interactive.

Now that all my project dependencies are up to date I was wondering if it is ‘safe’ to update the following development dependencies to the latest version, and if so what the best way is to go about updating them.

Here is a list of my outdated development dependencies:


Any advice is appreciated. :ok_hand:

Hey @BSpoon - I’m definitely not an expert in this area, so take my thoughts with a grain of salt. Just for simplicity, my personal approach in the past has been to not update the dev dependencies bundled with Sage unless I run into a problem.

That said, if I were going to give this a try, I’d do something like this:

  1. Make sure you have your theme under version control (or otherwise backed up). Specifically, make sure any lock files you have are included (e.g., yarn.lock and/or package-lock.json). Those files describe exactly what versions of what packages you currently have installed. If something goes wrong after you update your dev dependencies, you should be able to revert to the previous version your lock files and use that to reinstall the previous version of the dependencies, bringing you back to a functioning state.
  2. Compare the new and current version number of each package. If you’re moving from x.x.1 to x.x.2, or even x.1.x to x.2.x, you’re probably safe to update. If you’re moving from 1.x.x to 2.x.x, you should look into the changes between 1.x and 2.x to see how it might impact you, and decide to proceed or not.
  3. Perform the update and test. You could optionally try to split up the updates so that if something goes wrong there are fewer changes that might be the cause.

Thank you very much @mmirus! This is very helpful. :fist_right::fist_left:

1 Like