Content
View differences
Updated by Alexander Coles 12 days ago
## Scope
Bucket D of [#65621](https://community.openproject.org/work_packages/65621). Replace lodash equality / clone helpers. **Highest risk** — no clean native equivalent for deep equality; verify behaviour per call site.
## Call sites (~27)
`isEqual` 16 · `clone` 7 · `cloneDeep` 3 · `isEqualWith` 1
## Strategy
`clone` → shallow spread (`{...x}` / `[...x]`); `cloneDeep` → `structuredClone` (watch unsupported types: functions, DOM nodes, class instances); `isEqual` / `isEqualWith` → no native equal — keep `lodash-es` import where structural deep-equal is genuinely needed, or replace with a narrow hand-written compare when the shape is known and small.
May depend on bucket E (`lodash-es` import convention) — note in PR if so.
## Branch
`code-maintenance/OP-19545-remove-lodash-equality-clone` off `dev`.
Bucket D of [#65621](https://community.openproject.org/work_packages/65621). Replace lodash equality / clone helpers. **Highest risk** — no clean native equivalent for deep equality; verify behaviour per call site.
## Call sites (~27)
`isEqual` 16 · `clone` 7 · `cloneDeep` 3 · `isEqualWith` 1
## Strategy
`clone` → shallow spread (`{...x}` / `[...x]`); `cloneDeep` → `structuredClone` (watch unsupported types: functions, DOM nodes, class instances); `isEqual` / `isEqualWith` → no native equal — keep `lodash-es` import where structural deep-equal is genuinely needed, or replace with a narrow hand-written compare when the shape is known and small.
May depend on bucket E (`lodash-es` import convention) — note in PR if so.
## Branch
`code-maintenance/OP-19545-remove-lodash-equality-clone` off `dev`.