-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add option to ignore future releases #39
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost think the now flag should work like this by default, but that would be a major. Maybe we can swap this to be opposite in a future major?
tbf the situation with 18.20.5 feels very very uncommon - there's usually not much of a delay at all between updating the tab file and uploading the artifacts. i'd think a better approach than an option like this is to filter out versions that don't have files present on the server, in |
Does nodejs.org currently provide an endpoint that could tell us that with a single request (e.g. extended version of dist/index.json)? Otherwise it could be a tad inefficient to determine this, depending on how many aliases/versions we're evaluating |
You'd only need to check versions that were released within the past 24 hours, that were also the latest version of the release line. |
That's fair, that wouldn't be so bad. Really though doing anything within |
Indeed - tbh I'm not sure it's worth working around it with anything, including this PR :-) |
closing, as the v18.20.5 dist issue is resolved 😅 if this problem resurfaces again, a workaround could be to bypass cloudflare altogether and download binaries from https://direct.nodejs.org/dist/ (assuming that's supported) |
I dislike closing this. I understand the feedback and saying it is not really a problem from the perspective of today's issue, but my point stands that I think this behavior is probably more what users might expect with the
I am following up with this here: https://openjs-foundation.slack.com/archives/CK9Q4MB53/p1731450996448959 EDIT: I didn't re-open although I could, but I wanted to just say that so @jenseng could decide (as it is your PR), but that is personally what I would prefer we do so it does not appear "decided" when we only just had a convo today and not many other folks have had a chance to comment. Typically I would only close something this quickly if it was CLEARLY invalid or never going to happen, which I don't think we achieved consensus on in the above convo. |
Sure, although my immediate need is resolved, I'm happy to leave this open for further feedback/discussion. I also agree that in the long term the |
i probably didn't understand what the PR does. certainly if an explicit "current time" timestamp is passed, releases from after it should simply not appear to exist, just like npm's |
Yep, I think my initial use for this was more for testing and I coupled it with input which worked with that design. But in hind sight I think this new approach is a much better api, especially for end users (not just testing). |
Add an
ignoreFutureReleases
flag to ignore releases with dates afternow
. This is useful when specifying anow
in the past (e.g. to ignore an in-flight release, as is currently the case withv18.20.5
)Alternatively we could just update the
now
logic to always do this, but that would be a breaking change and half the tests would need to be reworked 😆 😭