mirror of
https://github.com/hanzoai/zod.git
synced 2026-09-24 17:04:49 +00:00
Clean up types loading
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"alwaysStrict": true,
|
||||
"noUncheckedIndexedAccess": false,
|
||||
|
||||
"types": [],
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
"tsdown": "^0.12.8",
|
||||
"tslib": "^2.8.1",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.5.4",
|
||||
"typescript": "^5.9.2",
|
||||
"vitest": "^2.1.9",
|
||||
"zod": "workspace:*",
|
||||
"zod3": "npm:zod@~3.24.0",
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"traceResolution": true,
|
||||
"customConditions": ["@zod/source"],
|
||||
"skipDefaultLibCheck": true,
|
||||
"skipLibCheck": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../.configs/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"extendedDiagnostics": true,
|
||||
"traceResolution": true,
|
||||
"customConditions": ["@zod/source"],
|
||||
"skipDefaultLibCheck": true,
|
||||
"skipLibCheck": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
"module": "NodeNext",
|
||||
"customConditions": [],
|
||||
"incremental": false,
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zod/zod",
|
||||
"version": "4.1.0",
|
||||
"version": "4.0.17",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "zod",
|
||||
"version": "4.1.0",
|
||||
"version": "4.0.17",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"author": "Colin McDonnell <[email protected]>",
|
||||
|
||||
@@ -858,7 +858,7 @@ export function cleanEnum(obj: Record<string, EnumValue>): EnumValue[] {
|
||||
}
|
||||
|
||||
// Codec utility functions
|
||||
export function base64ToUint8Array(base64: string): Uint8Array {
|
||||
export function base64ToUint8Array(base64: string): Uint8Array<ArrayBuffer> {
|
||||
const binaryString = atob(base64);
|
||||
const bytes = new Uint8Array(binaryString.length);
|
||||
for (let i = 0; i < binaryString.length; i++) {
|
||||
@@ -875,7 +875,7 @@ export function uint8ArrayToBase64(bytes: Uint8Array): string {
|
||||
return btoa(binaryString);
|
||||
}
|
||||
|
||||
export function base64urlToUint8Array(base64url: string): Uint8Array {
|
||||
export function base64urlToUint8Array(base64url: string): Uint8Array<ArrayBuffer> {
|
||||
const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
|
||||
const padding = "=".repeat((4 - (base64.length % 4)) % 4);
|
||||
return base64ToUint8Array(base64 + padding);
|
||||
@@ -885,7 +885,7 @@ export function uint8ArrayToBase64url(bytes: Uint8Array): string {
|
||||
return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
||||
}
|
||||
|
||||
export function hexToUint8Array(hex: string): Uint8Array {
|
||||
export function hexToUint8Array(hex: string): Uint8Array<ArrayBuffer> {
|
||||
const cleanHex = hex.replace(/^0x/, "");
|
||||
if (cleanHex.length % 2 !== 0) {
|
||||
throw new Error("Invalid hex string length");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const version = {
|
||||
major: 4,
|
||||
minor: 1,
|
||||
patch: 0 as number,
|
||||
minor: 0,
|
||||
patch: 17 as number,
|
||||
} as const;
|
||||
|
||||
Generated
+28
-28
@@ -82,7 +82,7 @@ importers:
|
||||
version: 14.0.0
|
||||
tsdown:
|
||||
specifier: ^0.12.8
|
||||
version: 0.12.8(typescript@5.5.4)
|
||||
version: 0.12.8(typescript@5.9.2)
|
||||
tslib:
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
@@ -90,8 +90,8 @@ importers:
|
||||
specifier: ^4.19.3
|
||||
version: 4.19.3
|
||||
typescript:
|
||||
specifier: ^5.5.4
|
||||
version: 5.5.4
|
||||
specifier: ^5.9.2
|
||||
version: 5.9.2
|
||||
vitest:
|
||||
specifier: ^2.1.9
|
||||
version: 2.1.9(@types/[email protected])([email protected])([email protected])
|
||||
@@ -103,7 +103,7 @@ importers:
|
||||
version: [email protected]
|
||||
zshy:
|
||||
specifier: ^0.3.5
|
||||
version: 0.3.5(typescript@5.5.4)
|
||||
version: 0.3.5(typescript@5.9.2)
|
||||
|
||||
packages/bench:
|
||||
devDependencies:
|
||||
@@ -112,7 +112,7 @@ importers:
|
||||
version: 2.1.19
|
||||
valibot:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(typescript@5.8.2)
|
||||
version: 1.0.0(typescript@5.9.2)
|
||||
zod:
|
||||
specifier: workspace:*
|
||||
version: link:../zod
|
||||
@@ -228,7 +228,7 @@ importers:
|
||||
version: 0.4.4([email protected])
|
||||
'@rollup/plugin-typescript':
|
||||
specifier: ^12.1.2
|
||||
version: 12.1.2([email protected])([email protected])(typescript@5.8.2)
|
||||
version: 12.1.2([email protected])([email protected])(typescript@5.9.2)
|
||||
'@types/node':
|
||||
specifier: ^22.13.13
|
||||
version: 22.13.13
|
||||
@@ -243,7 +243,7 @@ importers:
|
||||
version: 10.0.0
|
||||
valibot:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(typescript@5.8.2)
|
||||
version: 1.0.0(typescript@5.9.2)
|
||||
zod:
|
||||
specifier: workspace:*
|
||||
version: link:../zod
|
||||
@@ -270,7 +270,7 @@ importers:
|
||||
version: 9.5.2
|
||||
valibot:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(typescript@5.8.2)
|
||||
version: 1.0.0(typescript@5.9.2)
|
||||
zod:
|
||||
specifier: workspace:*
|
||||
version: link:../zod
|
||||
@@ -5354,11 +5354,6 @@ packages:
|
||||
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==}
|
||||
engines: {node: '>=14.17'}
|
||||
@@ -5369,6 +5364,11 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
[email protected]:
|
||||
resolution: {integrity: sha512-nqG5NNL2wFVGZ0NA/aCFw0oJ2pxSf1lwg4Z5ill8wd7K4KX/rQbHlwbh+bjctXL5Ly1xtzHenHGOK0b+lG6JVg==}
|
||||
|
||||
@@ -7339,11 +7339,11 @@ snapshots:
|
||||
optionalDependencies:
|
||||
rollup: 4.37.0
|
||||
|
||||
'@rollup/[email protected]([email protected])([email protected])(typescript@5.8.2)':
|
||||
'@rollup/[email protected]([email protected])([email protected])(typescript@5.9.2)':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.4([email protected])
|
||||
resolve: 1.22.10
|
||||
typescript: 5.8.2
|
||||
typescript: 5.9.2
|
||||
optionalDependencies:
|
||||
rollup: 4.37.0
|
||||
tslib: 2.8.1
|
||||
@@ -10495,7 +10495,7 @@ snapshots:
|
||||
glob: 11.0.2
|
||||
package-json-from-dist: 1.0.1
|
||||
|
||||
[email protected]([email protected])(typescript@5.5.4):
|
||||
[email protected]([email protected])(typescript@5.9.2):
|
||||
dependencies:
|
||||
'@babel/generator': 7.27.5
|
||||
'@babel/parser': 7.27.5
|
||||
@@ -10507,7 +10507,7 @@ snapshots:
|
||||
get-tsconfig: 4.10.1
|
||||
rolldown: 1.0.0-beta.15
|
||||
optionalDependencies:
|
||||
typescript: 5.5.4
|
||||
typescript: 5.9.2
|
||||
transitivePeerDependencies:
|
||||
- oxc-resolver
|
||||
- supports-color
|
||||
@@ -10908,7 +10908,7 @@ snapshots:
|
||||
resolve-import: 2.0.0
|
||||
rimraf: 6.0.1
|
||||
sync-content: 2.0.1
|
||||
typescript: 5.8.2
|
||||
typescript: 5.9.2
|
||||
walk-up-path: 4.0.0
|
||||
|
||||
[email protected]: {}
|
||||
@@ -11017,7 +11017,7 @@ snapshots:
|
||||
'@ts-morph/common': 0.13.0
|
||||
code-block-writer: 11.0.3
|
||||
|
||||
[email protected](typescript@5.5.4):
|
||||
[email protected](typescript@5.9.2):
|
||||
dependencies:
|
||||
ansis: 4.1.0
|
||||
cac: 6.7.14
|
||||
@@ -11027,13 +11027,13 @@ snapshots:
|
||||
empathic: 1.1.0
|
||||
hookable: 5.5.3
|
||||
rolldown: 1.0.0-beta.15
|
||||
rolldown-plugin-dts: 0.13.11([email protected])(typescript@5.5.4)
|
||||
rolldown-plugin-dts: 0.13.11([email protected])(typescript@5.9.2)
|
||||
semver: 7.7.2
|
||||
tinyexec: 1.0.1
|
||||
tinyglobby: 0.2.14
|
||||
unconfig: 7.3.2
|
||||
optionalDependencies:
|
||||
typescript: 5.5.4
|
||||
typescript: 5.9.2
|
||||
transitivePeerDependencies:
|
||||
- '@typescript/native-preview'
|
||||
- oxc-resolver
|
||||
@@ -11051,7 +11051,7 @@ snapshots:
|
||||
resolve-import: 2.0.0
|
||||
rimraf: 6.0.1
|
||||
sync-content: 2.0.1
|
||||
typescript: 5.8.2
|
||||
typescript: 5.9.2
|
||||
walk-up-path: 4.0.0
|
||||
|
||||
[email protected]: {}
|
||||
@@ -11073,12 +11073,12 @@ snapshots:
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected]:
|
||||
dependencies:
|
||||
'@quansync/fs': 0.1.3
|
||||
@@ -11200,9 +11200,9 @@ snapshots:
|
||||
is-typed-array: 1.1.15
|
||||
which-typed-array: 1.1.19
|
||||
|
||||
[email protected](typescript@5.8.2):
|
||||
[email protected](typescript@5.9.2):
|
||||
optionalDependencies:
|
||||
typescript: 5.8.2
|
||||
typescript: 5.9.2
|
||||
|
||||
[email protected]:
|
||||
dependencies:
|
||||
@@ -11398,11 +11398,11 @@ snapshots:
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
[email protected](typescript@5.5.4):
|
||||
[email protected](typescript@5.9.2):
|
||||
dependencies:
|
||||
arg: 5.0.2
|
||||
globby: 14.1.0
|
||||
table: 6.9.0
|
||||
typescript: 5.5.4
|
||||
typescript: 5.9.2
|
||||
|
||||
[email protected]: {}
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
"customConditions": ["@zod/source"],
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"types": ["node"]
|
||||
"types": []
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.mts", "**/*.cts"],
|
||||
"exclude": ["**/*.d.ts", "**/*.d.cts", "**/*.d.mts", "packages/docs"]
|
||||
"exclude": ["**/*.d.ts", "**/*.d.cts", "**/*.d.mts", "packages/docs", "vitest.root.mjs"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user