refactor: Migrate config schema from Zod v3 to Zod v4 (#2357)

This commit is contained in:
Dermot Duffy
2026-02-18 21:47:43 -08:00
committed by GitHub
parent a15376602f
commit 529500ed94
51 changed files with 1110 additions and 443 deletions
+6 -6
View File
@@ -247,16 +247,16 @@ export const getChildrenFromElement = (parent: HTMLElement): HTMLElement[] => {
return children.filter(isHTMLElement);
};
export const recursivelyMergeObjectsNotArrays = <T>(target: T, src1: T, src2: T): T => {
return mergeWith(target, src1, src2, (_a, b) => (Array.isArray(b) ? b : undefined));
export const recursivelyMergeObjectsNotArrays = <T>(
...srcs: (Partial<T> | undefined | null)[]
): T => {
return mergeWith({}, ...srcs, (_a, b) => (Array.isArray(b) ? b : undefined));
};
export const recursivelyMergeObjectsConcatenatingArraysUniquely = <T>(
target: T,
src1: T,
src2: T,
...srcs: (Partial<T> | undefined | null)[]
): T => {
return mergeWith(target, src1, src2, (a, b) =>
return mergeWith({}, ...srcs, (a, b) =>
Array.isArray(a) ? uniq(a.concat(b)) : undefined,
);
};