Repository navigation
fix(deps): bump zod to 4 past the oversized-collection advisory - #28
Merged
Merged
Conversation
Zod before 4.6.6 can exhaust memory while validating oversized constrained collections (Dependabot alert #12, high). No 3.x release carries the fix, so this moves to zod 4. The schemas need no change beyond replacing the deprecated z.string().url() with z.url(). A test now pins that upstream.yaml still rejects a non-https repo and a relative licence URL; it passes on zod 3 and 4 alike. The bundle grows from about 432 kB to 1.05 MB, since zod 4 ships its locales with the classic API.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zod before 4.6.6 can exhaust memory while validating oversized constrained collections (Dependabot alert #12, high). No 3.x release carries the fix, so this moves
zodfrom^3.24.1to^4.6.7.z.string().url()becomingz.url()insrc/upstream.ts.upstream.yamlstill rejects a non-httpsrepoand a relativelicense_url. It passes on zod 3 and 4 alike, so URL validation did not shift.npm run check: 190 tests, 100% coverage.npm audit --omit=dev: 0 vulnerabilities.generate --framework rails --framework react --writethencheckexits 0.Trade-off:
dist/agent-stack.mjsgrows from about 432 kB to 1.05 MB, because zod 4's classic API pulls in its locales.