From f3cb3208c8952a6218d54658cfda85942b9fda42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Fri, 6 Aug 2021 01:18:30 +0800 Subject: [PATCH] Breaking: drop node v10/v13/v15 (fixes #14023) (#14592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Breaking: drop node v10/v13 (fixes #14023) * Update .github/workflows/ci.yml Co-authored-by: Brandon Mills * Update relative-module-resolver.js * Update package.json Co-authored-by: Michaël De Boey * Update ci.yml * Update README.md * Update getting-started.md * chore: fs-teardown ^0.1.3 Co-authored-by: Brandon Mills Co-authored-by: Michaël De Boey --- .github/workflows/ci.yml | 2 +- README.md | 2 +- docs/user-guide/getting-started.md | 2 +- lib/shared/relative-module-resolver.js | 9 +-------- package.json | 4 ++-- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1972878e94..fc3d1e701f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16.x, 15.x, 14.x, 13.x, 12.x, 10.x, "10.12.0"] + node: [16.x, 14.x, 12.x, "12.22.0"] include: - os: windows-latest node: "12.x" diff --git a/README.md b/README.md index d1fd5ff170e..a429bdf848b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J ## Installation and Usage -Prerequisites: [Node.js](https://nodejs.org/) (`^10.12.0`, or `>=12.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) +Prerequisites: [Node.js](https://nodejs.org/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) You can install ESLint using npm: diff --git a/docs/user-guide/getting-started.md b/docs/user-guide/getting-started.md index 3b28a91a2f6..3c9633bb315 100644 --- a/docs/user-guide/getting-started.md +++ b/docs/user-guide/getting-started.md @@ -8,7 +8,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J ## Installation and Usage -Prerequisites: [Node.js](https://nodejs.org/en/) (`^10.12.0`, or `>=12.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) +Prerequisites: [Node.js](https://nodejs.org/en/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) You can install ESLint using npm or yarn: diff --git a/lib/shared/relative-module-resolver.js b/lib/shared/relative-module-resolver.js index cd743f3795b..fcc2ac41bb3 100644 --- a/lib/shared/relative-module-resolver.js +++ b/lib/shared/relative-module-resolver.js @@ -17,14 +17,7 @@ "use strict"; -const Module = require("module"); - -/* - * `Module.createRequire` is added in v12.2.0. It supports URL as well. - * We only support the case where the argument is a filepath, not a URL. - */ -// eslint-disable-next-line node/no-unsupported-features/node-builtins, node/no-deprecated-api -const createRequire = Module.createRequire || Module.createRequireFromPath; +const { createRequire } = require("module"); module.exports = { diff --git a/package.json b/package.json index 1845500824c..90609f160a3 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "eslint-release": "^2.0.0", "eslump": "^3.0.0", "esprima": "^4.0.1", - "fs-teardown": "0.1.1", + "fs-teardown": "^0.1.3", "glob": "^7.1.6", "jsdoc": "^3.5.5", "karma": "^6.1.1", @@ -141,6 +141,6 @@ ], "license": "MIT", "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }