question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

drop supporting Node.js 4

See original GitHub issue

Node.js 4 became more legacy and outdated. It’s in maintenance mode since April 2017, which will end in April 2018.

It will give our codebase and us a breath of fresh air. There are a bunch of awesome stuff starting Node.js 6, which are missing in Node.js 4 :

  • default function parameters
  • rest parameters
  • spread operator
  • destructuring
  • no need for 'use strict' to use let, const.

since this will be a breaking change, when can we make this change?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

7reactions
not-an-aardvarkcommented, Mar 29, 2018

My opinion is that we should drop support for Node 7, and support ^6.14.0, ^8.11.0, and >=9.10.0 (currently the latest versions on each release line). There are a few reasons for this:

  • The latest version of Node 6 has some features that are neither available on Node 7 nor on earlier versions of Node 6. It would be nice if we could use those features if we need them during the ESLint v5.x lifespan.
  • Earlier versions of Node 6 (as well as 8, 9, and the latest version of Node 7) have known security vulnerabilities. As a result, I think most users will be using the latest version on their release line (e.g. 6.14.0), or they should be able to upgrade without too much difficulty. It seems unnecessary to prevent ourselves from using a set of features just to accommodate users who are using versions of Node with security vulnerabilities.
  • Earlier versions of Node have known bugs which are fixed in later versions. If we officially supported outdated versions, then ostensibly we might need to work around a bug so that ESLint would work on versions of Node with that bug. This seems silly; a better solution would be for the user to upgrade their Node version so that the bug is fixed.
  • Due to the way Travis works, we only run our tests on the latest version from each release line anyway. Even if we officially support Node 6.0.0, it will be difficult to make sure ESLint continues to work on that version without remembering when each Node feature was introduced.

I looked through Node’s changelogs and created a list of features that have been added to recent versions of the Node 6 release line. I omitted some features (e.g. relating to cryptography) which seem like they are unlikely to be used by ESLint in the future.

Features in Node 6.13.0 which are not in Node 7
  • console.count()
  • console.clear()
  • Module.builtinModules
  • process.ppid
  • assert.fail() can take one or two arguments
Features in Node 6.13.0 which are not in Node 6.0.0
  • (all of the features from the above list)
  • NODE_NO_WARNINGS environment variable
  • util.inspect supports %i and %f specifiers
  • util.inspect.custom symbol
  • ES6 iterator closing
  • ES6 ArrayBuffers have correct prototype chains
  • Symbol.species, Symbol.hasInstance, Symbol.match on strings
  • Function .name property for object methods
  • RegExp.prototype.flags
  • Array iterators have the correct prototype chain
  • Correct method behavior for subclassed arrays

I don’t think we have an immediate need for any of these features, but I can think of many plausible future scenarios where they would be nice to have.

2reactions
not-an-aardvarkcommented, Apr 12, 2018

In today’s TSC meeting, the TSC decided that we will support Node ^6.14.0 || ^8.10.0 || >=9.10.0 in ESLint 5.0. (We decided to support Node 8.10 rather than starting support at Node 8.11 so that ESLint can be used on AWS Lambda.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Drop support for Node.js < 12 · Issue #4164 · rollup ... - GitHub
If we drop support for Node.js < 12, we can update the rollup configuration loader to use the Node.js native loader entirely, effectively...
Read more >
Snyk CLI drops support for Node.js 4 (Argon)
js 4 support in the Snyk CLI. We plan to roll out a new version in April, where the CLI will no longer...
Read more >
Node v16.17.0 (LTS)
Node.js ESM Loader hooks now support multiple custom loaders, and composition is achieved via "chaining": foo-loader calls bar-loader ...
Read more >
Build Plugins: Dropping support for Node.js 12 - Features
We will no longer support Node.js 12 for Build Plugins starting on December 5th, 2022. If you have any questions, please let us...
Read more >
Update the Node.js agent | New Relic Documentation
How to update your APM Node.js agent, and notes on EOL support for early agent versions. ... BREAKING: Dropped Node.js 12 support. For...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found