update minimum version of node from 4.0.0 to 6.10.3#9537
Conversation
According http://node.green/ node has good support of ES6 since 6.10.3LTS (except the ES6 modules :-(). Updating the minimum version of node allows us to use ES6 features to simplify our gulp and server code.
|
Please ping slack when this is merged. |
|
i believe @jridgewell said we should keep on supporting node 4+ |
|
We should revert this. Most ES6 features are supported in Node v4, you just need to put |
This reverts commit e363fae.
|
@jridgewell what's the benefit of keeping on an old version? |
|
People use it. |
|
For a healthier open source environment, we should advocate new versions. If I were the node team, I don't want to maintain old versions forever just because some people are using it. And most likely those people are just lack of a motivation to spend little time for an in-place upgrade. |
It's in LTS for another year. After that, we drop it.
Or they're using the version that matches their prod environment. |
|
I still believe 6.x has better support on ES6. And I don't see a real reason here to revert back. |
I'm not arguing that. v4 has the majority features.
This shit. We're an open source project actively working to get new people to sign up. Any barrier to that (like build steps that fail for no reason) makes the project worse. |
Isn't that a good example why we want 6.x? So "let" will be well supported. |
|
You just need to put |
As you said, that IS a "barrier" (a build steps failed for no reason). So this PR fixed that problem, it will either build successfully (if your node is installed within a year), or failed with a meaningful error message asking you to upgrade your 2 years old node binary. |
|
There's a very big difference between "my freshly installed clone fails to build" and "my PR fails to build". One turns the contributor off completely, the other can be caught during review. |
|
Lets revert. I agree with @jridgewell. We write so little code that runs in node that a little inconvenience is fine. |
|
@cramforce I hated to switch between ES6 and ES5 in the same repo. My IDE just can't get the linter right. I remember once @erwinmombay also hoped we can have ES6 compatible gulp code so we can share code between the two (forgot the exact details). Meanwhile, we will be definitely writing more code in node once we invest more into integration tests. |
|
Did you try the |
|
We can still write in ES6:
|
To close this conversation, I wanted to point out that our node code is right now using arrow functions without the "use strict". Which means your "freshly installed clone fails" if you're on old node. This PR at least fixed that by giving a right error message. I don't have an older version in any of my machines now, if @jridgewell is sure about "use strict" will do the job, please add it in your revert PR and tested under old version. |
|
|
|
OK #9578 this is all i want. |
According http://node.green/ node has good support of ES6 since 6.10.3LTS (except the ES6 modules :-().
Updating the minimum version of node allows us to use ES6 features to simplify our gulp and server code.