Skip to content

fix: restrict {{$randomInt}} output to 0–1000 as per docs (#4847) #4938

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

Merged
merged 1 commit into from
Jul 4, 2025

Conversation

junglesub
Copy link
Contributor

Description

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

🔥 Related Issues

📷 Screenshot

스크린샷 2025-06-18 오후 11 17 00

📝 Description

This PR fixes the behavior of {{$randomInt}} to align with the documented range of 0 to 1000.

Although the maintainer mentioned the range should be 1 to 1000, the current documentation specifies 0 to 1000, so I implemented it accordingly for now.

Additionally, I updated the relevant test cases to reflect the corrected range.


✅ Changes

  • Updated {{$randomInt}} implementation to return integers between 0 and 1000 (inclusive)
  • Modified test cases to match the expected output range

📌 Note

If the intended range is confirmed to be 1–1000, I’m happy to adjust the implementation accordingly.

…#4847)

Previously, `{{$randomInt}}` returned values across the full JavaScript number range.
This commit updates the generator to produce integers between 0 and 1000,
matching the documented behavior.

Fixes usebruno#4847
@lohit-bruno lohit-bruno merged commit 795b365 into usebruno:main Jul 4, 2025
3 checks passed
sanish-bruno pushed a commit to sanish-bruno/bruno that referenced this pull request Jul 15, 2025
…#4847) (usebruno#4938)

Previously, `{{$randomInt}}` returned values across the full JavaScript number range.
This commit updates the generator to produce integers between 0 and 1000,
matching the documented behavior.

Fixes usebruno#4847
sanish-bruno pushed a commit to sanish-bruno/bruno that referenced this pull request Jul 15, 2025
…#4847) (usebruno#4938)

Previously, `{{$randomInt}}` returned values across the full JavaScript number range.
This commit updates the generator to produce integers between 0 and 1000,
matching the documented behavior.

Fixes usebruno#4847
naman-bruno pushed a commit to naman-bruno/bruno that referenced this pull request Jul 17, 2025
…#4847) (usebruno#4938)

Previously, `{{$randomInt}}` returned values across the full JavaScript number range.
This commit updates the generator to produce integers between 0 and 1000,
matching the documented behavior.

Fixes usebruno#4847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{{$randomInt}} returns unexpected large numbers — doesn't match documented range (0–1000)
4 participants