Skip to content
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

Drop NodeJs 8 support & Require NodeJs >= 10 #3818

Open
tomap opened this issue Oct 29, 2019 · 3 comments
Open

Drop NodeJs 8 support & Require NodeJs >= 10 #3818

tomap opened this issue Oct 29, 2019 · 3 comments

Comments

@tomap
Copy link
Contributor

@tomap tomap commented Oct 29, 2019

This issue is very similar to #3508
We will need to drop NodeJs 8 Support as it reached EOL on December 31st
See https://github.com/nodejs/Release#release-schedule

It will also bring the benefit to be abe to use more native APIs.
Here is a list of issues/PR pending NodeJs 8 drop:

Note that in most cases, it will imply a major version bump
We also will need to check which version to use (10.0, 10.1, ...?)

@SukkaW

This comment has been minimized.

Copy link
Member

@SukkaW SukkaW commented Oct 29, 2019

hexojs/hexo-util#114

After Node.js 8 is dropped. we can mitigate decodeURL(str) to newest whatwg url api, and remove const { URL } = require('url'); from mitigated helper.

@SukkaW

This comment has been minimized.

Copy link
Member

@SukkaW SukkaW commented Oct 29, 2019

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.

image
image

@curbengh

This comment has been minimized.

Copy link
Contributor

@curbengh curbengh commented Nov 2, 2019

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 🎅 mood...

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.

We also will need to check which version to use (10.0, 10.1, ...?)

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.

@curbengh curbengh mentioned this issue Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.