Skip to content

Commit 85a6264

Browse files
authored
support npm zod 4.0.0 release (#625)
* support zod 4.0.0 * spacing
1 parent 6dadc14 commit 85a6264

File tree

219 files changed

+219
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+219
-219
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"svelte": "3.x || 4.x || >=5.0.0-next.51",
128128
"valibot": "^1.0.0",
129129
"yup": "^1.4.0",
130-
"zod": "^3.25.0"
130+
"zod": "^3.25.0 || ^4.0.0"
131131
},
132132
"peerDependenciesMeta": {
133133
"@exodus/schemasafe": {

src/lib/adapters/typeSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
InferOutput as Output
1515
} from 'valibot';
1616
import type { Schema as Schema$2, InferType } from 'yup';
17-
import type { ZodTypeAny, input, output } from 'zod';
17+
import type { ZodTypeAny, input, output } from 'zod/v3';
1818
import type { $ZodType, input as zod4Input, output as zod4Output } from 'zod/v4/core';
1919
import type { SchemaTypes, Infer as VineInfer } from '@vinejs/vine/types';
2020
import type { FromSchema, JSONSchema } from 'json-schema-to-ts';

src/lib/adapters/zod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ZodErrorMap, type ZodType, type ZodTypeDef } from 'zod';
1+
import { type ZodErrorMap, type ZodType, type ZodTypeDef } from 'zod/v3';
22
import type { JSONSchema7 } from 'json-schema';
33
import {
44
type AdapterOptions,

src/routes/(v1)/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { superValidate } from '$lib/superValidate.js';
22
import { zod } from '$lib/adapters/zod.js';
3-
import { z } from 'zod';
3+
import { z } from 'zod/v3';
44
import { error, fail } from '@sveltejs/kit';
55
import { redirect } from 'sveltekit-flash-message/server';
66
import { RateLimiter } from 'sveltekit-rate-limiter/server';

src/routes/(v1)/dates/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Actions, PageServerLoad } from './$types.js';
22
import { superValidate } from '$lib/server/index.js';
33
import { zod } from '$lib/adapters/zod.js';
44

5-
import type { z } from 'zod';
5+
import type { z } from 'zod/v3';
66
import { schema, schemaToStr } from './schema.js';
77

88
export const load = (async ({ url }) => {

src/routes/(v1)/dates/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from 'zod';
1+
import { z } from 'zod/v3';
22

33
export const schema = z.object({
44
str: z.string().datetime(),

src/routes/(v1)/empty-proxy/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { message, superValidate } from '$lib/server/index.js';
22
import { zod } from '$lib/adapters/zod.js';
33

44
import { fail } from '@sveltejs/kit';
5-
import { z } from 'zod';
5+
import { z } from 'zod/v3';
66

77
const schema = z.object({
88
string: z.string().min(2).nullable(),

src/routes/(v1)/files/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { message, superValidate } from '$lib/server/index.js';
22
import { zod } from '$lib/adapters/zod.js';
33

4-
import { z } from 'zod';
4+
import { z } from 'zod/v3';
55
import { fail } from '@sveltejs/kit';
66
import type { Actions, PageServerLoad } from './$types.js';
77

src/routes/(v1)/multiple/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { error, fail } from '@sveltejs/kit';
55
import type { Actions, PageServerLoad } from './$types.js';
66

77
import { userSchema, users } from '../users.js';
8-
import { z } from 'zod';
8+
import { z } from 'zod/v3';
99

1010
type Message = { message: string };
1111

src/routes/(v1)/multiple2/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { message, superValidate } from '$lib/server/index.js';
22
import { zod } from '$lib/adapters/zod.js';
33

44
import { fail } from '@sveltejs/kit';
5-
import { z } from 'zod';
5+
import { z } from 'zod/v3';
66
import type { Actions } from './$types.js';
77

88
const loginSchema = z.object({

0 commit comments

Comments
 (0)