fix: handle registries missing 'time' metadata during version resolution#1763
fix: handle registries missing 'time' metadata during version resolution#1763onemen wants to merge 3 commits into
Conversation
cd3ab0b to
9c0bb12
Compare
This comment was marked as outdated.
This comment was marked as outdated.
- for 'newest' target return greatest when time is missing - don't skip by cooldown versions with no time - print [missing time] next to the upgraded version
9c0bb12 to
cd3b36c
Compare
do not warn about empty results when every dep is already at the highest version for non-latest --target
|
@raineorshine |
raineorshine
left a comment
There was a problem hiding this comment.
Hi, thanks for the submission.
| const packageInfo = { packageName, currentVersion, options, versions, time } | ||
|
|
||
| const versionResult = isTimeMissing | ||
| ? // we can not search for newest when there are no times, fallback to greatest |
There was a problem hiding this comment.
This is introducing undesirable new semantics. There is no intention for newest to fallback to greatest. We definitely do not want the added complexity and the need to document it in the README.
Please preserve the existing functionality. If time is missing for a given package, then the user should configure the target differently rather than rely on an opaque fallback mechanism.
There was a problem hiding this comment.
Ok
Do you want to print some warning at the bottom of the output for this case?
There was a problem hiding this comment.
No, thanks. Let's keep this focused on the issue. I don't want to open this up to formatting and logging considerations.
close #1746
Summary
This PR addresses an issue where packages from registries lacking
timemetadata were incorrectly skipped during version resolution, even when the cooldown period was set to 0.Changes
timemetadata is unavailable for a package, ensuring that 'newest' targets are correctly identified.timemetadata by appending[missing time]to the output.Motivation
Previously, the absence of
timemetadata triggered askip by cooldowneven when the cooldown was set to zero.Testing
timemetadata are now correctly included in resolution candidates.[missing time]during the upgrade process.Additional Fixes
Testing Improvements, WIP for future PR