diff --git a/apps/browser-extension/package.json b/apps/browser-extension/package.json index 2ed2befc..dcf2bcc3 100644 --- a/apps/browser-extension/package.json +++ b/apps/browser-extension/package.json @@ -16,7 +16,7 @@ "@evaluate/helpers": "workspace:^", "@evaluate/shapes": "workspace:^", "@evaluate/styles": "workspace:^", - "@t3-oss/env-core": "^0.11.1", + "@t3-oss/env-core": "^0.12.0", "lucide-react": "^0.488.0", "posthog-js": "^1.236.1", "react": "^19.1.0", @@ -25,7 +25,7 @@ "tailwind-merge": "^3.2.0", "webext-bridge": "^6.0.1", "webextension-polyfill": "^0.12.0", - "zod": "3.22.4" + "zod": "4.0.0-beta.20250414T061543" }, "devDependencies": { "@babel/generator": "^7.27.0", diff --git a/apps/browser-extension/src/env.ts b/apps/browser-extension/src/env.ts index 91eb9822..3f2f3428 100644 --- a/apps/browser-extension/src/env.ts +++ b/apps/browser-extension/src/env.ts @@ -4,10 +4,7 @@ import { z } from 'zod'; export default createEnv({ clientPrefix: 'VITE_PUBLIC_', client: { - VITE_PUBLIC_WEBSITE_URL: z - .string() - .url() - .transform((v) => new URL(v)), + VITE_PUBLIC_WEBSITE_URL: z.url().transform((v) => new URL(v)), VITE_PUBLIC_POSTHOG_KEY: z.string().min(1).optional(), }, diff --git a/apps/discord-bot/package.json b/apps/discord-bot/package.json index 0001f7cc..e697bbff 100644 --- a/apps/discord-bot/package.json +++ b/apps/discord-bot/package.json @@ -20,11 +20,11 @@ "@evaluate/engine": "workspace:^", "@evaluate/helpers": "workspace:^", "@evaluate/shapes": "workspace:^", - "@t3-oss/env-core": "^0.11.1", + "@t3-oss/env-core": "^0.12.0", "date-fns": "^4.1.0", "es-toolkit": "^1.34.1", "posthog-node": "^4.11.6", - "zod": "3.22.4" + "zod": "4.0.0-beta.20250414T061543" }, "devDependencies": { "tsup": "^8.4.0" diff --git a/apps/discord-bot/src/env.ts b/apps/discord-bot/src/env.ts index c40e1ec1..292cf2e9 100644 --- a/apps/discord-bot/src/env.ts +++ b/apps/discord-bot/src/env.ts @@ -3,10 +3,7 @@ import { z } from 'zod'; export default createEnv({ server: { - WEBSITE_URL: z - .string() - .url() - .transform((v) => new URL(v)), + WEBSITE_URL: z.url().transform((v) => new URL(v)), POSTHOG_KEY: z.string().optional(), DISCORD_TOKEN: z.string().min(1).optional(), DISCORD_PUBLIC_KEY: z.string().min(1).optional(), diff --git a/apps/website/package.json b/apps/website/package.json index 4fcdd39c..9d7ad1e5 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -18,7 +18,7 @@ "@evaluate/shapes": "workspace:^", "@evaluate/styles": "workspace:^", "@hookform/resolvers": "^5.0.1", - "@t3-oss/env-nextjs": "^0.11.1", + "@t3-oss/env-nextjs": "^0.12.0", "@tanstack/react-query": "^5.74.3", "@tanstack/react-query-devtools": "^5.74.3", "@uiw/codemirror-extensions-langs": "^4.23.10", @@ -50,7 +50,7 @@ "type-fest": "^4.40.0", "virtual-file-explorer-backend": "^0.0.4", "vscode-icons-js": "^11.6.1", - "zod": "3.22.4" + "zod": "4.0.0-beta.20250414T061543" }, "devDependencies": { "@million/lint": "^1.0.14", diff --git a/apps/website/src/env.ts b/apps/website/src/env.ts index 4031b14d..c9556522 100644 --- a/apps/website/src/env.ts +++ b/apps/website/src/env.ts @@ -1,5 +1,5 @@ import { createEnv } from '@t3-oss/env-nextjs'; -import { vercel } from '@t3-oss/env-nextjs/presets'; +import { vercel } from '@t3-oss/env-nextjs/presets-zod'; import discordEnv from 'discord-bot/env'; import { z } from 'zod'; @@ -7,10 +7,7 @@ export default createEnv({ extends: [discordEnv, vercel()], server: { - WEBSITE_URL: z - .string() - .url() - .transform((v) => new URL(v)), + WEBSITE_URL: z.url().transform((v) => new URL(v)), }, client: { NEXT_PUBLIC_POSTHOG_KEY: z.string().min(1).optional(), diff --git a/package.json b/package.json index 81ba036f..246d51a3 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,5 @@ "turbo": "^2.5.0", "typescript": "^5.8.3", "typescript-transform-paths": "^3.5.5" - }, - "pnpm": { - "patchedDependencies": { - "zod@3.22.4": "patches/zod@3.22.4.patch" - }, - "allowNonAppliedPatches": true } } diff --git a/packages/engine/package.json b/packages/engine/package.json index 09af38e4..dd874bff 100644 --- a/packages/engine/package.json +++ b/packages/engine/package.json @@ -18,8 +18,7 @@ "@evaluate/shapes": "workspace:^", "fuse.js": "^7.1.0", "lexure": "npm:@apteryxxyz/lexure@^0.17.0", - "pako": "^2.1.0", - "zod": "3.22.4" + "pako": "^2.1.0" }, "devDependencies": { "@types/pako": "^2.0.3" diff --git a/packages/engine/src/runtimes/fetch.ts b/packages/engine/src/runtimes/fetch.ts index f30840b7..2d308c54 100644 --- a/packages/engine/src/runtimes/fetch.ts +++ b/packages/engine/src/runtimes/fetch.ts @@ -5,7 +5,6 @@ import { type Runtime, } from '@evaluate/shapes'; import Fuse from 'fuse.js'; -import { z } from 'zod'; import { getRuntimeAliases, getRuntimeExamples, @@ -30,7 +29,7 @@ export async function fetchRuntimes() { 'https://emkc.org/api/v2/piston/runtimes', ) .then((response) => response.json()) - .then(z.array(PistonRuntime).parse); + .then(PistonRuntime.array().parse); for (const piston of pistonRuntimes) { const identifier = makeIdentifier(piston.language, piston.runtime); diff --git a/packages/shapes/package.json b/packages/shapes/package.json index 8f5b7b66..44f9b36b 100644 --- a/packages/shapes/package.json +++ b/packages/shapes/package.json @@ -15,6 +15,6 @@ "build": "tsc" }, "dependencies": { - "zod": "3.22.4" + "zod": "4.0.0-beta.20250414T061543" } } diff --git a/packages/shapes/src/execute.ts b/packages/shapes/src/execute.ts index 657ad910..c9de3969 100644 --- a/packages/shapes/src/execute.ts +++ b/packages/shapes/src/execute.ts @@ -4,38 +4,51 @@ export type ExecuteOptions = z.infer; export const ExecuteOptions = z .object({ runtime: z - .string({ required_error: 'A runtime is required' }) - .regex(/^(?:[\w]+\+)?[\w]+(?:@[\d.]+)?$/, 'Invalid runtime format'), + .string({ error: 'A runtime is required' }) + .regex(/^(?:[\w]+\+)?[\w]+(?:@[\d.]+)?$/, { + error: 'Invalid runtime format', + }), files: z .record( z - .string({ required_error: 'File path is required' }) - .max(200, 'File path length is too long'), + .string({ error: 'File path is required' }) + .max(200, { error: 'File path length is too long' }), z - .string({ required_error: 'File content is required' }) - .max(10_000, 'File content is too large'), + .string({ error: 'File content is required' }) + .max(10_000, { error: 'File content is too large' }), { - required_error: 'At least one file is required', - invalid_type_error: 'Files must be an object', + error: (issue) => + issue.input === undefined + ? 'At least one file is required' + : 'Files must be an object', }, ) - .refine((f) => Object.keys(f).length >= 0, 'Too few files') - .refine((f) => Object.keys(f).length <= 10, 'Too many files') + .refine((f) => Object.keys(f).length >= 0, { error: 'Too few files' }) + .refine((f) => Object.keys(f).length <= 10, { error: 'Too many files' }) .refine( (f) => Object.values(f).reduce((acc, val: string) => acc + val.length, 0) <= 10_000, - 'Combined file content size is too large', + { error: 'Combined file content size is too large' }, ), - entry: z.string({ required_error: 'An entry file is required' }), - input: z.string().max(2_000, 'Input length is too long').optional(), - args: z.string().max(2_000, 'Arguments length is too long').optional(), + entry: z.string({ error: 'An entry file is required' }), + input: z + .string() + .max(2_000, { error: 'Input length is too long' }) + .optional(), + args: z + .string() + .max(2_000, { error: 'Arguments length is too long' }) + .optional(), }) - .refine((data) => { - // Omit is used elsewhere to remove files, so we need to check if it exists - if (!data.files) return true; - return data.entry in data.files; - }, 'Entry file does not exist'); + .refine( + (data) => { + // Omit is used elsewhere to remove files, so we need to check if it exists + if (!data.files) return true; + return data.entry in data.files; + }, + { error: 'Entry file does not exist' }, + ); export type ExecuteResult = z.infer; export const ExecuteResult = z.object({ diff --git a/packages/shapes/src/generate.ts b/packages/shapes/src/generate.ts deleted file mode 100644 index 9dc8ce56..00000000 --- a/packages/shapes/src/generate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from 'zod'; - -export type GenerateCodeOptions = z.infer; -export const GenerateCodeOptions = z.object({ - file: z.object({ - name: z.string(), - content: z.string().max(1000, { message: 'File content is too large' }), - line: z.number(), - }), - instructions: z - .string({ required_error: 'Instructions are required' }) - .min(1, { message: 'Instructions are required' }) - .max(500, { message: 'Instructions are too long' }), -}); - -export type GenerateCodeInstructionsOnlyOptions = z.infer< - typeof GenerateCodeInstructionsOnlyOptions ->; -export const GenerateCodeInstructionsOnlyOptions = GenerateCodeOptions.pick({ - instructions: true, -}); diff --git a/packages/shapes/src/index.ts b/packages/shapes/src/index.ts index 9a4223a0..d6f1e282 100644 --- a/packages/shapes/src/index.ts +++ b/packages/shapes/src/index.ts @@ -1,3 +1,2 @@ -export * from './generate.js'; export * from './execute.js'; export * from './runtime.js'; diff --git a/packages/shapes/src/runtime.ts b/packages/shapes/src/runtime.ts index 273069bd..ffda38ac 100644 --- a/packages/shapes/src/runtime.ts +++ b/packages/shapes/src/runtime.ts @@ -4,27 +4,26 @@ import { ExecuteOptions } from './execute.js'; export type PartialRuntime = z.infer; export const PartialRuntime = z.object({ id: z.string(), - versions: z.array(z.string()), + versions: z.string().array(), name: z.string(), - aliases: z.array(z.string()), + aliases: z.string().array(), popularity: z.number().min(0).max(100), - tags: z.array(z.string()), + tags: z.string().array(), icon: z.string().optional(), }); export type Runtime = z.infer; -export const Runtime = PartialRuntime.merge( - z.object({ - examples: ExecuteOptions.merge(z.object({ name: z.string() })) - .omit({ runtime: true }) - .array(), - }), -); +export const Runtime = PartialRuntime.extend({ + examples: ExecuteOptions.omit({ runtime: true }) + .extend({ name: z.string() }) + + .array(), +}); export type PistonRuntime = z.infer; export const PistonRuntime = z.object({ language: z.string(), version: z.string(), - aliases: z.array(z.string()), + aliases: z.string().array(), runtime: z.string().optional(), }); diff --git a/patches/zod@3.22.4.patch b/patches/zod@3.22.4.patch deleted file mode 100644 index a332d7b0..00000000 --- a/patches/zod@3.22.4.patch +++ /dev/null @@ -1,722 +0,0 @@ -diff --git a/README.md b/README.md -index 490265fc86bc2e7466a9f1ed2c9e77d6c9ea2b46..0bc43bbeb3e309e22fd2cc1332bd0ad674fe2348 100644 ---- a/README.md -+++ b/README.md -@@ -1,3 +1,5 @@ -+APTERYX -+ -

- Zod logo -

Zod

-diff --git a/lib/helpers/parseUtil.js b/lib/helpers/parseUtil.js -index 3ad75fa68d19676deeebea91cbac270a63b79228..84408153e8a39bb83419f85f7e11ace0d230b6cc 100644 ---- a/lib/helpers/parseUtil.js -+++ b/lib/helpers/parseUtil.js -@@ -7,6 +7,7 @@ exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = export - const errors_1 = require("../errors"); - const en_1 = __importDefault(require("../locales/en")); - const makeIssue = (params) => { -+ var _a; - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...(issueData.path || [])]; - const fullIssue = { -@@ -24,7 +25,7 @@ const makeIssue = (params) => { - return { - ...issueData, - path: fullPath, -- message: issueData.message || errorMessage, -+ message: (_a = issueData.message) !== null && _a !== void 0 ? _a : errorMessage, - }; - }; - exports.makeIssue = makeIssue; -diff --git a/lib/index.mjs b/lib/index.mjs -index db664c8054552a6b0508bf1a0dfc2ffaefc9675e..26e3fe18ae4391f66fe7c885666fcbc213ec4e8f 100644 ---- a/lib/index.mjs -+++ b/lib/index.mjs -@@ -398,6 +398,7 @@ function getErrorMap() { - } - - const makeIssue = (params) => { -+ var _a; - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...(issueData.path || [])]; - const fullIssue = { -@@ -415,7 +416,7 @@ const makeIssue = (params) => { - return { - ...issueData, - path: fullPath, -- message: issueData.message || errorMessage, -+ message: (_a = issueData.message) !== null && _a !== void 0 ? _a : errorMessage, - }; - }; - const EMPTY_PATH = []; -@@ -878,9 +879,8 @@ function isValidIP(ip, version) { - } - class ZodString extends ZodType { - _parse(input) { -- if (this._def.coerce) { -+ if (this._def.coerce) - input.data = String(input.data); -- } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.string) { - const ctx = this._getOrReturnCtx(input); -@@ -2281,6 +2281,61 @@ class ZodObject extends ZodType { - get shape() { - return this._def.shape(); - } -+ /** *** **/ -+ transform(transform) { -+ return new ZodObjectEffects({ -+ ...processCreateParams(this._def), -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ /** *** **/ - strict(message) { - errorUtil.errToObj; - return new ZodObject({ -@@ -3332,11 +3387,11 @@ class ZodEnum extends ZodType { - } - return enumValues; - } -- extract(values) { -- return ZodEnum.create(values); -+ extract(values, newDef = this._def) { -+ return ZodEnum.create(values, newDef); - } -- exclude(values) { -- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt))); -+ exclude(values, newDef = this._def) { -+ return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), newDef); - } - } - ZodEnum.create = createZodEnum; -@@ -3546,6 +3601,95 @@ ZodEffects.createWithPreprocess = (preprocess, schema, params) => { - ...processCreateParams(params), - }); - }; -+////////////////////////////////////////////// -+////////////////////////////////////////////// -+////////// ////////// -+////////// ZodObjectEffects ////////// -+////////// ////////// -+////////////////////////////////////////////// -+////////////////////////////////////////////// -+class ZodObjectEffects extends ZodEffects { -+ pick(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.pick(mask), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ omit(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.omit(mask), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ merge(merging) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.merge(merging), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ /** *** **/ -+ transform(transform -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message -+ // @ts-expect-error -+ ) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+} - class ZodOptional extends ZodType { - _parse(input) { - const parsedType = this._getType(input); -@@ -3954,6 +4098,7 @@ var z = /*#__PURE__*/Object.freeze({ - ZodPromise: ZodPromise, - ZodEffects: ZodEffects, - ZodTransformer: ZodEffects, -+ ZodObjectEffects: ZodObjectEffects, - ZodOptional: ZodOptional, - ZodNullable: ZodNullable, - ZodDefault: ZodDefault, -@@ -4014,4 +4159,4 @@ var z = /*#__PURE__*/Object.freeze({ - ZodError: ZodError - }); - --export { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z }; -+export { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodObjectEffects, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z }; -diff --git a/lib/index.umd.js b/lib/index.umd.js -index 36fc981d86f5e635f175ec0722b617ade1911deb..64c46303d46daf3731b1cada6ec5d32dd45fad08 100644 ---- a/lib/index.umd.js -+++ b/lib/index.umd.js -@@ -404,6 +404,7 @@ - } - - const makeIssue = (params) => { -+ var _a; - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...(issueData.path || [])]; - const fullIssue = { -@@ -421,7 +422,7 @@ - return { - ...issueData, - path: fullPath, -- message: issueData.message || errorMessage, -+ message: (_a = issueData.message) !== null && _a !== void 0 ? _a : errorMessage, - }; - }; - const EMPTY_PATH = []; -@@ -884,9 +885,8 @@ - } - class ZodString extends ZodType { - _parse(input) { -- if (this._def.coerce) { -+ if (this._def.coerce) - input.data = String(input.data); -- } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.string) { - const ctx = this._getOrReturnCtx(input); -@@ -2287,6 +2287,61 @@ - get shape() { - return this._def.shape(); - } -+ /** *** **/ -+ transform(transform) { -+ return new ZodObjectEffects({ -+ ...processCreateParams(this._def), -+ schema: this, -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ /** *** **/ - strict(message) { - errorUtil.errToObj; - return new ZodObject({ -@@ -3338,11 +3393,11 @@ - } - return enumValues; - } -- extract(values) { -- return ZodEnum.create(values); -+ extract(values, newDef = this._def) { -+ return ZodEnum.create(values, newDef); - } -- exclude(values) { -- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt))); -+ exclude(values, newDef = this._def) { -+ return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), newDef); - } - } - ZodEnum.create = createZodEnum; -@@ -3552,6 +3607,95 @@ - ...processCreateParams(params), - }); - }; -+ ////////////////////////////////////////////// -+ ////////////////////////////////////////////// -+ ////////// ////////// -+ ////////// ZodObjectEffects ////////// -+ ////////// ////////// -+ ////////////////////////////////////////////// -+ ////////////////////////////////////////////// -+ class ZodObjectEffects extends ZodEffects { -+ pick(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.pick(mask), -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ omit(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.omit(mask), -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ merge(merging) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.merge(merging), -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ /** *** **/ -+ transform(transform -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: exports.ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message -+ // @ts-expect-error -+ ) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ } - class ZodOptional extends ZodType { - _parse(input) { - const parsedType = this._getType(input); -@@ -3960,6 +4104,7 @@ - ZodPromise: ZodPromise, - ZodEffects: ZodEffects, - ZodTransformer: ZodEffects, -+ ZodObjectEffects: ZodObjectEffects, - ZodOptional: ZodOptional, - ZodNullable: ZodNullable, - ZodDefault: ZodDefault, -@@ -4053,6 +4198,7 @@ - exports.ZodNullable = ZodNullable; - exports.ZodNumber = ZodNumber; - exports.ZodObject = ZodObject; -+ exports.ZodObjectEffects = ZodObjectEffects; - exports.ZodOptional = ZodOptional; - exports.ZodParsedType = ZodParsedType; - exports.ZodPipeline = ZodPipeline; -diff --git a/lib/types.d.ts b/lib/types.d.ts -index 854670d465f2ed8b8aa74b2a785f76faf1984618..83e8c0b1ebc57aa7143946c68cd70229d85a2f63 100644 ---- a/lib/types.d.ts -+++ b/lib/types.d.ts -@@ -495,6 +495,12 @@ export declare class ZodObject; - get shape(): T; -+ /** *** **/ -+ transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodObjectEffects; -+ __refinement(refinement: RefinementEffect["refinement"]): ZodObjectEffects; -+ refine(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodObjectEffects; -+ refine(check: (arg: Output) => unknown | Promise, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodObjectEffects; -+ /** *** **/ - strict(message?: errorUtil.ErrMessage): ZodObject; - strip(): ZodObject; - passthrough(): ZodObject; -@@ -735,8 +741,8 @@ export declare class ZodEnum extends ZodType; - get Values(): Values; - get Enum(): Values; -- extract(values: ToExtract): ZodEnum>; -- exclude(values: ToExclude): ZodEnum>, [string, ...string[]]>>; -+ extract(values: ToExtract, newDef?: RawCreateParams): ZodEnum>; -+ exclude(values: ToExclude, newDef?: RawCreateParams): ZodEnum>, [string, ...string[]]>>; - static create: typeof createZodEnum; - } - export interface ZodNativeEnumDef extends ZodTypeDef { -@@ -789,6 +795,20 @@ export declare class ZodEffects, Input - static createWithPreprocess: (preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects; - } - export { ZodEffects as ZodTransformer }; -+export declare class ZodObjectEffects, Input = input> extends ZodEffects { -+ pick(mask: Mask): ZodObjectEffects>>, Pick>, Pick>>; -+ omit(mask: Mask): ZodObjectEffects>>, Omit>, Omit>>; -+ merge(merging: Incoming): ZodObjectEffects, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>>; -+ /** *** **/ -+ transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodObjectEffects; -+ __refinement(refinement: RefinementEffect["refinement"]): ZodObjectEffects; -+ refine(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodObjectEffects; -+ refine(check: (arg: Output) => unknown | Promise, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodObjectEffects; -+} - export interface ZodOptionalDef extends ZodTypeDef { - innerType: T; - typeName: ZodFirstPartyTypeKind.ZodOptional; -diff --git a/lib/types.js b/lib/types.js -index e4d7f47efd206dc68a3f8d0b757cc0d4eba96c51..720627f72c84b8593e353195ac4ff83a13b22152 100644 ---- a/lib/types.js -+++ b/lib/types.js -@@ -1,7 +1,7 @@ - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); --exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0; --exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = void 0; -+exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodObjectEffects = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0; -+exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = exports.date = void 0; - const errors_1 = require("./errors"); - const errorUtil_1 = require("./helpers/errorUtil"); - const parseUtil_1 = require("./helpers/parseUtil"); -@@ -386,9 +386,8 @@ function isValidIP(ip, version) { - } - class ZodString extends ZodType { - _parse(input) { -- if (this._def.coerce) { -+ if (this._def.coerce) - input.data = String(input.data); -- } - const parsedType = this._getType(input); - if (parsedType !== util_1.ZodParsedType.string) { - const ctx = this._getOrReturnCtx(input); -@@ -1803,6 +1802,61 @@ class ZodObject extends ZodType { - get shape() { - return this._def.shape(); - } -+ /** *** **/ -+ transform(transform) { -+ return new ZodObjectEffects({ -+ ...processCreateParams(this._def), -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodError_1.ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ /** *** **/ - strict(message) { - errorUtil_1.errorUtil.errToObj; - return new ZodObject({ -@@ -2865,11 +2919,11 @@ class ZodEnum extends ZodType { - } - return enumValues; - } -- extract(values) { -- return ZodEnum.create(values); -+ extract(values, newDef = this._def) { -+ return ZodEnum.create(values, newDef); - } -- exclude(values) { -- return ZodEnum.create(this.options.filter((opt) => !values.includes(opt))); -+ exclude(values, newDef = this._def) { -+ return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), newDef); - } - } - exports.ZodEnum = ZodEnum; -@@ -3084,6 +3138,96 @@ ZodEffects.createWithPreprocess = (preprocess, schema, params) => { - ...processCreateParams(params), - }); - }; -+////////////////////////////////////////////// -+////////////////////////////////////////////// -+////////// ////////// -+////////// ZodObjectEffects ////////// -+////////// ////////// -+////////////////////////////////////////////// -+////////////////////////////////////////////// -+class ZodObjectEffects extends ZodEffects { -+ pick(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.pick(mask), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ omit(mask) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.omit(mask), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ merge(merging) { -+ return new ZodObjectEffects({ -+ schema: this._def.schema.merge(merging), -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: this._def.effect, -+ }); -+ } -+ /** *** **/ -+ transform(transform -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "transform", transform }, -+ }); -+ } -+ __refinement(refinement -+ // @ts-expect-error -+ ) { -+ return new ZodObjectEffects({ -+ schema: this, -+ typeName: ZodFirstPartyTypeKind.ZodEffects, -+ effect: { type: "refinement", refinement }, -+ }); -+ } -+ refine(check, message -+ // @ts-expect-error -+ ) { -+ const getIssueProperties = (val) => { -+ if (typeof message === "string" || typeof message === "undefined") { -+ return { message }; -+ } -+ else if (typeof message === "function") { -+ return message(val); -+ } -+ else { -+ return message; -+ } -+ }; -+ return this.__refinement((val, ctx) => { -+ const result = check(val); -+ const setError = () => ctx.addIssue({ -+ code: ZodError_1.ZodIssueCode.custom, -+ ...getIssueProperties(val), -+ }); -+ if (typeof Promise !== "undefined" && result instanceof Promise) { -+ return result.then((data) => { -+ if (!data) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+ if (!result) { -+ setError(); -+ return false; -+ } -+ else { -+ return true; -+ } -+ }); -+ } -+} -+exports.ZodObjectEffects = ZodObjectEffects; - class ZodOptional extends ZodType { - _parse(input) { - const parsedType = this._getType(input); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dde12a86..8218c076 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,11 +4,6 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -patchedDependencies: - zod@3.22.4: - hash: j5rlizeyx7cjhu35u4l53omnrq - path: patches/zod@3.22.4.patch - importers: .: @@ -56,8 +51,8 @@ importers: specifier: workspace:^ version: link:../../packages/styles '@t3-oss/env-core': - specifier: ^0.11.1 - version: 0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq)) + specifier: ^0.12.0 + version: 0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543) lucide-react: specifier: ^0.488.0 version: 0.488.0(react@19.1.0) @@ -83,8 +78,8 @@ importers: specifier: ^0.12.0 version: 0.12.0 zod: - specifier: 3.22.4 - version: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + specifier: 4.0.0-beta.20250414T061543 + version: 4.0.0-beta.20250414T061543 devDependencies: '@babel/generator': specifier: ^7.27.0 @@ -150,8 +145,8 @@ importers: specifier: workspace:^ version: link:../../packages/shapes '@t3-oss/env-core': - specifier: ^0.11.1 - version: 0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq)) + specifier: ^0.12.0 + version: 0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543) date-fns: specifier: ^4.1.0 version: 4.1.0 @@ -162,8 +157,8 @@ importers: specifier: ^4.11.6 version: 4.11.6 zod: - specifier: 3.22.4 - version: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + specifier: 4.0.0-beta.20250414T061543 + version: 4.0.0-beta.20250414T061543 devDependencies: tsup: specifier: ^8.4.0 @@ -199,8 +194,8 @@ importers: specifier: ^5.0.1 version: 5.0.1(react-hook-form@7.55.0(react@19.1.0)) '@t3-oss/env-nextjs': - specifier: ^0.11.1 - version: 0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq)) + specifier: ^0.12.0 + version: 0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543) '@tanstack/react-query': specifier: ^5.74.3 version: 5.74.3(react@19.1.0) @@ -295,8 +290,8 @@ importers: specifier: ^11.6.1 version: 11.6.1 zod: - specifier: 3.22.4 - version: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + specifier: 4.0.0-beta.20250414T061543 + version: 4.0.0-beta.20250414T061543 devDependencies: '@million/lint': specifier: ^1.0.14 @@ -401,9 +396,6 @@ importers: pako: specifier: ^2.1.0 version: 2.1.0 - zod: - specifier: 3.22.4 - version: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) devDependencies: '@types/pako': specifier: ^2.0.3 @@ -442,8 +434,8 @@ importers: packages/shapes: dependencies: zod: - specifier: 3.22.4 - version: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + specifier: 4.0.0-beta.20250414T061543 + version: 4.0.0-beta.20250414T061543 packages/styles: devDependencies: @@ -2027,23 +2019,33 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} - '@t3-oss/env-core@0.11.1': - resolution: {integrity: sha512-MaxOwEoG1ntCFoKJsS7nqwgcxLW1SJw238AJwfJeaz3P/8GtkxXZsPPolsz1AdYvUTbe3XvqZ/VCdfjt+3zmKw==} + '@t3-oss/env-core@0.12.0': + resolution: {integrity: sha512-lOPj8d9nJJTt81mMuN9GMk8x5veOt7q9m11OSnCBJhwp1QrL/qR+M8Y467ULBSm9SunosryWNbmQQbgoiMgcdw==} peerDependencies: typescript: '>=5.0.0' - zod: ^3.0.0 + valibot: ^1.0.0-beta.7 || ^1.0.0 + zod: ^3.24.0 peerDependenciesMeta: typescript: optional: true + valibot: + optional: true + zod: + optional: true - '@t3-oss/env-nextjs@0.11.1': - resolution: {integrity: sha512-rx2XL9+v6wtOqLNJbD5eD8OezKlQD1BtC0WvvtHwBgK66jnF5+wGqtgkKK4Ygie1LVmoDClths2T4tdFmRvGrQ==} + '@t3-oss/env-nextjs@0.12.0': + resolution: {integrity: sha512-rFnvYk1049RnNVUPvY8iQ55AuQh1Rr+qZzQBh3t++RttCGK4COpXGNxS4+45afuQq02lu+QAOy/5955aU8hRKw==} peerDependencies: typescript: '>=5.0.0' - zod: ^3.0.0 + valibot: ^1.0.0-beta.7 || ^1.0.0 + zod: ^3.24.0 peerDependenciesMeta: typescript: optional: true + valibot: + optional: true + zod: + optional: true '@tailwindcss/node@4.1.4': resolution: {integrity: sha512-MT5118zaiO6x6hNA04OWInuAiP1YISXql8Z+/Y8iisV5nuhM8VXlyhRuqc2PEviPszcXI66W44bCIk500Oolhw==} @@ -2300,6 +2302,9 @@ packages: '@xstate/fsm@1.6.5': resolution: {integrity: sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw==} + '@zod/core@0.5.0': + resolution: {integrity: sha512-9EW5fOng5558DM68WmVtecPzHuROdB5AcBVOBVqtPIup1quYRxxzwzT9+BPNX5Pr+so0wP/Hxv8+pCrBbjKQeg==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -4300,8 +4305,8 @@ packages: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} - zod@3.22.4: - resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zod@4.0.0-beta.20250414T061543: + resolution: {integrity: sha512-1X7/cVHAWBt9jEIIg2Q2GFEApZy1VYe+YBxsjwVMmDZfMvn09CylsKLGZtfjZ/cwYrJha0OIWOh+MouaOj3Zdg==} snapshots: @@ -5911,18 +5916,17 @@ snapshots: dependencies: tslib: 2.8.1 - '@t3-oss/env-core@0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq))': - dependencies: - zod: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + '@t3-oss/env-core@0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543)': optionalDependencies: typescript: 5.8.3 + zod: 4.0.0-beta.20250414T061543 - '@t3-oss/env-nextjs@0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq))': + '@t3-oss/env-nextjs@0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543)': dependencies: - '@t3-oss/env-core': 0.11.1(typescript@5.8.3)(zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq)) - zod: 3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq) + '@t3-oss/env-core': 0.12.0(typescript@5.8.3)(zod@4.0.0-beta.20250414T061543) optionalDependencies: typescript: 5.8.3 + zod: 4.0.0-beta.20250414T061543 '@tailwindcss/node@4.1.4': dependencies: @@ -6191,6 +6195,8 @@ snapshots: '@xstate/fsm@1.6.5': {} + '@zod/core@0.5.0': {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -8130,4 +8136,6 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.7.0 - zod@3.22.4(patch_hash=j5rlizeyx7cjhu35u4l53omnrq): {} + zod@4.0.0-beta.20250414T061543: + dependencies: + '@zod/core': 0.5.0