From 54e2b8337886f4c4020ade2ad2a4e6de140715e1 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: Thu, 8 Nov 2018 13:16:31 +0800 Subject: [PATCH] Upgrade: require-uncached renamed to import-fresh --- lib/config/config-file.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config/config-file.js b/lib/config/config-file.js index d09b3668846..dde79cb40c8 100644 --- a/lib/config/config-file.js +++ b/lib/config/config-file.js @@ -18,7 +18,7 @@ const fs = require("fs"), pathIsInside = require("path-is-inside"), stripComments = require("strip-json-comments"), stringify = require("json-stable-stringify-without-jsonify"), - requireUncached = require("require-uncached"); + importFresh = require("import-fresh"); const debug = require("debug")("eslint:config-file"); @@ -156,7 +156,7 @@ function loadLegacyConfigFile(filePath) { function loadJSConfigFile(filePath) { debug(`Loading JS config file: ${filePath}`); try { - return requireUncached(filePath); + return importFresh(filePath); } catch (e) { debug(`Error reading JavaScript file: ${filePath}`); e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; diff --git a/package.json b/package.json index c2f7626dca6..259c2ea9578 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "pluralize": "^7.0.0", "progress": "^2.0.0", "regexpp": "^2.0.1", - "require-uncached": "^1.0.3", + "import-fresh": "^2.0.0", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1",