Skip to content

Commit

Permalink
[resolvers/webpack] [refactor] replace lodash/isEqual usage with `d…
Browse files Browse the repository at this point in the history
…eep-equal`
  • Loading branch information
ljharb committed Aug 16, 2023
1 parent 2c18c29 commit 1e81734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const findRoot = require('find-root');
const path = require('path');
const isEqual = require('lodash/isEqual');
const deepEqual = require('deep-equal');
const find = require('array.prototype.find');
const interpret = require('interpret');
const fs = require('fs');
Expand Down Expand Up @@ -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 isEqual(entry.key, cacheKey); });
let cached = find(_cache, function (entry) { return deepEqual(entry.key, cacheKey, { strict: true }); });
if (!cached) {
cached = {
key: cacheKey,
Expand Down
2 changes: 1 addition & 1 deletion resolvers/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "^1.22.4",
"semver": "^5.7.2"
},
Expand Down

0 comments on commit 1e81734

Please sign in to comment.