@vpmedia/simplify 1.64.0 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.65.0] - 2026-01-30
2
+
3
+ ### 💼 Other
4
+
5
+ - *(deps)* Bump dependency versions
6
+
7
+ ### 🚜 Refactor
8
+
9
+ - Relax fixFloatPrecision error handling
10
+
11
+ ### ⚙️ Miscellaneous Tasks
12
+
13
+ - Release
14
+ - *(release)* V1.65.0
1
15
  ## [1.64.0] - 2026-01-30
2
16
 
3
17
  ### 💼 Other
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.64.0",
3
+ "version": "1.65.0",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "^25.1.0",
32
32
  "@vitest/coverage-v8": "^4.0.18",
33
33
  "eslint": "^9.39.2",
34
- "eslint-plugin-jsdoc": "^62.4.1",
34
+ "eslint-plugin-jsdoc": "^62.5.0",
35
35
  "eslint-plugin-oxlint": "^1.42.0",
36
36
  "eslint-plugin-unicorn": "^62.0.0",
37
37
  "globals": "^17.2.0",
@@ -57,7 +57,7 @@ export const getRandomInt = (min, max) => {
57
57
  export const fixFloatPrecision = (value) => {
58
58
  const parsedValue = typeof value === 'string' ? Number(value) : value;
59
59
  if (!Number.isFinite(parsedValue)) {
60
- throw new TypeCheckError('Value must be a finite number.', { value });
60
+ return Number.NaN;
61
61
  }
62
62
  return Math.abs(parsedValue) < EPSILON ? 0 : Number(parsedValue.toPrecision(PRECISION));
63
63
  };
@@ -53,9 +53,9 @@ describe('fixFloatPrecision', () => {
53
53
  });
54
54
 
55
55
  test('Throws error for invalid input', () => {
56
- expect(() => fixFloatPrecision('abc')).toThrowError(TypeCheckError);
57
- expect(() => fixFloatPrecision(null)).toThrowError(TypeCheckError);
58
- expect(() => fixFloatPrecision(undefined)).toThrowError(TypeCheckError);
56
+ expect(fixFloatPrecision('abc')).toBe(Number.NaN);
57
+ expect(fixFloatPrecision(null)).toBe(Number.NaN);
58
+ expect(fixFloatPrecision(undefined)).toBe(Number.NaN);
59
59
  });
60
60
  });
61
61