From 640daec6e60b592b4e85298fa9cf29e567db2d8c Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 20 Nov 2019 16:38:33 +1100 Subject: [PATCH] New: Include node version in cache --- lib/cli-engine/lint-result-cache.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli-engine/lint-result-cache.js b/lib/cli-engine/lint-result-cache.js index 14e19d9e5a1..23a142097ba 100644 --- a/lib/cli-engine/lint-result-cache.js +++ b/lib/cli-engine/lint-result-cache.js @@ -20,6 +20,7 @@ const hash = require("./hash"); //----------------------------------------------------------------------------- const configHashCache = new WeakMap(); +const nodeVersion = process && process.version; /** * Calculates the hash of the config @@ -28,7 +29,7 @@ const configHashCache = new WeakMap(); */ function hashOfConfigFor(config) { if (!configHashCache.has(config)) { - configHashCache.set(config, hash(`${pkg.version}_${stringify(config)}`)); + configHashCache.set(config, hash(`${pkg.version}_${nodeVersion}_${stringify(config)}`)); } return configHashCache.get(config);