From 5533f42f88c8d65d9b80ac3b869e967c54bb12ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 03:27:18 +0000 Subject: [PATCH 1/2] chore(deps): update dependency zod to v4.0.10 --- pnpm-lock.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0467995f22..990ae50180 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,7 +44,7 @@ catalogs: version: 6.21.3 zod: specifier: ^4.0.0 - version: 4.0.8 + version: 4.0.10 overrides: '@scarf/scarf': npm:empty-npm-package@1.0.0 @@ -104,7 +104,7 @@ importers: version: link:../express-zod-api zod: specifier: catalog:dev - version: 4.0.8 + version: 4.0.10 compat-test: devDependencies: @@ -140,7 +140,7 @@ importers: version: link:../express-zod-api zod: specifier: catalog:dev - version: 4.0.8 + version: 4.0.10 example: devDependencies: @@ -167,7 +167,7 @@ importers: version: 6.21.3 zod: specifier: catalog:dev - version: 4.0.8 + version: 4.0.10 express-zod-api: dependencies: @@ -249,7 +249,7 @@ importers: version: 6.21.3 zod: specifier: catalog:dev - version: 4.0.8 + version: 4.0.10 issue952-test: dependencies: @@ -267,7 +267,7 @@ importers: version: 5.8.3 zod: specifier: catalog:dev - version: 4.0.8 + version: 4.0.10 migration: devDependencies: @@ -2379,8 +2379,8 @@ packages: zod@3.25.35: resolution: {integrity: sha512-Fe0Tz/mSbIraMd1/RR1jbtPMsrzX/SNwCmEpRqB0xB2YBnoRfQqyu4aIqWKWrx9C2XjF4SY47IVIt30+RVGSsw==} - zod@4.0.8: - resolution: {integrity: sha512-+MSh9cZU9r3QKlHqrgHMTSr3QwMGv4PLfR0M4N/sYWV5/x67HgXEhIGObdBkpnX8G78pTgWnIrBL2lZcNJOtfg==} + zod@4.0.10: + resolution: {integrity: sha512-3vB+UU3/VmLL2lvwcY/4RV2i9z/YU0DTV/tDuYjrwmx5WeJ7hwy+rGEEx8glHp6Yxw7ibRbKSaIFBgReRPe5KA==} snapshots: @@ -4506,4 +4506,4 @@ snapshots: zod@3.25.35: {} - zod@4.0.8: {} + zod@4.0.10: {} From 6f08b53505807cecfad01c0a13b9da8b6dcbcb79 Mon Sep 17 00:00:00 2001 From: Robin Tail Date: Fri, 25 Jul 2025 08:18:41 +0200 Subject: [PATCH 2/2] Updating snapshots. --- .../__snapshots__/date-in-schema.spec.ts.snap | 78 ++++++++++++++++--- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/express-zod-api/tests/__snapshots__/date-in-schema.spec.ts.snap b/express-zod-api/tests/__snapshots__/date-in-schema.spec.ts.snap index b4bc3da58d..0164ecc2f5 100644 --- a/express-zod-api/tests/__snapshots__/date-in-schema.spec.ts.snap +++ b/express-zod-api/tests/__snapshots__/date-in-schema.spec.ts.snap @@ -3,12 +3,41 @@ exports[`ez.dateIn() > parsing > should handle invalid date 1`] = ` [ { - "code": "invalid_format", - "format": "date", - "message": "Invalid ISO date", - "origin": "string", + "code": "invalid_union", + "errors": [ + [ + { + "code": "invalid_format", + "format": "date", + "message": "Invalid ISO date", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$/", + }, + ], + [ + { + "code": "invalid_format", + "format": "datetime", + "message": "Invalid ISO datetime", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/", + }, + ], + [ + { + "code": "invalid_format", + "format": "datetime", + "message": "Invalid ISO datetime", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$/", + }, + ], + ], + "message": "Invalid input", "path": [], - "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$/", }, ] `; @@ -16,12 +45,41 @@ exports[`ez.dateIn() > parsing > should handle invalid date 1`] = ` exports[`ez.dateIn() > parsing > should handle invalid format 1`] = ` [ { - "code": "invalid_format", - "format": "date", - "message": "Invalid ISO date", - "origin": "string", + "code": "invalid_union", + "errors": [ + [ + { + "code": "invalid_format", + "format": "date", + "message": "Invalid ISO date", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$/", + }, + ], + [ + { + "code": "invalid_format", + "format": "datetime", + "message": "Invalid ISO datetime", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/", + }, + ], + [ + { + "code": "invalid_format", + "format": "datetime", + "message": "Invalid ISO datetime", + "origin": "string", + "path": [], + "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|))$/", + }, + ], + ], + "message": "Invalid input", "path": [], - "pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$/", }, ] `;