Skip to content

Commit 980e14c

Browse files
committed
Clean up types loading
1 parent 60c8e3f commit 980e14c

File tree

11 files changed

+54
-40
lines changed

11 files changed

+54
-40
lines changed

.configs/tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"alwaysStrict": true,
1111
"noUncheckedIndexedAccess": false,
1212

13+
"types": [],
1314
"exactOptionalPropertyTypes": true,
1415
"skipLibCheck": true,
1516
"forceConsistentCasingInFileNames": true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"tsdown": "^0.12.8",
4343
"tslib": "^2.8.1",
4444
"tsx": "^4.19.3",
45-
"typescript": "^5.5.4",
45+
"typescript": "^5.9.2",
4646
"vitest": "^2.1.9",
4747
"zod": "workspace:*",
4848
"zod3": "npm:zod@~3.24.0",

packages/bench/tsconfig.bench.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"traceResolution": true,
77
"customConditions": ["@zod/source"],
88
"skipDefaultLibCheck": true,
9-
"skipLibCheck": true,
9+
"skipLibCheck": true
1010
}
1111
}

packages/bench/tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../.configs/tsconfig.base.json",
3+
"compilerOptions": {
4+
"noEmit": true,
5+
"extendedDiagnostics": true,
6+
"traceResolution": true,
7+
"customConditions": ["@zod/source"],
8+
"skipDefaultLibCheck": true,
9+
"skipLibCheck": true,
10+
"types": ["node"]
11+
}
12+
}

packages/tsc/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"module": "NodeNext",
77
"customConditions": [],
88
"incremental": false,
9-
"noEmit": true
9+
"noEmit": true,
10+
"types": ["node"]
1011
}
1112
}

packages/zod/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zod/zod",
3-
"version": "4.1.0",
3+
"version": "4.0.17",
44
"exports": {
55
"./package.json": "./package.json",
66
".": "./src/index.ts",

packages/zod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zod",
3-
"version": "4.1.0",
3+
"version": "4.0.17",
44
"type": "module",
55
"license": "MIT",
66
"author": "Colin McDonnell <[email protected]>",

packages/zod/src/v4/core/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ export function cleanEnum(obj: Record<string, EnumValue>): EnumValue[] {
858858
}
859859

860860
// Codec utility functions
861-
export function base64ToUint8Array(base64: string): Uint8Array {
861+
export function base64ToUint8Array(base64: string): Uint8Array<ArrayBuffer> {
862862
const binaryString = atob(base64);
863863
const bytes = new Uint8Array(binaryString.length);
864864
for (let i = 0; i < binaryString.length; i++) {
@@ -875,7 +875,7 @@ export function uint8ArrayToBase64(bytes: Uint8Array): string {
875875
return btoa(binaryString);
876876
}
877877

878-
export function base64urlToUint8Array(base64url: string): Uint8Array {
878+
export function base64urlToUint8Array(base64url: string): Uint8Array<ArrayBuffer> {
879879
const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
880880
const padding = "=".repeat((4 - (base64.length % 4)) % 4);
881881
return base64ToUint8Array(base64 + padding);
@@ -885,7 +885,7 @@ export function uint8ArrayToBase64url(bytes: Uint8Array): string {
885885
return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
886886
}
887887

888-
export function hexToUint8Array(hex: string): Uint8Array {
888+
export function hexToUint8Array(hex: string): Uint8Array<ArrayBuffer> {
889889
const cleanHex = hex.replace(/^0x/, "");
890890
if (cleanHex.length % 2 !== 0) {
891891
throw new Error("Invalid hex string length");
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const version = {
22
major: 4,
3-
minor: 1,
4-
patch: 0 as number,
3+
minor: 0,
4+
patch: 17 as number,
55
} as const;

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)