Skip to content

Commit df1e60e

Browse files
committed
Fix portability issue
1 parent b898f99 commit df1e60e

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

packages/zod/src/v4/classic/external.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,19 @@ export {
2929
toJSONSchema,
3030
locales,
3131
} from "zod/v4/core";
32+
33+
// iso
34+
// must be exported from top-level
35+
// https://github.com/colinhacks/zod/issues/4491
36+
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
37+
export * as iso from "./iso.js";
38+
39+
// coerce
40+
export type {
41+
ZodCoercedString,
42+
ZodCoercedNumber,
43+
ZodCoercedBigInt,
44+
ZodCoercedBoolean,
45+
ZodCoercedDate,
46+
} from "./coerce.js";
47+
export * as coerce from "./coerce.js";

packages/zod/src/v4/classic/schemas.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import * as checks from "./checks.js";
55
import * as iso from "./iso.js";
66
import * as parse from "./parse.js";
77

8-
export * as iso from "./iso.js";
9-
export * as coerce from "./coerce.js";
10-
118
///////////////////////////////////////////
129
///////////////////////////////////////////
1310
//////////// ////////////

packages/zod/src/v4/mini/external.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ export {
2424

2525
/** A special constant with type `never` */
2626
// export const NEVER = {} as never;
27+
28+
// iso
29+
export * as iso from "./iso.js";
30+
export {
31+
ZodMiniISODateTime,
32+
ZodMiniISODate,
33+
ZodMiniISOTime,
34+
ZodMiniISODuration,
35+
} from "./iso.js";
36+
37+
// coerce
38+
export * as coerce from "./coerce.js";

packages/zod/src/v4/mini/schemas.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import * as core from "zod/v4/core";
22
import { util } from "zod/v4/core";
33
import * as parse from "./parse.js";
44

5-
export * as coerce from "./coerce.js";
6-
export * as iso from "./iso.js";
7-
85
type SomeType = core.$ZodType;
96

107
export interface ZodMiniType<out Output = unknown, out Input = unknown> extends core.$ZodType<Output, Input> {

0 commit comments

Comments
 (0)