For instance, say I have "foo: ^1.0.0" listed in my package.json and that project's released versions are [1.0.0, 1.1.0, 1.2.0, 2.0.0]. I want to find out what ^1.0.0 resolves to without installing or looking it up manually. Does a tool for this exist? I would expect it to be something like npm resolve foo@^1.0.0
Asked
Active
Viewed 39 times
0

Ken White
- 123,280
- 14
- 225
- 444

Matthematic
- 11
-
Does this answer your question? [How can I get the exact latest npm version from a relative version?](https://stackoverflow.com/questions/58773187/how-can-i-get-the-exact-latest-npm-version-from-a-relative-version) – RobC Nov 01 '21 at 12:37
1 Answers
0
Yes there is!
If you're using npm use view
npm view foo@^1.0.0
Otherwise you could use yarn
with info
yarn info foo@^1.0.0
And in case you want even better statistics check out bundlephobia. It gives size estimations for the given version as well as the others and also an analysis of the exports.

Japsz
- 785
- 6
- 14