0

can anyone help me with query to get a package with minor or patch versions from npm registry.

https://registry.npmjs.org/eslint-scope/7.1.1 - this would give package details for 7.1.1 version. I would like to understand how can we pass ^7.1.1 or ~7.1.1(not 7.1.1) to get minor or patch versions above 7.1.1 if available.

Thanks.

  • Consider utilising the solution provided in [this answer](https://stackoverflow.com/questions/63022138/determine-dependencys-greatest-matching-version-that-exists-on-an-npm-server-fr/63033062#63033062) to determine the version before sending the appropriate query. – RobC Sep 06 '22 at 06:20
  • ... or determine the version using the solution provided in [this answer](https://stackoverflow.com/questions/58773187/how-can-i-get-the-exact-latest-npm-version-from-a-relative-version/58791199#58791199). – RobC Sep 06 '22 at 06:29
  • I would rather like to do it using API instead of using registry package. – Syed Adil Shariq Sep 06 '22 at 16:24

0 Answers0