Skip to content

BREAKING: Mark All Integers Safe & Tighten Schema - #888

Merged
bachmacintosh merged 2 commits into
v3from
safe-integers
Oct 8, 2026
Merged

bachmacintosh merged 2 commits into
v3from
safe-integers

Conversation

@bachmacintosh

Copy link
Copy Markdown
Collaborator

Description

This PR marks as many known integers as a SafeInteger type as possible, going beyond just parameter arguments; this will help make the values more reusable should we make further adjustments to the type, such as branding it.

We also used this PR as an opportunity to change any v.union([type, v.null()]) items to simply v.nullable(type) for brevity; this may be a breaking change for any consumers relying on the issue structure when parsing fails. We also found a couple zod schema that weren't using z.toZod when they should've.

Nature of Pull Request

This Pull Request:

  • Adds/Updates Type(s)/Schemas
  • Adds/Updates Helper Functions/Type Guards
  • Updates Documentation
  • Updates Project and/or Community Health files (e.g. README, GitHub Actions, etc.)

Its changes constitutes a:

  • Non-code change (i.e. no version bump)
  • Bug Fix or Other Small Changes (i.e. patch version bump)
  • Forward-compatible Enhancement (i.e. minor version bump)
  • ⚠️ BREAKING CHANGE regarding TypeScript, Package, and/or WaniKani API version(s) (i.e. MAJOR version bump)

Contribution Terms

I understand that by submitting this Pull Request:

Signed-off-by: Collin Bachman <3395010+bachmacintosh@users.noreply.github.com>
Signed-off-by: Collin Bachman <3395010+bachmacintosh@users.noreply.github.com>
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
packages/types/src/v20170710/base.ts 100.00% <ø> (ø)
...s/types/src/v20170710/spaced-repetition-systems.ts 100.00% <ø> (ø)
packages/types/src/v20170710/user.ts 100.00% <ø> (ø)
packages/valibot/src/v20170710/assignments.ts 100.00% <ø> (ø)
packages/valibot/src/v20170710/base.ts 100.00% <ø> (ø)
...ckages/valibot/src/v20170710/level-progressions.ts 100.00% <ø> (ø)
packages/valibot/src/v20170710/resets.ts 100.00% <ø> (ø)
...ackages/valibot/src/v20170710/review-statistics.ts 100.00% <ø> (ø)
packages/valibot/src/v20170710/reviews.ts 100.00% <ø> (ø)
...valibot/src/v20170710/spaced-repetition-systems.ts 100.00% <ø> (ø)
... and 17 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bachmacintosh
bachmacintosh added this pull request to the merge queue Oct 8, 2026
Merged via the queue into v3 with commit c0ca1bd Oct 8, 2026
8 checks passed
@bachmacintosh
bachmacintosh deleted the safe-integers branch October 8, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant