chore(deps): upgrade zod to 4.4.3#5656
Conversation
- Migrate W3mFrameSchema to z.discriminatedUnion to avoid TS2589 - Update z.string().email() -> z.email() - Replace errorMap/invalid_type_error with unified error parameter - Replace z.nativeEnum with z.enum (now accepts native enums in v4) - Update z.record(V) -> z.record(K, V) signature - Update ZodError.errors -> ZodError.issues - Update test expectations for new "Invalid input: ..." error format Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 59ec888 The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@CipherSight is attempting to deploy a commit to the Reown Team on Vercel. A member of the Team first needs to authorize it. |
|
All contributors have signed the CTA ✍️ ✅ |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
I have read the CTA Document and I hereby sign the CTA |
Summary
Upgrades
zodfrom3.22.4(pinned ~2 years ago) to4.4.3in the two packages that consume it:@reown/appkit-walletand@reown/appkit-experimental.Why
3.22.4was strictly pinned and is now far behind upstream.Changes
@reown/appkit-walletW3mFrameSchemafrom long chained.or().or()...and()calls (~110 across the file) toz.discriminatedUnion('type', [...])+z.intersection(...). Required — Zod 4's stricter generics raiseTS2589: Type instantiation is excessively deepon the original chains. Bonus: faster runtime parsing and better validation error messages.z.string().email()→ top-levelz.email()(Zod 4 API).@reown/appkit-experimentalerrorMap/invalid_type_error→ unifiederrorparameter.z.nativeEnum(X)→z.enum(X)(now accepts native enums directly).z.record(V)→z.record(K, V)(single-arg form removed).ZodError.errors→ZodError.issues.ERROR_MESSAGESconstants and test expectations to match Zod 4'sInvalid input: expected X, received Yformat.Compatibility
W3mFrameTypes.AppEvent,FrameEvent,RPCRequest, etc.) remain structurally equivalent — they're still discriminated unions ontype/method.safeParsefor postMessage validation is preserved.Test plan
pnpm installturbo buildfor wallet, experimental, appkit, scaffold-ui, ui, controllers, utils, pay, siwe → 11/11 OKturbo typecheckfor wallet, experimental, appkit, adapters (wagmi, ethers, solana, bitcoin) → 17/17 OKturbo lintfor wallet & experimental → OKpnpm --filter @reown/appkit-experimental test→ 126/126 OKpnpm --filter @reown/appkit-wallet test→ no new failures (the 25 pre-existing failures fromlocalStorage.getItem is not a functionin jsdom also fail onmain)pnpm prettier:format→ no pending changespatchfor both packages)