Skip to content

Commit

Permalink
Upgrade: require-uncached renamed to import-fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Nov 8, 2018
1 parent dcc6233 commit 54e2b83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/config/config-file.js
Expand Up @@ -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");

Expand Down Expand Up @@ -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}`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit 54e2b83

Please sign in to comment.