Skip to content

Conversation

fabian-hiller
Copy link
Owner

Solves #1128

@Copilot Copilot AI review requested due to automatic review settings April 20, 2025 19:52
Copy link

vercel bot commented Apr 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valibot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2025 6:52pm

@fabian-hiller fabian-hiller self-assigned this Apr 20, 2025
@fabian-hiller fabian-hiller added the enhancement New feature or request label Apr 20, 2025
Copy link

@Copilot Copilot AI left a 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.

Copy link

pkg-pr-new bot commented Apr 20, 2025

Open in StackBlitz

npm i https://pkg.pr.new/valibot@1164

commit: d326150

Improvements:
- update the 'Related' section of related schemas & actions
- fix the 'Definition' section of `MultipleOfIssue`
@fabian-hiller fabian-hiller merged commit 7731a0f into main Apr 26, 2025
16 checks passed
@fabian-hiller fabian-hiller deleted the feat-bigint-multiple-of branch April 26, 2025 20:31
@fabian-hiller
Copy link
Owner Author

Valibot v1.1.0 is available!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants