1 year ago

#317477

test-img

Bo Yuan

why ^ resolved unexpectedly?

according to the following rule,

^1.2.3  is >=1.2.3 <2.0.0    
^0.2.3  is >=0.2.3 <0.3.0   (0.x.x is special)
^0.0.1  is =0.0.1   (0.0.x is special)
^1.2    is >=1.2.0 <2.0.0   (like ^1.2.0)

I am wondering why there is the difference as below between Semver ^12.1.0 and ^12.1.1 in my yarn.lock file? ^12.1.0 is resolved to 12.1.1, meanwhile ^12.1.1 is resolved to 12.3.0 (the latest version).


react-native-svg@^12.1.0:
  version "12.1.1"
  resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-12.1.1.tgz#5f292410b8bcc07bbc52b2da7ceb22caf5bcaaee"
  integrity sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q==
  dependencies:
    css-select "^2.1.0"
    css-tree "^1.0.0-alpha.39"

react-native-svg@^12.1.1:
  version "12.3.0"
  resolved "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.3.0.tgz#40f657c5d1ee366df23f3ec8dae76fd276b86248"
  integrity sha512-ESG1g1j7/WLD7X3XRFTQHVv0r6DpbHNNcdusngAODIxG88wpTWUZkhcM3A2HJTb+BbXTFDamHv7FwtRKWQ/ALg==
  dependencies:
    css-select "^4.2.1"
    css-tree "^1.0.0-alpha.39"

any help would be appreciated, thanks.

semantic-versioning

0 Answers

Your Answer

Accepted video resources