zod 4.2.0-canary.20251215T071855 → 4.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "4.2.0-canary.20251215T071855",
3
+ "version": "4.2.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Colin McDonnell <zod@colinhacks.com>",
@@ -1,7 +1,16 @@
1
1
  import type * as JSONSchema from "../core/json-schema.js";
2
- import * as z from "../index.js";
2
+ import * as _checks from "./checks.js";
3
+ import * as _iso from "./iso.js";
4
+ import * as _schemas from "./schemas.js";
3
5
  import type { ZodNumber, ZodString, ZodType } from "./schemas.js";
4
6
 
7
+ // Local z object to avoid circular dependency with ../index.js
8
+ const z = {
9
+ ..._schemas,
10
+ ..._checks,
11
+ iso: _iso,
12
+ };
13
+
5
14
  type JSONSchemaVersion = "draft-2020-12" | "draft-7" | "draft-4" | "openapi-3.0";
6
15
 
7
16
  interface FromJSONSchemaParams {
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
- minor: 1,
4
- patch: 13 as number,
3
+ minor: 2,
4
+ patch: 1 as number,
5
5
  } as const;
@@ -24,7 +24,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.fromJSONSchema = fromJSONSchema;
27
- const z = __importStar(require("../index.cjs"));
27
+ const _checks = __importStar(require("./checks.cjs"));
28
+ const _iso = __importStar(require("./iso.cjs"));
29
+ const _schemas = __importStar(require("./schemas.cjs"));
30
+ // Local z object to avoid circular dependency with ../index.js
31
+ const z = {
32
+ ..._schemas,
33
+ ..._checks,
34
+ iso: _iso,
35
+ };
28
36
  function detectVersion(schema, defaultTarget) {
29
37
  const $schema = schema.$schema;
30
38
  if ($schema === "https://json-schema.org/draft/2020-12/schema") {
@@ -1,4 +1,12 @@
1
- import * as z from "../index.js";
1
+ import * as _checks from "./checks.js";
2
+ import * as _iso from "./iso.js";
3
+ import * as _schemas from "./schemas.js";
4
+ // Local z object to avoid circular dependency with ../index.js
5
+ const z = {
6
+ ..._schemas,
7
+ ..._checks,
8
+ iso: _iso,
9
+ };
2
10
  function detectVersion(schema, defaultTarget) {
3
11
  const $schema = schema.$schema;
4
12
  if ($schema === "https://json-schema.org/draft/2020-12/schema") {
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  exports.version = {
5
5
  major: 4,
6
- minor: 1,
7
- patch: 13,
6
+ minor: 2,
7
+ patch: 1,
8
8
  };
@@ -1,5 +1,5 @@
1
1
  export declare const version: {
2
2
  readonly major: 4;
3
- readonly minor: 1;
3
+ readonly minor: 2;
4
4
  readonly patch: number;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export declare const version: {
2
2
  readonly major: 4;
3
- readonly minor: 1;
3
+ readonly minor: 2;
4
4
  readonly patch: number;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
- minor: 1,
4
- patch: 13,
3
+ minor: 2,
4
+ patch: 1,
5
5
  };