Skip to content

Commit f21c61d

Browse files
committed
fix: Use public Zod v4 .def API, fix CSV coercion and merge clone
- Use schema.def (public API) instead of _zod?.def ?? _def in getSchemaDefault - Fix CSV array coercion being dropped by restructuring control flow - Replace structuredClone with recursive deepMerge clone for Jest compat - Update test for maintenanceKey now being optional per schema change
1 parent b4240e2 commit f21c61d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

spec/Options/schemas/schemas.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ describe('ParseServerOptionsSchema', () => {
3939
const paths = result.error.issues.map(i => i.path[0]);
4040
expect(paths).toContain('appId');
4141
expect(paths).toContain('masterKey');
42-
expect(paths).toContain('maintenanceKey');
4342
expect(paths).toContain('serverURL');
4443
});
4544

src/Options/loaders/mergeConfig.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ function deepMerge(
5252
sourceVal as Record<string, unknown>
5353
);
5454
} else if (isPlainObject(sourceVal)) {
55-
target[key] = structuredClone(sourceVal);
55+
const clone: Record<string, unknown> = {};
56+
deepMerge(clone, sourceVal as Record<string, unknown>);
57+
target[key] = clone;
5658
} else {
5759
target[key] = sourceVal;
5860
}

0 commit comments

Comments
 (0)