Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 2.51 KB

README.md

File metadata and controls

60 lines (36 loc) · 2.51 KB
  • Start Date: 2019-10-13
  • RFC PR: #44
  • Authors: Toru Nagashima (@mysticatea)

Drop supports for Node.js 8.x and 11.x

Summary

This RFC drops supports for Node.js 8.x and 11.x because of end-of-life. (See nodejs/release to check the release schedule of Node.js)

Motivation

We get the capability to use new features and syntaxes by dropping the support for end-of-life versions of Node.js. Especially, RFC40 wants to use async iteration, but Node.js 8.x doesn't support that syntax.

Detailed Design

This proposal updates the engines field of our package.json (and updates our CI scripts).

   "engines": {
-    "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
+    "node": "^10.12.0 || >=12.0.0"
   }

Why is it ^10.12.0?

Resolution: We will choose Node version support based on the lowest point release supporting our desired features.

2019-March-14 ESLint TSC Meeting Notes: Decide how to manage support for minor versions of Node

Therefore, we should check the added features in Node.js 10.x.

I found two features we want to use.

  • 10.10.0 ... the withFileTypes option of fs.readdir/fs.readdirSync. We can reduce the calls of fs.statSync in our FileEnumerator class with this option. It may improve performance (especially on Windows).
  • 10.12.0 ... module.createRequireFromPath(filename) function. We can remove our polyfill with this version.

Documentation

We need write an entry in the migration guide because this is a breaking change.

Drawbacks

Users lose the capability to run ESLint on old Node.js. They may have to update their CI scripts.

Backwards Compatibility Analysis

This is a breaking change clearly.

Users lose the capability to run ESLint on old Node.js. They may have to update their CI scripts.

Alternatives

N/A.

Related Discussions