Skip to content
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

Inconsistent default of faker.number.bigInt max option #3364

Open
ST-DDT opened this issue Jan 3, 2025 · 0 comments
Open

Inconsistent default of faker.number.bigInt max option #3364

ST-DDT opened this issue Jan 3, 2025 · 0 comments
Labels
breaking change Cannot be merged when next version is not a major release c: bug Something isn't working m: number Something is referring to the number module p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision
Milestone

Comments

@ST-DDT
Copy link
Member

ST-DDT commented Jan 3, 2025

Currently, all methods except faker.number.bigInt have a fixed default max option:

* @param options.max Upper bound for generated number. Defaults to `Number.MAX_SAFE_INTEGER`.

* @param options.max Upper bound for generated number, exclusive, unless `multipleOf` or `fractionDigits` are passed. Defaults to `1.0`.

* @param options.max Upper bound for generated number. Defaults to `1`.

* @param options.max Upper bound for generated number. Defaults to `7`.

* @param options.max Upper bound for generated number. Defaults to `15`.

vs

* @param options.max Upper bound for generated bigint. Defaults to `min + 999999999999999n`.

For consistency with the other methods, the max value should be hardcoded similar to the other methods.
Since this would be a breaking change(?), it should be changed only in the next major version.


Found while reviewing: #3363

@ST-DDT ST-DDT added c: bug Something isn't working p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision breaking change Cannot be merged when next version is not a major release m: number Something is referring to the number module labels Jan 3, 2025
@ST-DDT ST-DDT added this to the v10.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release c: bug Something isn't working m: number Something is referring to the number module p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision
Projects
None yet
Development

No branches or pull requests

1 participant