[PR #623] [MERGED] refactor: upgrade to Zod v4 #716

Closed
opened 2025-10-08 00:15:49 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/623
Author: @stonith404
Created: 6/6/2025
Status: Merged
Merged: 6/8/2025
Merged by: @stonith404

Base: mainHead: refactor/zod-4


📝 Commits (5)

  • 6179d97 migrate to zod v4
  • 4bcb2f3 show errors on corresponding text inputs for federated identities input
  • b247f0f remove unnecessary translations
  • daceedf test Zod validation messages in e2e tests
  • 9df8500 fix type error on jwks

📊 Changes

18 files changed (+270 additions, -51 deletions)

View changed files

📝 frontend/messages/en.json (+0 -2)
📝 frontend/package-lock.json (+176 -6)
📝 frontend/package.json (+1 -1)
📝 frontend/src/lib/stores/user-store.ts (+2 -2)
📝 frontend/src/lib/types/oidc.type.ts (+2 -2)
📝 frontend/src/lib/utils/form-util.ts (+14 -12)
frontend/src/lib/utils/locale.util.ts (+10 -0)
📝 frontend/src/routes/settings/account/account-form.svelte (+2 -2)
📝 frontend/src/routes/settings/account/locale-picker.svelte (+2 -1)
📝 frontend/src/routes/settings/admin/api-keys/api-key-form.svelte (+3 -3)
📝 frontend/src/routes/settings/admin/application-configuration/forms/app-config-email-form.svelte (+2 -2)
📝 frontend/src/routes/settings/admin/application-configuration/forms/app-config-general-form.svelte (+1 -1)
📝 frontend/src/routes/settings/admin/application-configuration/forms/app-config-ldap-form.svelte (+2 -2)
📝 frontend/src/routes/settings/admin/oidc-clients/federated-identities-input.svelte (+27 -7)
📝 frontend/src/routes/settings/admin/oidc-clients/oidc-client-form.svelte (+14 -5)
📝 frontend/src/routes/settings/admin/user-groups/user-group-form.svelte (+1 -1)
📝 frontend/src/routes/settings/admin/users/user-form.svelte (+2 -2)
📝 tests/specs/account-settings.spec.ts (+9 -0)

📄 Description

Zod 4 brings the advantage of translated validation messages. The translated validation messages are included in the package and will be lazily loaded based on the user's locale.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/623 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 6/6/2025 **Status:** ✅ Merged **Merged:** 6/8/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `refactor/zod-4` --- ### 📝 Commits (5) - [`6179d97`](https://github.com/pocket-id/pocket-id/commit/6179d97be984e743a25bacd726c093134d9facbf) migrate to zod v4 - [`4bcb2f3`](https://github.com/pocket-id/pocket-id/commit/4bcb2f3efe0b0d9ee59021f8a1133f1d5aff4f46) show errors on corresponding text inputs for federated identities input - [`b247f0f`](https://github.com/pocket-id/pocket-id/commit/b247f0fd4f6ef9533d3bb4495ebd506c58a9f55e) remove unnecessary translations - [`daceedf`](https://github.com/pocket-id/pocket-id/commit/daceedf9897709569162b57fb55e0a7da720a4b3) test Zod validation messages in e2e tests - [`9df8500`](https://github.com/pocket-id/pocket-id/commit/9df8500f5e3d62324700d0fd58eab3afee752fc5) fix type error on jwks ### 📊 Changes **18 files changed** (+270 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `frontend/messages/en.json` (+0 -2) 📝 `frontend/package-lock.json` (+176 -6) 📝 `frontend/package.json` (+1 -1) 📝 `frontend/src/lib/stores/user-store.ts` (+2 -2) 📝 `frontend/src/lib/types/oidc.type.ts` (+2 -2) 📝 `frontend/src/lib/utils/form-util.ts` (+14 -12) ➕ `frontend/src/lib/utils/locale.util.ts` (+10 -0) 📝 `frontend/src/routes/settings/account/account-form.svelte` (+2 -2) 📝 `frontend/src/routes/settings/account/locale-picker.svelte` (+2 -1) 📝 `frontend/src/routes/settings/admin/api-keys/api-key-form.svelte` (+3 -3) 📝 `frontend/src/routes/settings/admin/application-configuration/forms/app-config-email-form.svelte` (+2 -2) 📝 `frontend/src/routes/settings/admin/application-configuration/forms/app-config-general-form.svelte` (+1 -1) 📝 `frontend/src/routes/settings/admin/application-configuration/forms/app-config-ldap-form.svelte` (+2 -2) 📝 `frontend/src/routes/settings/admin/oidc-clients/federated-identities-input.svelte` (+27 -7) 📝 `frontend/src/routes/settings/admin/oidc-clients/oidc-client-form.svelte` (+14 -5) 📝 `frontend/src/routes/settings/admin/user-groups/user-group-form.svelte` (+1 -1) 📝 `frontend/src/routes/settings/admin/users/user-form.svelte` (+2 -2) 📝 `tests/specs/account-settings.spec.ts` (+9 -0) </details> ### 📄 Description Zod 4 brings the advantage of translated validation messages. The translated validation messages are included in the package and will be lazily loaded based on the user's locale. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-08 00:15:50 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#716