Publish v8.1.1

This commit is contained in:
Jos de Jong 2020-12-30 21:44:34 +01:00
parent c0edf8aafa
commit 85572fa57e
27 changed files with 48 additions and 39 deletions

View File

@ -18,13 +18,13 @@ function:
```js
const x = math.complex('2 + 3i')
const str = JSON.stringify(x, math.json.replacer)
const str = JSON.stringify(x, math.replacer)
console.log(str)
// outputs a string '{"mathjs":"Complex","re":2,"im":3}'
```
> IMPORTANT: in most cases works, serialization correctly without
> passing the `math.json.replacer` function as second argument. This is because
> passing the `math.replacer` function as second argument. This is because
> in most cases we can rely on the default behavior of JSON.stringify, which
> uses the `.toJSON` method on classes like `Unit` and `Complex` to correctly
> serialize them. However, there are a few special cases like the
@ -32,7 +32,7 @@ console.log(str)
> serialized without losing information: without it, `Infinity` will be
> serialized as `"null"` and cannot be deserialized correctly.
>
> So, it's best to always pass the `math.json.replacer` function to prevent
> So, it's best to always pass the `math.replacer` function to prevent
> weird edge cases.
In order to deserialize a string, containing math.js data types, `JSON.parse`
@ -41,7 +41,7 @@ be called with the reviver function of math.js:
```js
const json = '{"mathjs":"Unit","value":5,"unit":"cm","fixPrefix":false}'
const x = JSON.parse(json, math.json.reviver) // Unit 5 cm
const x = JSON.parse(json, math.reviver) // Unit 5 cm
```
Note that if math.js is used in conjunction with other data types, it is

View File

@ -29,7 +29,7 @@ Math.js can be downloaded or linked from various content delivery networks:
<tbody>
<tr>
<td>unpkg</td>
<td><a href="https://unpkg.com/mathjs@8.1.0/">https://unpkg.com/mathjs@8.1.0/</a></td>
<td><a href="https://unpkg.com/mathjs@8.1.1/">https://unpkg.com/mathjs@8.1.1/</a></td>
</tr>
<tr>
<td>cdnjs</td>
@ -49,8 +49,8 @@ Math.js can be downloaded or linked from various content delivery networks:
Or download the full bundle directly from [unpkg](https://unpkg.com):
<p>
<a href="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js">
math.js (version 8.1.0, <span id="size">140 kB</span>, minified and gzipped)
<a href="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js">
math.js (version 8.1.1, <span id="size">141 kB</span>, minified and gzipped)
</a>
</p>

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -24,7 +24,7 @@ File: [angle_configuration.html](angle_configuration.html) (click for a live dem
}
</style>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>math.js | basic usage</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -12,7 +12,7 @@ File: [basic_usage.html](basic_usage.html) (click for a live demo)
<head>
<meta charset="utf-8">
<title>math.js | basic usage</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | currency conversion</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<style>
body,

View File

@ -13,7 +13,7 @@ File: [currency_conversion.html](currency_conversion.html) (click for a live dem
<meta charset="utf-8">
<title>math.js | currency conversion</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<style>
body,

View File

@ -15,7 +15,7 @@
}
</style>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -24,7 +24,7 @@ File: [custom_separators.html](custom_separators.html) (click for a live demo)
}
</style>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
</head>
<body>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>math.js | plot</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-1.35.2.min.js"></script>

View File

@ -12,7 +12,7 @@ File: [plot.html](plot.html) (click for a live demo)
<head>
<meta charset="utf-8">
<title>math.js | plot</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://cdn.plot.ly/plotly-1.35.2.min.js"></script>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | pretty printing with MathJax</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>

View File

@ -13,7 +13,7 @@ File: [pretty_printing_with_mathjax.html](pretty_printing_with_mathjax.html) (cl
<meta charset="utf-8">
<title>math.js | pretty printing with MathJax</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | printing HTML</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<style>
body {

View File

@ -13,7 +13,7 @@ File: [printing_html.html](printing_html.html) (click for a live demo)
<meta charset="utf-8">
<title>math.js | printing HTML</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<style>
body {

View File

@ -9,7 +9,7 @@
<script>
// load math.js using require.js
require(['https://unpkg.com/mathjs@8.1.0/lib/browser/math.js'], function (math) {
require(['https://unpkg.com/mathjs@8.1.1/lib/browser/math.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)

View File

@ -18,7 +18,7 @@ File: [requirejs_loading.html](requirejs_loading.html) (click for a live demo)
<script>
// load math.js using require.js
require(['https://unpkg.com/mathjs@8.1.0/lib/browser/math.js'], function (math) {
require(['https://unpkg.com/mathjs@8.1.1/lib/browser/math.js'], function (math) {
// evaluate some expression
const result = math.evaluate('1.2 * (2 + 4.5)')
document.write(result)

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>math.js | rocket trajectory optimization</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<style>

View File

@ -13,7 +13,7 @@ File: [rocket_trajectory_optimization.html](rocket_trajectory_optimization.html)
<meta charset="utf-8">
<title>math.js | rocket trajectory optimization</title>
<script src="https://unpkg.com/mathjs@8.1.0/lib/browser/math.js"></script>
<script src="https://unpkg.com/mathjs@8.1.1/lib/browser/math.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<style>

View File

@ -92,7 +92,7 @@ File: [webworkers.html](webworkers.html) (click for a live demo)
File: [worker.js](worker.js)
```js
importScripts('https://unpkg.com/mathjs@8.1.0/lib/browser/math.js')
importScripts('https://unpkg.com/mathjs@8.1.1/lib/browser/math.js')
// create a parser
const parser = self.math.parser()

View File

@ -1,4 +1,4 @@
importScripts('https://unpkg.com/mathjs@8.1.0/lib/browser/math.js')
importScripts('https://unpkg.com/mathjs@8.1.1/lib/browser/math.js')
// create a parser
const parser = self.math.parser()

View File

@ -4,6 +4,15 @@ layout: default
<h1 id="history">History <a href="#history" title="Permalink">#</a></h1>
<h1 id="20201230-version-811">2020-12-30, version 8.1.1 <a href="#20201230-version-811" title="Permalink">#</a></h1>
- Improved the performance of parsing and evaluating units a lot, see <a href="https://github.com/josdejong/mathjs/issues/2065">#2065</a>.
Thanks <a href="https://github.com/flaviut">@flaviut</a>.
- Upgraded dependency `fraction.js` to `v4.0.13`.
- Moved continuous integration testing from Travis CI to Github Workflow,
see <a href="https://github.com/josdejong/mathjs/issues/2024">#2024</a>, <a href="https://github.com/josdejong/mathjs/issues/2041">#2041</a>. Thanks <a href="https://github.com/harrysarson">@harrysarson</a>.
<h1 id="20201204-version-810">2020-12-04, version 8.1.0 <a href="#20201204-version-810" title="Permalink">#</a></h1>
- Implemented units `kilogramforce` (`kgf`). Thanks <a href="https://github.com/rnd-debug">@rnd-debug</a>.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
package-lock.json generated
View File

@ -1031,9 +1031,9 @@
}
},
"fraction.js": {
"version": "4.0.12",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.12.tgz",
"integrity": "sha512-8Z1K0VTG4hzYY7kA/1sj4/r1/RWLBD3xwReT/RCrUCbzPszjNQCCsy3ktkU/eaEqX3MYa4pY37a52eiBlPMlhA=="
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.13.tgz",
"integrity": "sha512-E1fz2Xs9ltlUp+qbiyx9wmt2n9dRzPsS11Jtdb8D2o+cC7wr9xkkKsVKJuBX0ST+LVS+LhLO+SbLJNtfWcJvXA=="
},
"fragment-cache": {
"version": "0.2.1",
@ -2319,14 +2319,14 @@
}
},
"mathjs": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-8.1.0.tgz",
"integrity": "sha512-Nf41Ms01FX+gP1xnJ5lWcGwMY/snFdqbYPe0LU16rXtLwk+UPfllKC6rStOuOqiPKwj5imJtkHO1vI8X4Y2aSw==",
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/mathjs/-/mathjs-8.1.1.tgz",
"integrity": "sha512-b3TX3EgiZObujjwb8lZnTDLUuivC2jar4ZBjmGJ4stFYCDXx/DNwx5yry5t/z65p9mvejyZel1qoeR05KtChcQ==",
"requires": {
"complex.js": "^2.0.11",
"decimal.js": "^10.2.1",
"escape-latex": "^1.2.0",
"fraction.js": "^4.0.12",
"fraction.js": "^4.0.13",
"javascript-natural-sort": "^0.7.1",
"seedrandom": "^3.0.5",
"tiny-emitter": "^2.1.0",

View File

@ -6,7 +6,7 @@
"url": "https://github.com/josdejong/mathjs.git"
},
"dependencies": {
"mathjs": "8.1.0"
"mathjs": "8.1.1"
},
"devDependencies": {
"fancy-log": "1.3.3",