Releases: jakeboone02/numeric-quantity
Releases · jakeboone02/numeric-quantity
Release list
v3.3.0
Changed
numericQuantityreturn type is now inferred from the options object:verbose: trueyieldsNumericQuantityVerboseResult,bigIntOnOverflow: trueyieldsnumber | bigint. Options typed as a plainNumericQuantityOptionsvariable now infer the full unionnumber | bigint | NumericQuantityVerboseResultand must be narrowed; usesatisfies NumericQuantityOptionsinstead of: NumericQuantityOptionsto retain literal inference.isNumericQuantityacceptsunknowninstead ofstring | number.
Fixed
- Added
"sideEffects": falseto package.json. vulgarFractionsRegexno longer matches}.bigIntOnOverflownow evaluates decimals, exponents, fractions, mixed numbers, and percentages exactly, rounding half-up instead of discarding the tail.roundis now applied to the value as written, before percentage division, on all code paths. Previously'1%'and'1.0%'could produce different results.- The
percentageoption now applies to Roman numeral results (e.g.'L%'→0.5). verbose.trailingInvalidis now the complete unconsumed suffix of the original input. Previously, whendecimalSeparatorwas",", the internal separator marker could leak into it and part of the suffix could be dropped (e.g.'10,00.,0'reported'&'; it now reports'.,0').symbolinput returnsNaNinstead of throwing. In verbose mode,inputis the stringified symbol (e.g.'Symbol(1)').- Input that cannot be coerced to a string (null-prototype objects, throwing
toString/valueOf) returnsNaNinstead of throwingTypeError. In verbose mode,inputis an empty string. bigIntOnOverflowno longer throwsRangeErrorfor absurdly large exponents (e.g.'1e' + '9'.repeat(400)). Exponents beyond ±10,000 fall back to thenumberpath, yieldingInfinity/0.verbose.trailingInvalidis now populated for multi-comma input whendecimalSeparatoris','andallowTrailingInvalidisfalse, matching the behavior of every other trailing-invalid path.- Non-finite
roundvalues (NaN,±Infinity) are now treated asfalse(no rounding) instead of silently rounding to 0 decimal places. Negative finite values still clamp to 0. - Very large
roundvalues no longer produce incorrect results. The rounding factor was built by string concatenation, so values in exponential range were misread (e.g.round: 1e21became"1e1e+21"→ a factor of10, rounding'1.23456'to1.2). Factors beyondNumber.MAX_VALUEnow fall back to no rounding, as does a rounding operation that would overflow an otherwise finite value (e.g.'1.5e300'withround: 308returnedNaN, now returns1.5e300). - Currency and percentage affixes are now stripped in any order (e.g.
'100€%'→1, matching'50%€'). At most one%is stripped, so'50%%'is stillNaN.
Full Changelog: v3.2.2...v3.3.0
v3.2.2
- Update changelog for v3.2.2 255145f
- Loosen type restriction on
numericQuantityinput fc954a5 - Update dependencies 967df52
- Update AGENTS.md instructions 7239517
- Merge pull request #43 from jakeboone02/dependabot/github_actions/actions/upload-pages-artifact-5 15d348d
- Remove .prettierrc ea5acac
- Bump actions/upload-pages-artifact from 4 to 5 fb20e33
- Switch from prettier to oxfmt bcfd10b
- Update dependencies 7087519
- Merge pull request #42 from jakeboone02/dependabot/github_actions/actions/deploy-pages-5 41b3e2e
- Merge pull request #41 from jakeboone02/dependabot/github_actions/codecov/codecov-action-6 1fa5168
- Bump actions/deploy-pages from 4 to 5 1170bdd
- Bump codecov/codecov-action from 5 to 6 0798d07
- Remove CodeSandbox CI 3d2ae98
v3.2.1
v3.2.0
- Update changelog for v3.2.0 6b79fa1
- Merge pull request #39 from jakeboone02/features-2026-02 c992413
- Add AGENTS.md ea43dae
- Remove unnecessary dependency 6568f26
- Add leading
+sign support and verbosesign/fraction component fields 663abb1 - Touch up i18n features 6e8ecc9
- Promote Roman numeral support in README.md 1270fa2
- Update changelog for #38 and #39 6614f36
- Add
isNumericQuantity,percentage,allowCurrency, andverboseoptions 99add18 - Update changelog for v3.1.0 1c4a767
v3.1.0
v3.0.0
- Update changelog for v3.0.0 dd513d4
- Update readme for v3.0.0 9b715cc
- Merge pull request #37 from jakeboone02:euro-decimal-separators 4c3b0d7
- Merge branch 'main' into euro-decimal-separators 68b2c25
- Use https links where possible 7544db6
- Update dependencies 7fcad7b
- Add
decimalSeparatoroption 0d1a4e8 - Removed duplicate function declaration ad00dda
- Type-aware lint bfe4263
- Merge pull request #36 from jakeboone02/dependabot/github_actions/actions/checkout-6 48dc8a2
- Bump actions/checkout from 5 to 6 89cc7c3
- Merge pull request #34 from jakeboone02/dependabot/github_actions/actions/upload-pages-artifact-4 edc70dd
- Typecheck in CI a59389f
- Typecheck tsdown.config.ts a59580b
- Merge pull request #35 from jakeboone02/tsdown f3f6557
- Migrate to tsdown 53365e3
- Merge pull request #33 from jakeboone02/dependabot/github_actions/actions/checkout-5 57ff4ea
- Bump actions/upload-pages-artifact from 3 to 4 3c02a32
- Bump actions/checkout from 4 to 5 e204e1a
v2.1.0
- Merge pull request #32 from jakeboone02:bigint 86c85bd
- Add
bigintsupport 6be6eaa - Merge pull request #31 from jakeboone02/dependabot/github_actions/oven-sh/setup-bun-2 936cbe6
- Merge pull request #30 from jakeboone02/dependabot/github_actions/codecov/codecov-action-5 6c39e97
- Bump oven-sh/setup-bun from 1 to 2 5bdec4e
- Bump codecov/codecov-action from 4 to 5 887ebab
- Merge pull request #29 from jakeboone02/bunnier 1eb2532
- Revert to Parcel in CI ea1c2ac
- Revert "Run CI sandbox with Vite" a482c74
- Run CI sandbox with Vite 7849f6b
- Run CI sandbox with Bun e6fb06a
- Add dependabot.yml 7e0c1f4
- Update actions versions f838cfa
- Minor fixes 515e598
- Enable Bun in CodeSandbox CI 3ad4af5
- Use recent Bun features and build DTS with oxc-transform 8ba0c2c
- Add Typedoc GA plugin acb78ee
- Use Codecov token and update other dependencies f5bf8c3
- Update dependencies c25a862
- Compact CI config 7464807
- Update dependencies ae59884
- Upgrade and pin Prettier caa3af2
v2.0.1
- Updated changelog for v2.0.1 ee0115f
- Update devDependencies 91cbc54
- Fix distributed types 3da5643
- Remove docs from git 451e44a
- Build docs site with GHA 34feed6
- Add GA tracking 3cf9f75
- Remove target from tsconfig.json 18ae1ec
- Update docs 09afac3
- Update types and docs of constants 3e9f8c6
- Upgrade dependencies; misc tweaks e35b491
- Upgrade dependencies 0069d57
- Add diff=lockb to .gitattributes fb25608
- Update docs 4204606
- Remove gh-pages dependency e0b552b
- Better test output formatting 0ec303f
- Remove OS matrix from CI 09309ef
- Reinstate version number in CI checkout action 4c344f0
- Remove Node from CI c3d227d
- Remove Jest types 639ae2d
- Drop Jest for bun:test ea559df
- Add version to docs b1cd142
- Merge pull request #28 from jakeboone02/typedoc-docs 716d469
- Remove Jekyll config 5453479
- Move list of exports out of README.md c37329e
- Update dev server fc375ad
- Fix bun-types/lib:dom issue 248abbe
- Add typedoc docs c4e1104
- Update dependencies 577eab5
- Fix pretty-print command 2fc9729
- Upgrade dependencies 3db08ec
- Update UMD page to fetch from unpkg 89f4cf9
- Update server to accept custom port bf12223
- Merge pull request #27 from jakeboone02/drop-vite 62cf0bf
- Update CI example ac07c1f
- Drop
yarnin favor ofbun installf68a3cb - Update dependencies 13610e2
- Drop Vite in favor of Bun.serve de369a8
- Build before test in CI f5110a6
- Correct Roman numerals example in README.md 416be5e
- Use GitHub Pages Hacker theme 761d954
- Grammar correction on changelog b124073
- Update changelog for v2.0.0 a19262b
v2.0.0
- Merge pull request #26 from jakeboone02/drop-umd 8faac7a
- Enable new options in CI example d50355d
- Fix Node version in Codecov CI command 0350515
- Install deps with Yarn on CI f0958d6
- Add
roundoption and support for E notation 803e28b - Only parse Roman numerals when
romanNumeralsoption istrued43dd0c - Add
numericRegexWithTrailingInvalidto README.md 87d65d8 - Revert default behavior to disallow trailing invalid characters; add option to switch to new behavior 8848be9
- Switch from Babel to ts-jest c9fb757
- Misc. updates 81eaf08
- Add JSDoc comment to
parseRomanNumerals8ae0701 - Remove unnecessary Vite build config and convert to .ts e19051c
- Allow separators in all numeric sequences 323ae19
- Return numbers as-is from numericQuantity d9ed4b2
- Add missing releases to changelog 62c9e99
- Update changelog with UMD info 273ffe2
- Revert UMD build filename to original 466b785
- Minor type/tsconfig update 97b6a72
- Update changelog 38bfe7e
- Better type tooltips 3510c3b
- Minor performance improvement d1c189c
- Organize imports and restore UMD version b1fad1e
- Add back
pkg.engines.nodeee9a9a4 - Bring logic more in line with
parseFloat82faef6 - Add support for comma and underscore separators fc91966
- Refactor tests bc6032c
- Enhance dev page; move test to common file; improve main regex 07cfdad
- Build with tsup 0b26625
- Update Yarn e4e1681
- Fix CI code 93c195a
- Add support for Roman numerals 4e333b9
- Move CI sandbox code to this repo 16d4193
- Add support for U+215F Fraction Numerator One baf31b5
- Require 100% coverage bba1a20
- Add node: 18 to CSB ci.json 806a761
- Convert to named exports and update dependencies 24052de
- Upgrade dependencies 5cd76e6
- Add yarn plugins 049fa72
- Convert to modern Yarn 344c4e7
- Upgrade Yarn 1a20987
v2.0.0-beta.1
- Allow separators in all numeric sequences 323ae19
- Return numbers as-is from numericQuantity d9ed4b2
- Add missing releases to changelog 62c9e99
- Update changelog with UMD info 273ffe2
- Revert UMD build filename to original 466b785
- Minor type/tsconfig update 97b6a72
- Update changelog 38bfe7e
- Better type tooltips 3510c3b
- Minor performance improvement d1c189c
- Organize imports and restore UMD version b1fad1e