1

I don't understand how I can keep the same dependencies version in my package.json when I update all my dependencies by running npm update on different branches.

E.g I have 3 branches: dev staging prod

If today I run npm update on the dev branch and tomorrow I run npm update on the staging branch I can get a diff for certain packages e.g vuetify version 2.5.0 in dev and 2.5.1 in staging.

What is the best way to get the same version in all branches when I run an update on a certain branch ?

John
  • 4,711
  • 9
  • 51
  • 101
  • 2
    how does your `package.json` look like? do you got a prefix on a version number like: `~` or `^`? – wittgenstein Mar 19 '21 at 16:28
  • I have `^` everywhere – John Mar 19 '21 at 16:35
  • 2
    than you should read about the difference and effects what the caret is gonna do. [Hope it will help you](https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json). ps. remove the `^` and you got a fixed version. – wittgenstein Mar 19 '21 at 16:49
  • @wittgenstein Okay thank you for your answer. So in my production package.json I can remove all `^` and I can let the `^` in dev, and when I merge new features in production I set the new dependencies version manuallyif needed – John Mar 22 '21 at 10:58

0 Answers0