@cabloy/zod 4.3.6 → 4.3.7

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": "@cabloy/zod",
3
- "version": "4.3.6",
3
+ "version": "4.3.7",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Colin McDonnell <zod@colinhacks.com>",
@@ -129,7 +129,6 @@
129
129
  "build": "zshy --project tsconfig.build.json",
130
130
  "postbuild": "tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .",
131
131
  "test:watch": "pnpm vitest",
132
- "test": "pnpm vitest run",
133
- "prepublishOnly": "tsx ../../scripts/check-versions.ts"
132
+ "test": "pnpm vitest run"
134
133
  }
135
- }
134
+ }
@@ -36,6 +36,7 @@ export interface ParsePayload<T = unknown> {
36
36
  issues: errors.$ZodRawIssue[];
37
37
  /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
38
38
  aborted?: boolean;
39
+ parent?: unknown;
39
40
  }
40
41
 
41
42
  export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
@@ -1925,7 +1926,7 @@ export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$con
1925
1926
  const el = shape[key]!;
1926
1927
  const isOptionalOut = el._zod.optout === "optional";
1927
1928
 
1928
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
1929
+ const r = el._zod.run({ value: input[key], issues: [], parent: input }, ctx);
1929
1930
  if (r instanceof Promise) {
1930
1931
  proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
1931
1932
  } else {
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
3
  minor: 3,
4
- patch: 6 as number,
4
+ patch: 7 as number,
5
5
  } as const;
@@ -863,7 +863,7 @@ exports.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
863
863
  for (const key of value.keys) {
864
864
  const el = shape[key];
865
865
  const isOptionalOut = el._zod.optout === "optional";
866
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
866
+ const r = el._zod.run({ value: input[key], issues: [], parent: input }, ctx);
867
867
  if (r instanceof Promise) {
868
868
  proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
869
869
  }
@@ -25,6 +25,7 @@ export interface ParsePayload<T = unknown> {
25
25
  issues: errors.$ZodRawIssue[];
26
26
  /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
27
27
  aborted?: boolean;
28
+ parent?: unknown;
28
29
  }
29
30
  export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
30
31
  export interface $ZodTypeDef {
@@ -25,6 +25,7 @@ export interface ParsePayload<T = unknown> {
25
25
  issues: errors.$ZodRawIssue[];
26
26
  /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
27
27
  aborted?: boolean;
28
+ parent?: unknown;
28
29
  }
29
30
  export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
30
31
  export interface $ZodTypeDef {
@@ -831,7 +831,7 @@ export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, d
831
831
  for (const key of value.keys) {
832
832
  const el = shape[key];
833
833
  const isOptionalOut = el._zod.optout === "optional";
834
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
834
+ const r = el._zod.run({ value: input[key], issues: [], parent: input }, ctx);
835
835
  if (r instanceof Promise) {
836
836
  proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
837
837
  }
@@ -4,5 +4,5 @@ exports.version = void 0;
4
4
  exports.version = {
5
5
  major: 4,
6
6
  minor: 3,
7
- patch: 6,
7
+ patch: 7,
8
8
  };
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
3
  minor: 3,
4
- patch: 6,
4
+ patch: 7,
5
5
  };