1

After running yarn upgrade per the usage docs, I get this output:

enter image description here

and it appears that I have been updated to

socket.io@2.1.1

However when I look at my package.json file I have this line

"socket.io": "^2.0.4",

Is there a way to verify which version I have installed and also is there a way to resolve this seeming discrepancy?

Also, there is this strange line in the yarn.lock file:

socket.io@^2.0.4:
  version "2.1.1"

How can I understand what is going on here as these 3 sources seem to say different things.

tk421
  • 5,775
  • 6
  • 23
  • 34

1 Answers1

1

Run yarn list --pattern socket.io to verify currently installed version.

"socket.io": "^2.0.4" in package.json means version 2.0.4 or any newer in 2.x.x range.

socket.io@^2.0.4: version "2.1.1" in yarn.lock means that ^2.0.4 was satisfied by installing version 2.1.1 (is newer than 2.0.4 and in the same time is in 2.x.x range).

See What's the difference between tilde(~) and caret(^) in package.json?

PeterDanis
  • 8,210
  • 2
  • 13
  • 23