Yarn update - is the new version saved?

Say I have a file package.jsonin an existing project. I have there "some-package": "^1.0-01",, however I know that the latest version1.0-02

So, I do yarn upgrade. However, package.jsonit is not updated and still refers to the version -01. However, the file yarn.lockshows this:

some-package@^1.0-01:
  version "1.0-02"

Is this the expected behavior? When someone else executes a command yarn, which version will they receive. If they get the latest version, isn't it misleading to show -01in package.json?

+4
source share
1 answer

According to the documentation here ,

yarn renewal

, package.json. . .

, package.json

, package.json , , upgrade , , ^1.0-01 1.0-02 package.json yarn.lock.

, yarn.lock. check

yarn check

?

+4

Source: https://habr.com/ru/post/1657533/


All Articles