zod 4.0.0-beta.20250412T085909 → 4.0.0-beta.20250415T232143

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.
@@ -5,4 +5,4 @@ export * from "./errors.js";
5
5
  export * from "./parse.js";
6
6
  export * from "./compat.js";
7
7
  export type { infer, output, input } from "@zod/core";
8
- export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, toJSONSchema, } from "@zod/core";
8
+ export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, toJSONSchema, locales, } from "@zod/core";
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
29
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.toJSONSchema = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.function = exports.$brand = exports.$input = exports.$output = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
32
+ exports.locales = exports.toJSONSchema = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.function = exports.$brand = exports.$input = exports.$output = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
33
33
  exports.core = __importStar(require("@zod/core"));
34
34
  __exportStar(require("./schemas.js"), exports);
35
35
  __exportStar(require("./checks.js"), exports);
@@ -55,3 +55,4 @@ Object.defineProperty(exports, "regexes", { enumerable: true, get: function () {
55
55
  Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return core_2.treeifyError; } });
56
56
  Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return core_2.prettifyError; } });
57
57
  Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return core_2.toJSONSchema; } });
58
+ Object.defineProperty(exports, "locales", { enumerable: true, get: function () { return core_2.locales; } });
@@ -459,11 +459,10 @@ export interface ZodObject<out Shape extends core.$ZodShape = core.$ZodShape, Ex
459
459
  shape: Shape;
460
460
  keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
461
461
  catchall<T extends core.$ZodType>(schema: T): ZodObject<Shape, Record<string, T["_zod"]["output"]>>;
462
- /** @deprecated Use `z.looseObject()` instead. */
462
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
463
463
  passthrough(): ZodObject<Shape, Record<string, unknown>>;
464
- /** @deprecated Use `z.looseObject()` instead. */
465
464
  loose(): ZodObject<Shape, Record<string, unknown>>;
466
- /** @deprecated Use `z.strictObject()` instead. */
465
+ /** The `z.strictObject()` API is preferred. */
467
466
  strict(): ZodObject<Shape, {}>;
468
467
  /** @deprecated This is the default behavior. This method call is likely unnecessary. */
469
468
  strip(): ZodObject<Shape, {}>;
@@ -5,4 +5,4 @@ export * from "./errors.js";
5
5
  export * from "./parse.js";
6
6
  export * from "./compat.js";
7
7
  export type { infer, output, input } from "@zod/core";
8
- export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, toJSONSchema, } from "@zod/core";
8
+ export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, toJSONSchema, locales, } from "@zod/core";
@@ -11,4 +11,4 @@ config(en());
11
11
  export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes,
12
12
  // flattenError,
13
13
  // formatError,
14
- treeifyError, prettifyError, toJSONSchema, } from "@zod/core";
14
+ treeifyError, prettifyError, toJSONSchema, locales, } from "@zod/core";
@@ -459,11 +459,10 @@ export interface ZodObject<out Shape extends core.$ZodShape = core.$ZodShape, Ex
459
459
  shape: Shape;
460
460
  keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
461
461
  catchall<T extends core.$ZodType>(schema: T): ZodObject<Shape, Record<string, T["_zod"]["output"]>>;
462
- /** @deprecated Use `z.looseObject()` instead. */
462
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
463
463
  passthrough(): ZodObject<Shape, Record<string, unknown>>;
464
- /** @deprecated Use `z.looseObject()` instead. */
465
464
  loose(): ZodObject<Shape, Record<string, unknown>>;
466
- /** @deprecated Use `z.strictObject()` instead. */
465
+ /** The `z.strictObject()` API is preferred. */
467
466
  strict(): ZodObject<Shape, {}>;
468
467
  /** @deprecated This is the default behavior. This method call is likely unnecessary. */
469
468
  strip(): ZodObject<Shape, {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "4.0.0-beta.20250412T085909",
3
+ "version": "4.0.0-beta.20250415T232143",
4
4
  "type": "module",
5
5
  "author": "Colin McDonnell <zod@colinhacks.com>",
6
6
  "description": "TypeScript-first schema declaration and validation library with static type inference",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "@zod/core": "0.4.6"
73
+ "@zod/core": "0.5.1"
74
74
  },
75
75
  "scripts": {
76
76
  "clean": "rm -rf dist",
package/src/external.ts CHANGED
@@ -26,4 +26,5 @@ export {
26
26
  treeifyError,
27
27
  prettifyError,
28
28
  toJSONSchema,
29
+ locales,
29
30
  } from "@zod/core";
package/src/schemas.ts CHANGED
@@ -1259,14 +1259,12 @@ export interface ZodObject<
1259
1259
  keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
1260
1260
  catchall<T extends core.$ZodType>(schema: T): ZodObject<Shape, Record<string, T["_zod"]["output"]>>;
1261
1261
 
1262
- /** @deprecated Use `z.looseObject()` instead. */
1262
+ /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
1263
1263
  passthrough(): ZodObject<Shape, Record<string, unknown>>;
1264
- // /** @deprecated Use `z.looseObject()` instead. */
1265
- // nonstrict(): ZodObject<Shape>;
1266
- /** @deprecated Use `z.looseObject()` instead. */
1264
+
1267
1265
  loose(): ZodObject<Shape, Record<string, unknown>>;
1268
1266
 
1269
- /** @deprecated Use `z.strictObject()` instead. */
1267
+ /** The `z.strictObject()` API is preferred. */
1270
1268
  strict(): ZodObject<Shape, {}>;
1271
1269
 
1272
1270
  /** @deprecated This is the default behavior. This method call is likely unnecessary. */