@typescript-eslint/utils
Advanced tools
Comparing version 8.4.1-alpha.1 to 8.4.1-alpha.2
@@ -22,3 +22,3 @@ "use strict"; | ||
const keys = new Set(Object.keys(first).concat(Object.keys(second))); | ||
return Array.from(keys).reduce((acc, key) => { | ||
return Object.fromEntries(Array.from(keys, key => { | ||
const firstHasKey = key in first; | ||
@@ -28,21 +28,22 @@ const secondHasKey = key in second; | ||
const secondValue = second[key]; | ||
let value; | ||
if (firstHasKey && secondHasKey) { | ||
if (isObjectNotArray(firstValue) && isObjectNotArray(secondValue)) { | ||
// object type | ||
acc[key] = deepMerge(firstValue, secondValue); | ||
value = deepMerge(firstValue, secondValue); | ||
} | ||
else { | ||
// value type | ||
acc[key] = secondValue; | ||
value = secondValue; | ||
} | ||
} | ||
else if (firstHasKey) { | ||
acc[key] = firstValue; | ||
value = firstValue; | ||
} | ||
else { | ||
acc[key] = secondValue; | ||
value = secondValue; | ||
} | ||
return acc; | ||
}, {}); | ||
return [key, value]; | ||
})); | ||
} | ||
//# sourceMappingURL=deepMerge.js.map |
{ | ||
"name": "@typescript-eslint/utils", | ||
"version": "8.4.1-alpha.1", | ||
"version": "8.4.1-alpha.2", | ||
"description": "Utilities for working with TypeScript + ESLint together", | ||
@@ -67,5 +67,5 @@ "files": [ | ||
"@eslint-community/eslint-utils": "^4.4.0", | ||
"@typescript-eslint/scope-manager": "8.4.1-alpha.1", | ||
"@typescript-eslint/types": "8.4.1-alpha.1", | ||
"@typescript-eslint/typescript-estree": "8.4.1-alpha.1" | ||
"@typescript-eslint/scope-manager": "8.4.1-alpha.2", | ||
"@typescript-eslint/types": "8.4.1-alpha.2", | ||
"@typescript-eslint/typescript-estree": "8.4.1-alpha.2" | ||
}, | ||
@@ -72,0 +72,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4177
281906
+ Added@eslint-community/regexpp@4.11.0(transitive)
+ Added@typescript-eslint/scope-manager@8.4.1-alpha.2(transitive)
+ Added@typescript-eslint/types@8.4.1-alpha.2(transitive)
+ Added@typescript-eslint/typescript-estree@8.4.1-alpha.2(transitive)
+ Added@typescript-eslint/visitor-keys@8.4.1-alpha.2(transitive)
- Removed@eslint-community/regexpp@4.11.1(transitive)
- Removed@typescript-eslint/scope-manager@8.4.1-alpha.1(transitive)
- Removed@typescript-eslint/types@8.4.1-alpha.1(transitive)
- Removed@typescript-eslint/typescript-estree@8.4.1-alpha.1(transitive)
- Removed@typescript-eslint/visitor-keys@8.4.1-alpha.1(transitive)