Skip to content

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

@ST-DDT

Description

@ST-DDT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeCannot be merged when next version is not a major releasec: bugSomething isn't workingm: numberSomething is referring to the number modulep: 1-normalNothing urgents: needs decisionNeeds team/maintainer decision

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions