zod 4.2.0-canary.20251202T062120 → 4.2.0-canary.20251213T203150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/v4/classic/schemas.ts +97 -5
  3. package/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  4. package/src/v4/classic/tests/json.test.ts +4 -3
  5. package/src/v4/classic/tests/standard-schema.test.ts +77 -0
  6. package/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  7. package/src/v4/classic/tests/to-json-schema.test.ts +66 -30
  8. package/src/v4/core/index.ts +2 -0
  9. package/src/v4/core/json-schema-generator.ts +124 -0
  10. package/src/v4/core/json-schema-processors.ts +630 -0
  11. package/src/v4/core/schemas.ts +8 -13
  12. package/src/v4/core/standard-schema.ts +114 -19
  13. package/src/v4/core/to-json-schema.ts +373 -827
  14. package/src/v4/mini/schemas.ts +2 -2
  15. package/src/v4/mini/tests/standard-schema.test.ts +17 -0
  16. package/v4/classic/schemas.cjs +48 -0
  17. package/v4/classic/schemas.d.cts +35 -0
  18. package/v4/classic/schemas.d.ts +35 -0
  19. package/v4/classic/schemas.js +48 -0
  20. package/v4/core/index.cjs +5 -1
  21. package/v4/core/index.d.cts +2 -0
  22. package/v4/core/index.d.ts +2 -0
  23. package/v4/core/index.js +2 -0
  24. package/v4/core/json-schema-generator.cjs +99 -0
  25. package/v4/core/json-schema-generator.d.cts +64 -0
  26. package/v4/core/json-schema-generator.d.ts +64 -0
  27. package/v4/core/json-schema-generator.js +95 -0
  28. package/v4/core/json-schema-processors.cjs +617 -0
  29. package/v4/core/json-schema-processors.d.cts +49 -0
  30. package/v4/core/json-schema-processors.d.ts +49 -0
  31. package/v4/core/json-schema-processors.js +574 -0
  32. package/v4/core/schemas.cjs +0 -10
  33. package/v4/core/schemas.d.cts +4 -1
  34. package/v4/core/schemas.d.ts +4 -1
  35. package/v4/core/schemas.js +0 -10
  36. package/v4/core/standard-schema.d.cts +90 -19
  37. package/v4/core/standard-schema.d.ts +90 -19
  38. package/v4/core/to-json-schema.cjs +302 -793
  39. package/v4/core/to-json-schema.d.cts +56 -33
  40. package/v4/core/to-json-schema.d.ts +56 -33
  41. package/v4/core/to-json-schema.js +296 -791
  42. package/v4/mini/schemas.d.cts +2 -2
  43. package/v4/mini/schemas.d.ts +2 -2
@@ -365,7 +365,7 @@ declare abstract class Class {
365
365
  declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>, InstanceType<T>>;
366
366
  export { _instanceof as instanceof };
367
367
  export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniCodec<ZodMiniString, ZodMiniBoolean>;
368
- type _ZodMiniJSONSchema = ZodMiniUnion<[
368
+ export type _ZodMiniJSONSchema = ZodMiniUnion<[
369
369
  ZodMiniString,
370
370
  ZodMiniNumber,
371
371
  ZodMiniBoolean,
@@ -373,7 +373,7 @@ type _ZodMiniJSONSchema = ZodMiniUnion<[
373
373
  ZodMiniArray<ZodMiniJSONSchema>,
374
374
  ZodMiniRecord<ZodMiniString<string>, ZodMiniJSONSchema>
375
375
  ]>;
376
- type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
376
+ export type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
377
377
  export interface ZodMiniJSONSchemaInternals extends _ZodMiniJSONSchemaInternals {
378
378
  output: util.JSONType;
379
379
  input: util.JSONType;
@@ -365,7 +365,7 @@ declare abstract class Class {
365
365
  declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>, InstanceType<T>>;
366
366
  export { _instanceof as instanceof };
367
367
  export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniCodec<ZodMiniString, ZodMiniBoolean>;
368
- type _ZodMiniJSONSchema = ZodMiniUnion<[
368
+ export type _ZodMiniJSONSchema = ZodMiniUnion<[
369
369
  ZodMiniString,
370
370
  ZodMiniNumber,
371
371
  ZodMiniBoolean,
@@ -373,7 +373,7 @@ type _ZodMiniJSONSchema = ZodMiniUnion<[
373
373
  ZodMiniArray<ZodMiniJSONSchema>,
374
374
  ZodMiniRecord<ZodMiniString<string>, ZodMiniJSONSchema>
375
375
  ]>;
376
- type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
376
+ export type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
377
377
  export interface ZodMiniJSONSchemaInternals extends _ZodMiniJSONSchemaInternals {
378
378
  output: util.JSONType;
379
379
  input: util.JSONType;