Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Enable noUnusedVariables lint rule and remove all unused variables from codebase
- Replace all var declarations with let/const for modern JavaScript standards
- Ensure parseInt calls use explicit radix parameter for clarity and reliability
- Fix precision loss in test data generators by using JavaScript safe integer limits

## v0.10.9
- Add support for IPv6 urls
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"useParseIntRadix": "error",
"noSwitchDeclarations": "off",
"noInvalidUseBeforeDeclaration": "error",
"noPrecisionLoss": "off"
"noPrecisionLoss": "error"
},
"style": {
"useConst": "off",
Expand Down
6 changes: 3 additions & 3 deletions test/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ const LongStr = label(

const UShort = rangeInt('short-uint', 0, 0xffff);
const ULong = rangeInt('long-uint', 0, 0xffffffff);
const ULongLong = rangeInt('longlong-uint', 0, 0xffffffffffffffff);
const ULongLong = rangeInt('longlong-uint', 0, Number.MAX_SAFE_INTEGER);
const Short = rangeInt('short-int', -0x8000, 0x7fff);
const Long = rangeInt('long-int', -0x80000000, 0x7fffffff);
const LongLong = rangeInt('longlong-int', -0x8000000000000000, 0x7fffffffffffffff);
const LongLong = rangeInt('longlong-int', Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
const Bit = label('bit', arb.Bool);
const Double = label('double', asGenerator(floatChooser(308)));
const Float = label('float', transform(toFloat32, floatChooser(38)));
Expand Down Expand Up @@ -260,7 +260,7 @@ const domainProps = [
[
LongLong,
function (n) {
return n >= -0x8000000000000000 && n < 0x8000000000000000;
return n >= Number.MIN_SAFE_INTEGER && n <= Number.MAX_SAFE_INTEGER;
},
],
[
Expand Down