You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This endpoint is really useful to resolve dependencies based on the current situation of a package (i.e., based on the releases that are currently available). Would it be possible to add a "date" field to simulate dependency resolution for a specific date? To some extent, this means only considering releases of packages that were available up to the given date.
Consider the following example:
Root package is "A" in version 1.0.0 (version is not important here), and has a dependency towards "B";
Dependency constraint for "B" is >=1.0.0;
On 23-07-12 (today), B has two releases: 1.0.0 released on 23-06-01 (last month), 1.0.1 released on 23-07-01 (12 days ago).
Currently, the endpoint would list "B@1.0.1" as a resolved dependency (as 1.0.1 is the latest/highest release satisfying the constraint). What we would like to do is, for example, to know what were the dependencies of A on 23-06-01. In this specific example, the endpoint would return "B@1.0.0" since 1.0.0 is the highest/latest release of B complying with given dependency constraint at that specific point in time (because 1.0.1 was not yet released at that date). So, with a very naive approach, given a date field, the process to resolve dependencies (and transitive dependencies) would consist of applying the current algorithm but only taking into account releases whose release date is <= date.
(Adding @HassanOnsori since he's the one working on this currently ;-))
Funding
You can sponsor this specific effort via a Polar.sh pledge below
We receive the pledge once the issue is completed & verified
Hello @andrew,
This endpoint is really useful to resolve dependencies based on the current situation of a package (i.e., based on the releases that are currently available). Would it be possible to add a "date" field to simulate dependency resolution for a specific date? To some extent, this means only considering releases of packages that were available up to the given date.
Consider the following example:
>=1.0.0;Currently, the endpoint would list "B@1.0.1" as a resolved dependency (as
1.0.1is the latest/highest release satisfying the constraint). What we would like to do is, for example, to know what were the dependencies of A on 23-06-01. In this specific example, the endpoint would return "B@1.0.0" since1.0.0is the highest/latest release of B complying with given dependency constraint at that specific point in time (because1.0.1was not yet released at that date). So, with a very naive approach, given adatefield, the process to resolve dependencies (and transitive dependencies) would consist of applying the current algorithm but only taking into account releases whose release date is<= date.(Adding @HassanOnsori since he's the one working on this currently ;-))
Funding