-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add isSupported, isMaintenance, isSecurity, and modules #41
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
Conversation
|
What happens if node changes its release process and these start meaning different things? It might be better to make this a single string that people can check for, since they're all mutually exclusive |
That would necessitate a major version for this package. Now that you mention it, I think we should explicitly state that this package includes Node.js' release cadence and meaning as part of it's semver contract.
They are not mutually exclusive, right? This is the current results on this PR: |
|
ah, ok - so of those 3 then, 2 of them are constant over time, but "is supported" changes with time. Perhaps it should require providing a date? |
Actually none of them are. There is 6 months after it enters
And then it stays
I think the use case is different for how you would use combinations of these and a date. For example, I often use the cli (like in that comment) just to run a quick check on specific things. For example when is the maintenance date: So for this use case I am saying "what is the state now, and show me the dates as of now for when they plan to enter and leave maintenance". I think that |
|
But a specific version number is always, or never, LTS - v24.8.0 is never LTS, because it's the v24 release line, not that particular version, that enters LTS. |
|
Valid point, but the use case for this package is to get a specific version(s) based on certain qualities. It has no concept of "release lines", only "versions" and "aliases" (maybe better called "version sets" or something). This is why the aliases mean "head of line". But for these flags on specific versions, they really mean "are part of the set of an LTS line". Does that make sense? So I could see this argument being a good one for changeing in 1.0.0 (aka not this PR since it would be breaking) such that:
Either way, that is not how this was originally written and my hope was to land this change on the pre-1.0 so that we could at least call the this "feature complete" for what we know about before we go 1.0. Are you alright with this, and then engaging on an api change to address this for 1.x? |
|
You can land whatever you like :-) i'm not blocking. But, for a more concrete example: v22.10.0 is not LTS and never will be. v22.11.0 is LTS, as is v22.19.0, and both forever will be. All v22 versions are "supported" until Jod goes EOL, and soon (October or November, I think?) all v22 versions will be supported, LTS, and maintenance. I don't think it's correct to use these terms if the above does not hold, and the same applies to all post-v3 versions. iow, "LTS" is a fixed status for a given version number; "maintenance" and "supported" (ie, "active LTS") are time-based properties. |
|
Ah, ok thanks for the example. Yeah, good point and I think this is what we should land for 1.x. Again, only because that would be a breaking change and despite it being pre-1.0 I still am trying not to ship breaking changes if possible. I guess basically with this in mind we are saying that the I for sure need to refactor the logic that sorts things into the aliases anyway, so if you could maybe give me a ✅ on this one I can then move on to fixing this for the 1.x branch? |
Closes #19.
Adds new state flags and
modulesversion. Also did a small refactor to simplify the logic in preparation for a refactor to makelatestOfMajorand #39 work more correctly in the1.0.0branch after I rebase on top of this.