Closed hueniverse closed 5 years ago
I've been using 4
. Keep in mind that Travis uses nvm to install the appropriate node versions, so you can use whatever nvm accepts.
I think the answer mostly depends on the minimal node version that should be supported by modules. According to semver, minor versions may add functionality in a backwards-compatible manner. This means that the code which works on 4.0 will also work on 4.1, but the code which works on 4.1 may not work on 4.0 if it uses functionality that was added in 4.1.
So using 4 or 4.1 alone is not enough. 4 install the latest 4.x.x version, 4.1 installs the latest 4.1.x. Nothing guarantees that the code also runs on 4.0.x. Someone may accidentally use a feature in the code which was added in a minor version and it won't be caught by the test runner.
If the plan is to support all node versions starting from 4.0.0, then I think we should always run tests on the minimal minor version, which is 4.0. We can then add either 4 or 4.1 to make sure the code also works on the latest version. I see two options:
Run code on the minimal and the latest. Maintaining .travis.yml is easy this way.
node_js:
- 0.10
- 4.0
- 4
Run code on each minor version starting from minimal. This ensures that the code works on all versions, but we would constantly need to update .travis.yml which is not an easy task given the number of modules the hapijs organization has.
node_js:
- 0.10
- 4.0
- 4.1
I think the first version should be enough. It the code works on the minimal and the latest version, then it most likely will work on all versions between them.
However if there is no such minimal version requirement (the module should only work with the latest 4.x.x version), then using 4 in .travis.yml is enough.
Makes sense to me. +1
I agree with having "4.0" and "4" listed. Oldest and newest makes perfect sense.
Should it be 4 or 4.1 as the baseline since 4.1 is already out.
I guess it's just a question of what we want to support. If it's any 4.x release, then I think testing with "4.0" and "4.x" makes sense, since that covers the oldest possible 4.0 release, as well as the newest.
That makes sense to me.
4 and 4.0 it is.
That's good for now but I think once 4 LTS is released, we should not support 4.0 anymore, just the LTS.
Now the LTS is out shouldn't we revisit those versions and just support "4" and latest ("node" in nvm terms) ?
Probably.
yeah.. agreed, we should check LTS too. at least until we start using features that don't exist in LTS
I changed hapi to "4"
and "node"
.
What's the right way to do this now? 4? 4.x? 4.1?