projects
/
dotfiles
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
massive update, probably broken
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
node_modules
/
coc-prettier
/
node_modules
/
eslint
/
lib
/
shared
/
deprecation-warnings.js
diff --git
a/.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/shared/deprecation-warnings.js
b/.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/shared/deprecation-warnings.js
index 1438eaa69bff86c383d9f4f413050132fcbc7cac..1a0501ab057a1123c3ae956b7372bf2771bd7679 100644
(file)
--- a/
.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/shared/deprecation-warnings.js
+++ b/
.config/coc/extensions/node_modules/coc-prettier/node_modules/eslint/lib/shared/deprecation-warnings.js
@@
-9,7
+9,6
@@
//------------------------------------------------------------------------------
const path = require("path");
//------------------------------------------------------------------------------
const path = require("path");
-const lodash = require("lodash");
//------------------------------------------------------------------------------
// Private
//------------------------------------------------------------------------------
// Private
@@
-28,6
+27,8
@@
const deprecationWarningMessages = {
"projects in order to avoid loading '~/.eslintrc.*' accidentally."
};
"projects in order to avoid loading '~/.eslintrc.*' accidentally."
};
+const sourceFileErrorCache = new Set();
+
/**
* Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
* for each unique file path, but repeated invocations with the same file path have no effect.
/**
* Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
* for each unique file path, but repeated invocations with the same file path have no effect.
@@
-36,7
+37,15
@@
const deprecationWarningMessages = {
* @param {string} errorCode The warning message to show.
* @returns {void}
*/
* @param {string} errorCode The warning message to show.
* @returns {void}
*/
-const emitDeprecationWarning = lodash.memoize((source, errorCode) => {
+function emitDeprecationWarning(source, errorCode) {
+ const cacheKey = JSON.stringify({ source, errorCode });
+
+ if (sourceFileErrorCache.has(cacheKey)) {
+ return;
+ }
+
+ sourceFileErrorCache.add(cacheKey);
+
const rel = path.relative(process.cwd(), source);
const message = deprecationWarningMessages[errorCode];
const rel = path.relative(process.cwd(), source);
const message = deprecationWarningMessages[errorCode];
@@
-45,7
+54,7
@@
const emitDeprecationWarning = lodash.memoize((source, errorCode) => {
"DeprecationWarning",
errorCode
);
"DeprecationWarning",
errorCode
);
-}
, (...args) => JSON.stringify(args));
+}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
// Public Interface