Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Drop NodeJs 8 support & Require NodeJs >= 10 #3818
This issue is very similar to #3508
It will also bring the benefit to be abe to use more native APIs.
Note that in most cases, it will imply a major version bump
Also, according to the performance comparison by https://blog.kuzzle.io/bluebird-vs-native-vs-async/await-state-of-promises-performances-in-2019 , async / await looks promising on Node.js 10 / 12. We might start to implement #3328 after Nodejs.8 is dropped.
Much like our previous dropping of Node 6, since we're developing solely on master branch (not version branch), we could only drop Node 8 (in the master branch, not yet in npm) when we're sure that there will be no more minor version bump (i.e. 4.x).
My idea is that we can work on anything that doesn't break Node 8 for now (I can't think of any Node 10+ only feature, that is relevant to this repo), even if it requires some minor workaround (e.g. hexojs/hexo-util#117); those workarounds can be removed later once we drop Node 8.
As in timeline, if we're sure there'll be no more 4.x, let say in December, we can even start dropping Node 8 at that time (again, just in repo, not npm). But that's assuming we're not in
Since Node 8 is quite modern, as in it even supports some ES2019 features, I don't expect the transition Node 8 -> 10 to be as drastic as Node 6 -> 8, hopefully it's smoother this time.
A brief check on https://node.green/ shows some features supported in v10.17 but not older; some not supported in v10.3.
Our previous approach was pretty conservative (set v8.6 as minimum even though v8.16 was available), but I suggest this time to set to the latest minor version available. This is to minimize the need to bump again during minor cycle, i.e. to avoid https://github.com/hexojs/hexo/pull/3778/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R81. There is a possibility that we might use v10.17+ features.