Relates elastic/kibana#256700 (comment)
While adding support for package dependencies, the kibana Fleet plugin queries all available versions of a package (with the all=true param), to find the latest package version that satisfies a set of version constraints (dependencies required by installed or installable packages).
This is not very efficient, as a package can have many published versions, and the list of all versions will keep growing with time.
To optimise this query, package-registry could support a new search parameter, that would accept a list of semver conditions and return the latest package that satisfies all conditions.
For example:
https://epr.elastic.co/search?package=apache_otel&version_constraints=">=0.1.0,^0.2.0"