Update dependency mathjs to v7 [SECURITY] - abandoned - autoclosed #859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.0.0
->^7.0.0
GitHub Vulnerability Alerts
CVE-2020-7743
The package mathjs before 7.5.1 are vulnerable to Prototype Pollution via the deepExtend function that runs upon configuration updates.
Release Notes
josdejong/mathjs
v7.5.1
Compare Source
math.config
. Thanks Snyk.v7.5.0
Compare Source
pickRandom
now allows randomly picking elements from matriceswith 2 or more dimensions instead of only from a vector, see #1974.
Thanks @KonradLinkowski.
v7.4.0
Compare Source
ceil
,floor
,and
fix
, similar toround
, see #1967, #1901. Thanks @rnd-debug.rotationMatrix
, see #1160, #1984. Thanks @rnd-debug.sqrtm
with a matrix havingmore than two dimensions. Thanks @KonradLinkowski.
decimal.js
to10.2.1
.v7.3.0
Compare Source
usolveAll
andlsolveAll
, see #1916. Thanks @m93a.std
andvariance
, see #1950.Thanks @rnd-debug.
expression parser, and implemented functions
bin
,oct
, andhex
forformatting. Thanks @clnhlzmn.
BigNumber
andFraction
. Thanks @ovk.v7.2.0
Compare Source
diff
, see #1634, #1920. Thanks @Veeloxfire.norm
.Thanks @rnd-debug.
v7.1.0
Compare Source
new in
[email protected]
. This fixes #1885: functions which whereextended with a new data type did not always work. Thanks @nickewing.
math.expression.node.*
instead ofmath.*
.v7.0.2
Compare Source
DenseMatrix.resize
andSparseMatrix.resize
acceptDenseMatrix
andSparseMatrix
as inputs too, not onlyArray
.sum
,prod
,min
, andmax
not throwing a conversion errorwhen passing a single string, like
sum("abc")
.v7.0.1
Compare Source
eigs
. Thanks @Lazersmoke.math.nthRoots(x)
.v7.0.0
Compare Source
Breaking changes:
dot
product of complex values.The first argument is now conjugated. See #1761. Thanks @m93a.
To upgrade smoothly from v5 to v7 or higher, upgrade to v6 first
and resolve all deprecation warnings.
v6.6.5
Compare Source
Infinity
cannot be serialized and deserialized.This is solved now with a new
math.replacer
function used asJSON.stringify(value, math.replacer)
.Infinity
not turned into the latex symbol\\infty
.v6.6.4
Compare Source
v6.6.3
Compare Source
format
,sometimes resulting in needless trailing zeros.
.toNumber()
and.toNumeric()
not working on aunitless unit.
mod
,and
,not
,or
,xor
,to
,in
as object keys. Thanks @Veeloxfire.eigs
not usingconfig.epsilon
.v6.6.2
Compare Source
eigs
not calculating with BigNumber precisionwhen input contains BigNumbers.
prepare
, so you can use the librarydirectly when installing directly from git. See #1751. Thanks @cinderblock.
v6.6.1
Compare Source
a/(b/c)
. Thanks @dbramwell.row
andcolumn
.v6.6.0
Compare Source
eigs
, see #1705, #542 #1175. Thanks @arkajitmandal.DenseMatrix
usingfromJSON
.DenseMatrix.map
copying the size and datatype from the originalmatrix instead of checking the returned dimensions and type of the callback.
^1.2.3
) to allow downstream updateswithout having to await a new release of mathjs.
v6.5.0
Compare Source
baseName
option forcreateUnit
, see #1707.Thanks @ericman314.
v6.4.0
Compare Source
dimension
with support for n-dimensional points.Thanks @Veeloxfire.
v6.3.0
Compare Source
factorial
forBigNumber
up to a factor two,see #1687. Thanks @kmdrGroch.
v6.2.5
Compare Source
IndexNode
using a hardcoded, one-based implementation ofindex
,making it impossible to instantiate a zero-based version of the expression
parser. See #782.
v6.2.4
Compare Source
thanks @kevinkelleher12 and @harrysarson.
sign(0)
returns complex NaN.Thanks @harrysarson.
v6.2.3
Compare Source
mean
not working for units. Thanks @clintonc.min
listed twice in the "See also" section of theembedded docs of function
std
.isPrime
, see #1641. Thanks @arguiot.v6.2.2
Compare Source
map
andclone
not copying thedotNotation
property ofIndexNode
. Thanks @rianmcguire.toHTML
. Thanks @maytanthegeek.isNumeric
.0
.v6.2.1
Compare Source
format
not working for expressions.v6.2.0
Compare Source
combinationsWithRep
. Thanks @waseemyusuf.bit
andbyte
.bit
andbyte
instead ofbits
andbytes
.[email protected]
.v6.1.0
Compare Source
combinationsWithRep
(see #1329). Thanks @waseemyusuf.v6.0.4
Compare Source
old browsers. Thanks @mockdeep for helping to find a solution.
v6.0.3
Compare Source
unpkg
andjsdelivr
fields in package.json pointing to UMD build.Thanks @tmcw.
outer user defined function.
v6.0.2
Compare Source
import
(regression since v6.0.0).
v6.0.1
Compare Source
evaluate
andparse
missing in generated docs.v6.0.0
Compare Source
!!! BE CAREFUL: BREAKING CHANGES !!!
Most notable changes
Full support for ES modules. Support for tree-shaking out of the box.
Load all functions:
Use a few functions:
Load all functions with custom configuration:
Load a few functions with custom configuration:
Support for lightweight, number-only implementations of all functions:
New dependency injection solution used under the hood.
Breaking changes
Node 6 is no longer supported.
Functions
config
andimport
are not available anymore in the globalcontext:
Instead, create your own mathjs instance and pass config and imports
there:
Renamed function
typeof
totypeOf
,var
tovariance
,and
eval
toevaluate
. (the old function names are reserved keywordswhich can not be used as a variable name).
Deprecated the
Matrix.storage
function. Usemath.matrix
instead to createa matrix.
Deprecated function
math.expression.parse
, usemath.parse
instead.Was used before for example to customize supported characters by replacing
math.parse.isAlpha
.Moved all classes like
math.type.Unit
andmath.expression.Parser
tomath.Unit
andmath.Parser
respectively.Fixed #1428: transform iterating over replaced nodes. New behavior
is that it stops iterating when a node is replaced.
Dropped support for renaming factory functions when importing them.
Dropped fake BigNumber support of function
erf
.Removed all index.js files used to load specific functions instead of all, like:
Individual functions are now loaded simply like:
To set a specific configuration on the functions:
See example
advanced/custom_loading.js
.Updated the values of all physical units to their latest official values.
See #1529. Thanks @ericman314.
Non breaking changes
t
,tonne
,bel
,decibel
,dB
, and prefixesfor
candela
. Thanks @mcvladthegoat.epsilon
setting being applied globally to Complex numbers.math.simplify('add(2, 3)')
throwing an error.lowerExp
andupperExp
and after that rounded the value instead of the other way around.
'use strict'
in every file, not needed anymore.v5.10.3
Compare Source
del
being a dependency instead of devDependency.v5.10.2
Compare Source
the build folder of a util file
typeOf.js
andtypeof.js
.Solved by properly cleaning all build folders before building.
v5.10.1
Compare Source
engineering
can give wrong resultswhen the value has less significant digits than the number of digits in
the output.
v5.10.0
Compare Source
lib/header.js
not having filled in date and version. Thanks @kevjin.[email protected]
, fixing an issue on node.js 12.v5.9.0
Compare Source
row
andcolumn
(see #1413). Thanks @SzechuanSage.engineering
notation of functionformat
not availablefor
BigNumber
.node.toHTML()
not correct for unary operators likefactorial
.v5.8.0
Compare Source
apply
. Thanks @bnlcas.dimension
argument tostd
andvar
.Thanks @bnlcas.
v5.7.0
Compare Source
pow()
inderivative
. Thanks @sam-19.(Fixes #1429, see also #1434, #1432). Thanks @ericman314.
v5.6.0
Compare Source
containing "not".
v5.5.0
Compare Source
map
andforEach
ofSparseMatrix
not workingcorrectly when indexes are unordered.
v5.4.2
Compare Source
math.format
not working for BigNumbers with a precision above1025 digits (see #1385). Thanks @ericman314.
RelationalNode
. Thanks @rianmcguire.map
,forEach
,traverse
, andtransform
of
FunctionNode
.v5.4.1
Compare Source
v5.4.0
Compare Source
specific axis. Thanks @bnlcas.
Unit.format
andUnit.toString
,making changes to the unit on execution. Thanks @ericman314.
v5.3.1
Compare Source
mm
insteadof
m
. Thanks @ericman314.v5.3.0
Compare Source
hasNumericValue
. Thanks @Sathish-kumar-Subramani.math.format
not working correctly with{ precision: 0 }
.Thanks @dkenul.
v5.2.3
Compare Source
escape-latex
giving issues in somespecific cases. Thanks @dangmai.
bitNot
, see #1299. Thanks @FSMaxB.pow
not supporting inputspow(Unit, BigNumber)
.[email protected]
)v5.2.2
Compare Source
user-defined units. Thanks @ericman314.
v5.2.1
Compare Source
rod
being defined as5.02921
instead of5.0292
.Thanks @ericman314.
[email protected]
)@babel/[email protected]
,[email protected]
,[email protected]
).v5.2.0
Compare Source
10 < x <= 50
.Thanks @ericman314.
BigInt
in mathjs.Thanks @ericman314.
2018-09-09, version 5.1.2
parse
. Thanks @mathiasvr.subset
.quantileSeq
has inconsistent return.number.
[email protected]
)babel@7
,[email protected]
,[email protected]
,[email protected]
,[email protected]
,[email protected]
)2018-08-21, version 5.1.1
isNumeric
now recognizes more types.sqrt
,max
,min
,var
,std
,mode
,mad
,median
, andpartitionSelect
not neatly handlingNaN
inputs. In somecases (
median
,mad
, andpartitionSelect
) this resulted in an infiniteloop.
[email protected]
)[email protected]
)2018-08-12, version 5.1.0
Thanks @jean-emmanuel.
getMatrixDataType
. Thanks @JasonShin.options
argument insimplify
. Thanks @paulobuchsbaum.rationalize
, see #1173. Thanks @paulobuchsbaum.2018-07-22, version 5.0.4
factorial
for numbers.This improves performance of functions
gamma
,permutation
, andcombination
too. See #1170. Thanks @honeybar.reshape
, thanks to afriend of @honeybar.
2018-07-14, version 5.0.3
add
andsubtract
) not workingwith matrices having a
datatype
defined.format
withengineering
notation in outputtingthe correct number of significant figures. Thanks @ericman314.
it by importing a factory function with the same name.
parse
into a functional approach.Thanks @harrysarson.
decimal.js
import to ES6. Thanks @weinshel.2018-07-07, version 5.0.2
simplify
unnecessarily replacing implicit multiplication withexplicit multiplication.
rationalize
throwing exceptions for some input with decimals.Thanks @maruta.
rawArgs
functions.add_new_datatypes
.Thanks @ChristopherChudzicki.
[email protected]
,[email protected]
).[email protected]
,[email protected]
,[email protected]
,[email protected]
).2018-07-01, version 5.0.1
kerma
,uglify-js
,webpack
).2018-06-16, version 5.0.0
!!! BE CAREFUL: BREAKING CHANGES !!!
math.ctranspose
. See #1097.Thanks @jackschmidt.
A'
(transpose) in the expression parser tocalculate the complex conjugate transpose. See #1097. Thanks @jackschmidt.
complex({abs: 1, arg: 1})
, and improved the docs oncomplex numbers. Thanks @ssaket.
eye
toidentity
, see #1054.lib
to
src
, andlib
now contains the compiled ES5 code.decimal.js
from9.0.1
to10.0.1
npm test
.See #1110.
Number
,Boolean
, andString
from functionsclone
andtypeof
.Thanks @dakotablair.
toTex
on node that containsderivative
causingan exception. Thanks @joelhoover.
2018-06-02, version 4.4.2
det
. Thanks @ericman314.compareNatural
and clarified the behavior for strings.inv
(sincev4.4.1
).Thanks @ericman314.
2018-05-29, version 4.4.1
inv
when dealing with values close to zero.Thanks @ericman314.
2018-05-28, version 4.4.0
equalText
andcompareText
. See #1085.2018-05-21, version 4.3.0
math.expm
. Thanks @ericman314.complex.js
fromv2.0.2
tov2.0.10
.fraction.js
fromv4.0.4
tov4.0.8
.mocha
,uglify-js
,webpack
).2018-05-05, version 4.2.2
see #1098. Thanks @jackschmidt.
[email protected]
.2018-05-02, version 4.2.1
dist/math.js
being minified.2018-05-02, version 4.2.0
math.sqrtm
. Thanks @ferrolho.math.log2
,math.log1p
, andmath.expm1
.Thanks @BigFav and @harrysarson.
2018-04-18, version 4.1.2
decades
,centuries
,and
millennia
.decade
andwatt
having a wrong name when stringifying.Thanks @ericman314.
2018-04-11, version 4.1.1
minus like
math.derivative('-x', 'x')
.2018-04-08, version 4.1.0
math.print
with support for arrays and matrices.Thanks @jean-emmanuel.
supported by nodes.
math.typeof
with support forResultSet
and nodeslike
SymbolNode
.bar
(i.e.
millibar
andmbar
).2018-03-17, version 4.0.1
math.unit
not accepting input like1/s
.2018-02-25, version 4.0.0
!!! BE CAREFUL: BREAKING CHANGES !!!
Breaking changes (see also #682):
New expression compiler
The compiler of the expression parser is replaced with one that doesn't use
eval
internally. See #1019. This means:Breaking change here: When using custom nodes in the expression parser,
the syntax of
_compile
has changed. This is an undocumented feature though.Parsed expressions
The class
ConstantNode
is changed such that it just holds a valueinstead of holding a stringified value and it's type.
ConstantNode(valueStr, valueType
) is nowConstantNode(value)
Stringification uses
math.format
, which may result in differentlyformatted numeric output.
The constants
true
,false
,null
,undefined
,NaN
,Infinity
,and
uninitialized
are now parsed as ConstantNodes instead ofSymbolNodes in the expression parser. See #833.
Implicit multiplication
Changed the behavior of implicit multiplication to have higher
precedence than explicit multiplication and division, except in
a number of specific cases. This gives a more natural behavior
for implicit multiplications. For example
24h / 6h
now returns4
,whilst
1/2 kg
evaluates to0.5 kg
. Thanks @ericman314. See: #792.Detailed documentation: https://github.com/josdejong/mathjs/blob/v4/docs/expressions/syntax.md#implicit-multiplication.
Immediately invoking a function returned by a function like
partialAdd(2)(3)
is no longer supported, instead these expressions are evaluated as
an implicit multiplication
partialAdd(2) * (3)
. See #1035.String formatting
In function
math.format
, the options{exponential: {lower: number, upper: number}}
(where
lower
andupper
are values) are replaced with{lowerExp: number, upperExp: number}
(where
lowerExp
andupperExp
are exponents). See #676. For example:is now:
In function
math.format
, the optionnotation: 'fixed'
no longer rounds tozero digits when no precision is specified: it leaves the digits as is.
See #676.
String comparison
Changed the behavior of relational functions (
compare
,equal
,equalScalar
,larger
,largerEq
,smaller
,smallerEq
,unequal
)to compare strings by their numeric value they contain instead of
alphabetically. This also impacts functions
deepEqual
,sort
,min
,max
,median
, andpartitionSelect
. UsecompareNatural
if youneed to sort an array with text. See #680.
Angle units
Changed
rad
,deg
, andgrad
to have short prefixes,and introduced
radian
,degree
, andgradian
and their pluralshaving long prefixes. See #749.
Null
null
is no longer implicitly casted to a number0
, so input likemath.add(2, null)
is no longer supported. See #830, #353.Dropped constant
uninitialized
, which was used to initializeleave new entries undefined when resizing a matrix is removed.
Use
undefined
instead to indicate entries that are not explicitlyset. See #833.
New typed-function library
typed-function
library used to check the input typesof functions is completely rewritten and doesn't use
eval
underthe hood anymore. This means a reduced security risk, and easier
to debug code. The API is the same, but error messages may differ
a bit. Performance is comparable but may differ in specific
use cases and browsers.
Non breaking changes:
typed-function
implementation,mathjs doesn't use JavaScript's
eval
anymore under the hood.This allows using mathjs in environments with security restrictions.
See #401.
isUnary()
andisBinary()
onOperatorNode
. See #1025.derivative
silently dropping additional argumentsfrom operator nodes with more than two arguments.
2018-02-07, version 3.20.2
[email protected]
(bug-fix release).implicit
not being copied from anOperatorNode
when applying function
map
. Thanks @HarrySarson.in
toTex()
. Thanks @FSMaxB.2018-01-17, version 3.20.1
simplifyCore
failing in some cases with parentheses.Thanks @firepick1.
2018-01-14, version 3.20.0
+
and*
inderivative
. Thanks @HarrySarson. See #1002.simplify
evalution ofsimplify
of functions with more than twoarguments wrongly:
simplify('f(x, y, z)') evaluated to
f(f(x, y), z)instead of
f(x, y, z)`. Thanks @joelhoover.simplify
throwing an error in some cases when simplifying unknownfunctions, for example
simplify('f(4)')
. Thanks @joelhoover.simplify
wrongly simplifing some expressions containing unaryminus, like
0 - -x
. Thanks @joelhoover.xor
. Thanks @denisx.2018-01-06, version 3.19.0
distance
andintersect
with support for BigNumbers.Thanks @ovk.
simplify
: added a rule that allows combiningof like terms in embedded quantities. Thanks @joelhoover.
2017-12-28, version 3.18.1
Thanks @firepick1.
2017-12-16, version 3.18.0
rationalize
. Thanks @paulobuchsbaum.decimal.js 7.2.3 → 9.0.1 (no breaking changes affecting mathjs)
fraction.js 4.0.2 → 4.0.4
tiny-emitter 2.0.0 → 2.0.2
pickRandom
returning an array instead of single valuewhen input was an array with just one value. Clarified docs.
interally used folder "docs" to "embeddedDocs".
2017-11-18, version 3.17.0
simplify
for nested exponentiations. Thanks @IvanVergiliev.typed-function
allowing arbitrary code executionin the JavaScript engine by creating a typed function with JavaScript code
in the name. Thanks Masato Kinugawa.
replaced by using unicode characters when creating an object. No known exploit,
but could possibly allow arbitrary code execution. Thanks Masato Kinugawa.
2017-10-18, version 3.16.5
add
andmultiply
not working whenpassing three or more arrays or matrices.
2017-10-01, version 3.16.4
simplify
returning wrong results orrunning into an infinite recursive loop. Thanks @ericman314.
2017-08-28, version 3.16.3
simplify
reordering operations. Thanks @firepick1.isNaN
returning wrong result for complexnumbers having just one of their parts (re/im) being
NaN
.FibonacciHeap.isEmpty
returning wrong result.2017-08-20, version 3.16.2
simplify
not accepting the signaturesimplify(expr, rules, scope)
anymore. Thanks @firepick1.implicit multiplications (see #922). Thanks @FSMaxB.
2017-08-12, version 3.16.1
way using functions like
isComplex(x)
instead of duck type checkinglike
x && x.isComplex === true
.unit.toNumeric()
.Thanks @AlexanderBeyn.
toString
of a parsed expression tree containing animmediately invoked function assignment not being wrapped in
parenthesis (for example
(f(x) = x^2)(4)
).2017-08-06, version 3.16.0
math.simplify
.Thanks @firepick1.
math.simplify
, optionally pass a scope withvariables which are resolved, see #907. Thanks @firepick1.
since 3.15.0).
2017-07-29, version 3.15.0
$
in symbol names (see #895).this was disabled for security reasons some time ago. See #888, #899.
Thanks @ThomasBrierley.
map
,forEach
, andfilter
when used in the expression parser:
for the callback function.
map
and
forEach
.map
andfilter
.2017-07-05, version 3.14.2
[email protected]
2017-06-30, version 3.14.1
[email protected]
, there is an issue with4.0.1
in the browser.
2017-06-30, version 3.14.0
setCartesian
,setDifference
,setDistinct
,setIntersect
,setIsSubset
,setPowerset
,setSize
. Thanks @Nekomajin42.toHTML
on nodes. Thanks @Nekomajin42.compareNatural
andsort([...], 'natural')
.[email protected]
[email protected]
[email protected]
[email protected]
splitUnit
can now deal with round-off errors.Thanks @ericman314.
erg
. Thanks @pjhampton.double quotes around a string. Thanks @HarrySarson.
2017-05-27, version 3.13.3
intersection
of line and plane.Thanks @viclai.
2017-05-26, version 3.13.2
chain
inside the expression parser for securityreasons (it's not needed there anyway).
subset
not returning non-primitive scalarsfrom Arrays correctly. (like
math.eval('arr[1]', {arr: [math.bignumber(2)]})
.2017-05-12, version 3.13.1
parser.
2017-05-12, version 3.13.0
like
mathjs 1+2
. Thanks @slavaGanzin.derivative
now supportsabs
. Thanks @tetslee.simplify
now supports BigNumbers. Thanks @tetslee.simplify
. Thanks @tetslee.simplify
converting small numbers to inexactFractions. Thanks @tetslee.
simplify
now supports constants likee
.Thanks @tetslee.
2017-05-05, version 3.12.3
2017-04-30, version 3.12.2
2017-04-24, version 3.12.1
Infinity
. Thanks @HarrySarson.Thanks Sam and Dan.
2017-04-17, version 3.12.0
math.qr
. Thanks @HarrySarson.math.random()
freezes IE and node.js.2017-04-08, version 3.11.5
WARNING: the behavior of the expression parser is now more strict,
some undocumented features may not work any longer.
objects, not on classes, arrays, and functions anymore.
2017-04-03, version 3.11.4
2017-04-03, version 3.11.3
2017-04-03,
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.