-
-
Notifications
You must be signed in to change notification settings - Fork 268
Add support for bigints to multipleOf validation action #1164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for bigints in the multipleOf validation action, extending both the API and the library behavior.
- Updated type definitions in properties files to accept both number and bigint.
- Modified the internal multipleOf action implementation to use bigint where applicable and added unit tests for bigint support.
- Updated changelog to reflect the new feature.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
website/src/routes/api/(types)/MultipleOfIssue/properties.ts | Changed type from "number" to a union of "number" and "bigint". |
website/src/routes/api/(types)/MultipleOfAction/properties.ts | Updated to support bigint in type definitions. |
website/src/routes/api/(actions)/multipleOf/properties.ts | Modified to use union type for bigint support. |
library/src/utils/_stringify/_stringify.ts | Added a TODO comment to consider appending an "n" suffix for bigints. |
library/src/actions/multipleOf/multipleOf.ts | Updated generic constraints and modulo check to handle bigint values. |
library/src/actions/multipleOf/multipleOf.test.ts | Added tests to validate behavior for bigint inputs. |
library/src/actions/multipleOf/multipleOf.test-d.ts | Adjusted type inference tests to include bigint support. |
library/CHANGELOG.md | Documented the addition of bigint support. |
commit: |
Improvements: - update the 'Related' section of related schemas & actions - fix the 'Definition' section of `MultipleOfIssue`
Valibot v1.1.0 is available! |
Solves #1128