-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[ls-remote] only list active and/or maintained versions #3250
Comments
No, because that's a function of time, and that's not something I want nvm's output to depend on. |
Hmm, even if the content of https://nodejs.org/dist/index.tab is also somehow a function of time? |
It's not in the sense that nvm doesn't need to know the current date/time. |
TBH I don't see why we cannot put it behind a flag such as |
Of course we could. However, I don't think it would be a good idea to have anything depend on "the current date", and, if there were any way for a project's preferred node version to change based on the passage of time, then it would be possible for |
Hmm, here the request is only about |
That affects |
Maybe not if it's an option only for I guess this request would be more appealing back when Nowadays it's pretty fast. But in the context of using |
Is your motivation to hasten/shorten the response of |
Well yes, that's it. BTW, and which OP? I guess I'm a bit confused. |
I meant your original post. |
Ahh, I was actually thinking the same, maybe my OP should have been more concise :-) |
Would a |
Yes, that also works! And it has the advantage of being more flexible. Maybe we can even have it as the default? So that in the most common use case we save several keystrokes for all the users :-) Meanwhile those who want the old behavior can use |
I'm not quite comfortable with that level of a breaking change just yet; but perhaps I could also add an env var that sets that value, so it's easy to set your own default? |
That would be really great! Much appreciated 👍 |
What happened?
Currently
nvm ls-remote --lts
literally list all the LTS versions, including the ones are no longer in active and/or maintenance status.What did you expect to happen?
The most common usage of
nvm ls-remote
is to check for new versions, which is only relevant for currently supported versions, namely the ones in active and/or maintenance phases.Therefore it would make sense to allow one to only list the currently supported versions, or to exclude the no longer supported versions.
If the default behavior cannot be changed, it would make sense to introduce certain command line options, such as
--supported
or--no-supported
.And we can use awk to parse the nodejs release schedule json to find supported versions, with
end
date later than the current date, for example:The text was updated successfully, but these errors were encountered: