mathjs 12.2.1 → 12.3.1

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.
Files changed (58) hide show
  1. package/HISTORY.md +27 -0
  2. package/NOTICE +1 -1
  3. package/README.md +4 -3
  4. package/bin/cli.js +1 -1
  5. package/lib/browser/math.js +1 -1
  6. package/lib/browser/math.js.LICENSE.txt +3 -3
  7. package/lib/browser/math.js.map +1 -1
  8. package/lib/cjs/entry/configReadonly.js +1 -1
  9. package/lib/cjs/entry/dependenciesAny/dependenciesHelpClass.generated.js +2 -2
  10. package/lib/cjs/entry/dependenciesNumber/dependenciesHelpClass.generated.js +2 -2
  11. package/lib/cjs/entry/impureFunctionsAny.generated.js +14 -14
  12. package/lib/cjs/entry/impureFunctionsNumber.generated.js +1 -1
  13. package/lib/cjs/entry/pureFunctionsAny.generated.js +11 -11
  14. package/lib/cjs/expression/Help.js +21 -4
  15. package/lib/cjs/expression/node/AccessorNode.js +4 -5
  16. package/lib/cjs/expression/node/ArrayNode.js +4 -5
  17. package/lib/cjs/expression/node/AssignmentNode.js +4 -5
  18. package/lib/cjs/expression/node/BlockNode.js +4 -5
  19. package/lib/cjs/expression/node/ConditionalNode.js +4 -5
  20. package/lib/cjs/expression/node/ConstantNode.js +4 -5
  21. package/lib/cjs/expression/node/FunctionAssignmentNode.js +4 -5
  22. package/lib/cjs/expression/node/FunctionNode.js +5 -6
  23. package/lib/cjs/expression/node/IndexNode.js +4 -5
  24. package/lib/cjs/expression/node/ObjectNode.js +4 -5
  25. package/lib/cjs/expression/node/OperatorNode.js +4 -5
  26. package/lib/cjs/expression/node/ParenthesisNode.js +4 -5
  27. package/lib/cjs/expression/node/RangeNode.js +4 -5
  28. package/lib/cjs/expression/node/RelationalNode.js +4 -5
  29. package/lib/cjs/expression/node/SymbolNode.js +4 -5
  30. package/lib/cjs/function/string/bin.js +3 -3
  31. package/lib/cjs/function/string/format.js +3 -3
  32. package/lib/cjs/function/string/hex.js +3 -3
  33. package/lib/cjs/function/string/oct.js +3 -3
  34. package/lib/cjs/header.js +3 -3
  35. package/lib/cjs/type/unit/Unit.js +86 -2
  36. package/lib/cjs/type/unit/physicalConstants.js +1 -1
  37. package/lib/cjs/utils/bignumber/formatter.js +17 -27
  38. package/lib/cjs/utils/number.js +75 -33
  39. package/lib/cjs/version.js +1 -1
  40. package/lib/esm/entry/configReadonly.js +1 -1
  41. package/lib/esm/entry/dependenciesAny/dependenciesHelpClass.generated.js +2 -2
  42. package/lib/esm/entry/dependenciesNumber/dependenciesHelpClass.generated.js +2 -2
  43. package/lib/esm/entry/impureFunctionsAny.generated.js +16 -16
  44. package/lib/esm/entry/impureFunctionsNumber.generated.js +1 -1
  45. package/lib/esm/entry/pureFunctionsAny.generated.js +12 -12
  46. package/lib/esm/expression/Help.js +21 -4
  47. package/lib/esm/function/string/bin.js +3 -3
  48. package/lib/esm/function/string/format.js +3 -3
  49. package/lib/esm/function/string/hex.js +3 -3
  50. package/lib/esm/function/string/oct.js +3 -3
  51. package/lib/esm/header.js +1 -1
  52. package/lib/esm/type/unit/Unit.js +86 -2
  53. package/lib/esm/type/unit/physicalConstants.js +1 -1
  54. package/lib/esm/utils/bignumber/formatter.js +19 -28
  55. package/lib/esm/utils/number.js +76 -34
  56. package/lib/esm/version.js +1 -1
  57. package/package.json +14 -14
  58. package/types/index.d.ts +30 -18
package/HISTORY.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # History
2
2
 
3
3
 
4
+ # 2024-02-01, 12.3.1
5
+
6
+ - Improved the typings of the arguments of `ArrayNode`, `FunctionNode`,
7
+ `IndexNode`, `OperatorNode`, and `RelationalNode` (#3123). Thanks @sylee957.
8
+ - Added a fully featured code editor example with CodeMirror and Katex (#3027).
9
+ Thanks @dvd101x.
10
+ - Fix: #3114 build warnings related to a number of wrong `/* #__PURE__ */`
11
+ annotations.
12
+ - Fix: #3142 support BigNumber values for the options of function `format`:
13
+ `precision`, `wordSize`, `lowerExp`, `upperExp`. Support BigNumber values
14
+ for the option `wordSize` in the functions `hex`, `bin`, and `oct`.
15
+ - Fix: #3125 type definitions of function `hypot` (#3144).
16
+ Thanks @silentmissile.
17
+ - Fix: #3141 `help(config)` altering the actual `config` when evaluating the
18
+ examples.
19
+ - Docs: #3145 fix documentation about REPL, it does require a build step
20
+ nowadays.
21
+
22
+
23
+ # 2024-01-12, 12.3.0
24
+
25
+ - Implement support new metric prefixes: `ronna` (`R`), `quetta` (`Q`),
26
+ `ronto` (`r`), and `quecto` (`q`) (#3113, #3112). Thanks @AlexEdgcomb.
27
+ - Fix a bug converting a unitless unit (#3117). Thanks @costerwi.
28
+ - Fix: #3097 `toSI()` wrongly converting `degC` (#3118). Thanks @costerwi.
29
+
30
+
4
31
  # 2023-12-20, 12.2.1
5
32
 
6
33
  - Fix #3109: method `Node.toHTML` not accepting a custom `handler`.
package/NOTICE CHANGED
@@ -1,7 +1,7 @@
1
1
  math.js
2
2
  https://github.com/josdejong/mathjs
3
3
 
4
- Copyright (C) 2013-2023 Jos de Jong <wjosdejong@gmail.com>
4
+ Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
5
5
 
6
6
  Licensed under the Apache License, Version 2.0 (the "License");
7
7
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -7,11 +7,12 @@ Math.js is an extensive math library for JavaScript and Node.js. It features a f
7
7
  [![Version](https://img.shields.io/npm/v/mathjs.svg)](https://www.npmjs.com/package/mathjs)
8
8
  [![Downloads](https://img.shields.io/npm/dm/mathjs.svg)](https://www.npmjs.com/package/mathjs)
9
9
  [![Build Status](https://github.com/josdejong/mathjs/workflows/Node.js%20CI/badge.svg)](https://github.com/josdejong/mathjs/actions)
10
- [![Maintenance](https://img.shields.io/maintenance/yes/2023.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
10
+ [![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/josdejong/mathjs/graphs/commit-activity)
11
11
  [![License](https://img.shields.io/github/license/josdejong/mathjs.svg)](https://github.com/josdejong/mathjs/blob/master/LICENSE)
12
12
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosdejong%2Fmathjs?ref=badge_shield)
13
13
  [![Codecov](https://codecov.io/gh/josdejong/mathjs/branch/develop/graph/badge.svg)](https://codecov.io/gh/josdejong/mathjs)
14
- [![Github Sponsor](https://camo.githubusercontent.com/7d9333b097b2f54a8957d126ab82937811489c9b75c3850f609985cf94cd29fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302d53706f6e736f722532306d652532306f6e2532304769744875622d6f72616e6765)](https://github.com/sponsors/josdejong)
14
+ [![Github Sponsor](https://img.shields.io/github/sponsors/josdejong
15
+ )](https://github.com/sponsors/josdejong)
15
16
 
16
17
  ## Features
17
18
 
@@ -194,7 +195,7 @@ Thanks Github Actions and BrowserStack for the generous free hosting of this ope
194
195
 
195
196
  ## License
196
197
 
197
- Copyright (C) 2013-2023 Jos de Jong <wjosdejong@gmail.com>
198
+ Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
198
199
 
199
200
  Licensed under the Apache License, Version 2.0 (the "License");
200
201
  you may not use this file except in compliance with the License.
package/bin/cli.js CHANGED
@@ -30,7 +30,7 @@
30
30
  * cat script.txt | mathjs > results.txt Run input stream, output to file
31
31
  *
32
32
  * @license
33
- * Copyright (C) 2013-2023 Jos de Jong <wjosdejong@gmail.com>
33
+ * Copyright (C) 2013-2024 Jos de Jong <wjosdejong@gmail.com>
34
34
  *
35
35
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
36
36
  * use this file except in compliance with the License. You may obtain a copy