diff --git a/package-lock.json b/package-lock.json index 5162942..183eccc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,10 @@ "version": "1.4.6", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { - "lodash.isequal": "4.5.0", "lodash.omit": "4.5.0", "vscode-extension-telemetry": "^0.1.7" }, "devDependencies": { - "@types/lodash.isequal": "^4.5.5", "@types/lodash.omit": "^4.5.6", "@types/mocha": "^10.0.10", "@types/node": "^22.0.0", @@ -570,16 +568,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/lodash.isequal": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/@types/lodash.isequal/-/lodash.isequal-4.5.5.tgz", - "integrity": "sha512-4IKbinG7MGP131wRfceK6W4E/Qt3qssEFLF30LnJbjYiSfHGGRU/Io8YxXrZX109ir+iDETC8hw8QsDijukUVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/lodash": "*" - } - }, "node_modules/@types/lodash.omit": { "version": "4.5.6", "resolved": "https://registry.npmjs.org/@types/lodash.omit/-/lodash.omit-4.5.6.tgz", @@ -2383,11 +2371,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "license": "MIT" - }, "node_modules/lodash.omit": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", diff --git a/package.json b/package.json index 4d2f1dd..83212c8 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,6 @@ "vscode:postpublish": "./tools/tag-release/main.sh" }, "dependencies": { - "lodash.isequal": "4.5.0", "lodash.omit": "4.5.0", "vscode-extension-telemetry": "^0.1.7" }, @@ -204,7 +203,6 @@ } }, "devDependencies": { - "@types/lodash.isequal": "^4.5.5", "@types/lodash.omit": "^4.5.6", "@types/mocha": "^10.0.10", "@types/node": "^22.0.0", diff --git a/src/lib/normalisation-rule-store.ts b/src/lib/normalisation-rule-store.ts index 68ef1ec..0581d0b 100644 --- a/src/lib/normalisation-rule-store.ts +++ b/src/lib/normalisation-rule-store.ts @@ -1,6 +1,6 @@ import WorkspaceAdaptor from './adaptors/workspace'; import {LoadedNormalisationRule, SavedNormalisationRule} from './types/normalisation-rule'; -const isEqual = require('lodash.isequal'); +import {isDeepStrictEqual} from 'util'; const omit = require('lodash.omit'); const clone = (value: any) => JSON.parse(JSON.stringify(value)); @@ -28,7 +28,7 @@ export default class NormalisationRuleStore { getAllRules(): LoadedNormalisationRule[] { const newBaseRules = this.workspace.get('preComparisonTextNormalizationRules'); - if (!isEqual(newBaseRules, this.baseRules)) { + if (!isDeepStrictEqual(clone(newBaseRules), this.baseRules)) { this.setupRules(newBaseRules); } return this.rules!;