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 ?

4
  • 2
    how does your package.json look like? do you got a prefix on a version number like: ~ or ^? Commented Mar 19, 2021 at 16:28
  • I have ^ everywhere Commented Mar 19, 2021 at 16:35
  • 2
    than you should read about the difference and effects what the caret is gonna do. Hope it will help you. ps. remove the ^ and you got a fixed version. Commented Mar 19, 2021 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 Commented Mar 22, 2021 at 10:58

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.