Closed sonicdoe closed 7 years ago
And to which version is node
mapped? Latest? As you can see in this line, stable
for instance is marked as deprecated. So actually I'm more in favour of marking these versions as not supported because it's not explicit about which versions it tests. Not really sure about it though.
@sindresorhus any remarks?
stable
was deprecated because it “only truly applies to node v0.12 and earlier”. node
always maps to the latest version of Node.js.
I am a bit more in favor of ignoring the node
alias as opposed to marking it as an error because it is useful to always test against the latest Node.js version. However, I can understand if users should be urged to keep their .travis.yml
up to date.
I agree node
should just be ignored. It can be useful sometimes when you just want the latest Node.js version. Example.
Good point. @sonicdoe do you happen to have a reference of unstable
being part of Travis? Can't seem to find it.
Let's ignore node
. which seems it was already ignored but somehow fails on some other scenarios which aren't tested. All the other should be moved to the deprecated versions array, which only is the unstable
version. But I want proof first of that alias to exist.
In order to ignore node
decently, I'd suggest just using filter
on the versions array so we don't have to take that one into account further down in the code.
These values are passed on to
nvm
; newer releases not shown above may be used ifnvm
recognizes them.
nvm itself lists node
, iojs
, stable
, and unstable
as special default aliases. I have also just realized that there are LTS aliases. Given that these are similar to node
, I have added them to the ignore array, too.
I have updated this pull request and opened another one deprecating unstable
.
I have updated this pull request and opened another one deprecating unstable.
Just deprecate unstable
in this PR instead of a new one.
Done.
Awesome, great work @sonicdoe! I created a follow-up issue #66 for an extra improvement on this rule.
When running clinton against a package with an
engines
field andnode
in.travis.yml
it crashes withTypeError: Invalid Version: node.0.0
. A similar error was already reported in #46.With this change it now skips all nvm aliases in
isSupported()
. It still crashes when using theunstable
alias but I suggest resolving this by addingunstable
to the list of deprecated versions.