chore: upgrade zod from v3 to v4#99
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| expect(result.content[0]).toHaveProperty('type', 'text'); | ||
| const errorText = (result.content[0] as TextContent).text; | ||
| expect(errorText).toContain('Required'); | ||
| expect(errorText).toContain('invalid_type'); |
There was a problem hiding this comment.
Create token tool doesn't show any changes in this PR. Assume this is just a downstream effect of the version change, flagging it just in case.
There was a problem hiding this comment.
Correct — this is a direct result of the zod v4 error message format change. In v3, missing required fields produced a 'Required' message. In v4 that changed to 'Invalid input: expected string, received undefined' (code invalid_type). The test assertion was updated to match the new format while still verifying that validation fails and the error references the correct field (feedback_id / note / scopes).
ctufts
left a comment
There was a problem hiding this comment.
Approved, but left a quick comment on the create token tool test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The merge-base changed after approval.
Summary
zodfrom^3.25.42to^4.3.6z.record(valueSchema)calls to the v4-required two-argument formz.record(z.string(), valueSchema)._def.shapeaccess in test (v4 changed it from a function to a plain object).default(1)fromdenoiseinIsochroneToolinput schema — v4 changed.default().optional()to always apply the default even for absent keys, which caused the value to appear in the API URL when not provided by the userTest plan
npm test)npx tsc --noEmit)🤖 Generated with Claude Code