From cd1dff7544c90c79ef162e93fbe1e1e62d5e80bc Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 16 Aug 2023 11:31:56 -0700 Subject: [PATCH] Revert "[resolvers/webpack] [refactor] replace `lodash/isEqual` usage with `deep-equal`" This reverts commit 1e81734ddd7a040053d08045c922b15ea9d2045e. Fixes #2857. --- resolvers/webpack/index.js | 4 ++-- resolvers/webpack/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resolvers/webpack/index.js b/resolvers/webpack/index.js index a19591f1a..1eea7d7ab 100644 --- a/resolvers/webpack/index.js +++ b/resolvers/webpack/index.js @@ -2,7 +2,7 @@ const findRoot = require('find-root'); const path = require('path'); -const deepEqual = require('deep-equal'); +const isEqual = require('lodash/isEqual'); const find = require('array.prototype.find'); const interpret = require('interpret'); const fs = require('fs'); @@ -163,7 +163,7 @@ const MAX_CACHE = 10; const _cache = []; function getResolveSync(configPath, webpackConfig, cwd) { const cacheKey = { configPath, webpackConfig }; - let cached = find(_cache, function (entry) { return deepEqual(entry.key, cacheKey, { strict: true }); }); + let cached = find(_cache, function (entry) { return isEqual(entry.key, cacheKey); }); if (!cached) { cached = { key: cacheKey, diff --git a/resolvers/webpack/package.json b/resolvers/webpack/package.json index 74791e49c..59aafdead 100644 --- a/resolvers/webpack/package.json +++ b/resolvers/webpack/package.json @@ -32,13 +32,13 @@ "dependencies": { "array.prototype.find": "^2.2.1", "debug": "^3.2.7", - "deep-equal": "^2.2.2", "enhanced-resolve": "^0.9.1", "find-root": "^1.1.0", "has": "^1.0.3", "interpret": "^1.4.0", "is-core-module": "^2.13.0", "is-regex": "^1.1.4", + "lodash": "^4.17.21", "resolve": "^2.0.0-next.4", "semver": "^5.7.2" },