Show HN: Test your JavaScript modules simultaneously in 32 different versions of Node.js
victorbjelkholm.github.io
victorbjelkholm.github.io
Right now, the tool also works across any language where there is docker images with versions, not just for JavaScript/NodeJS. It's enough with having a Dockerfile with $VERSION (that will be replaced by the tool) and changing the test command. I will make this easier in the future.
Thanks for taking a look and please let me know what you think about it.
The first is that nvm is nodejs specific and since I knew I wanted it to eventually work with multiple languages, nvm is out.
Second is that docker has a API I can work with (via Dockerode in this case), makes it easier to use/debug and such.
Third is the easy of isolation. It's basically what docker is about while nvm is more for just managing versions.
I still use nvm locally, when developing. But when I want to rapidly test in multiple versions, I use docker with autochecker.
$ nvm ls-remote | wc -l
303
Most of those are patch releases. There are 47 minor releases and 6 major releases: $ nvm ls-remote | grep -oE 'v\d+\.\d+' | uniq | wc -l
47
$ nvm ls-remote | grep -oE 'v\d+' | uniq | wc -l
6
Most language implementations probably have similar number of releases.https://clojure.org/community/downloads_older http://www.scala-lang.org/download/all.html https://www.python.org/downloads/
etc...
Python and OCaml have had 3 each. Libc has had 6. 32 for something that's been around less than a decade is a bit excessive.
Are all these 32 actually backwards-incompatible?
Testing across 32 versions is probably very overkill for most people though.
Testing across all 32 (or 303) versions is still going to be useful for catching bugs and quirks between minor versions (as opposed to deliberate, documented breaking API changes)
Node uses semantic versioning [0] and the current release is 5.10.z
The breaking changes can be found here [1] By searching for `SEMVER-MAJOR`. Some seem rather unavoidable for progress (updating dependencies...) and some are for things that have been deprecated. I'm not an expert but it looks like there are several security related changes as well?
In my eyes a backwards incompatible change that breaks a feature that has been deprecated for years or is insecure is a change worth making. Stability is bad if it means remaining insecure.
[1] https://github.com/nodejs/node/blob/v5.10.1/CHANGELOG.md
These versions include a lot of minor and patch releases. Chances are most code will run just fine on most of these versions, but if you can automate testing them all then why not do it?
...actually that does sound pretty 60s
I know that other languages also have issues in this regard -- but for more mature languages it seems to be more an exception than than the rule (restricted to certain platforms of subsystems, say).
Yeah, it was needed by myself as well, so I had to scratch my own itch for a while.
As a small update, I've now made autochecker completely language agnostic, so you can test basically anything you can put in a docker container. There is some examples on how to use this here: https://github.com/VictorBjelkholm/autochecker/tree/master/e...
Again, thank you all for taking the time to give feedback, I'm forever grateful to the HN community.
Someone else is working on something like that: https://twitter.com/bahmutov/status/720316267173810176
An aside - over the last few months I began running my containers on two popular CI services and have had some serious pain. I have a slight feeling you will regret the words: "works well with CI as well!"
Maybe I should be more careful with my words in the future...
It however doesn't execute the containers simultaneously, that is really cool!
Would appreciate that a lot and thanks for the feedback.
1) never change apis even if you were wrong or you have more opportunities or 2) know everything beforehand and implement the api perfect
Sometimes, for you to focus on other (what for you is important), you need to throw together some rube goldberg thing to be able to move forward.
We sacrificed that for syntactic sugar.
If a module is heavily using ES6 and you want to run it on an older runtime you're just toast.
So ES6 is not the problem.
The problem with nostalgia is that the past we so fondly remember never existed.
Most node developers seem to not use a debugger, but I think that's a huge productivity sacrifice.