Skip to content

Commit 4e61b53

Browse files
Testing zod@4 (#63)
1 parent e5080d1 commit 4e61b53

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
"tsup": "^8.2.4",
2525
"typescript": "^5.5.4",
2626
"vitest": "latest",
27-
"zod": "latest"
27+
"zod": "4.0.0-beta.20250420T053007"
2828
},
29-
"files": ["README.md", "./dist/*"],
29+
"files": [
30+
"README.md",
31+
"./dist/*"
32+
],
3033
"repository": {
3134
"type": "git",
3235
"url": "git+https://github.com/gustavoguichard/make-service.git"

pnpm-lock.yaml

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type } from 'arktype'
22
import { deepCamelKeys } from 'string-ts'
3-
import * as z from 'zod'
3+
import { z } from 'zod'
44
import * as subject from './api'
55
import { HTTP_METHODS } from './constants'
66
import { ParseResponseError } from './primitives'
@@ -456,7 +456,10 @@ describe('typedResponse', () => {
456456
`"message": "Failed to parse response.json"`
457457
)
458458
expect(error.issues).toMatchObject([
459-
{ message: 'Expected string, received number', path: ['foo'] },
459+
{
460+
message: 'Invalid input: expected string, received number',
461+
path: ['foo'],
462+
},
460463
])
461464
}
462465
})

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { StandardSchemaV1 } from 'zod/lib/standard-schema'
1+
import type { StandardSchemaV1 } from '@standard-schema/spec'
22
import type { HTTP_METHODS } from './constants'
33

44
type JSONValue =

0 commit comments

Comments
 (0)