92 Commits

Author SHA1 Message Date
Jos de Jong
83e1963cee Merge branch 'develop' into v8
# Conflicts:
#	HISTORY.md
#	src/function/probability/pickRandom.js
#	test/unit-tests/function/probability/pickRandom.test.js
2020-10-18 10:14:32 +02:00
Jos de Jong
ecb80514e8 Fix object pollution vulnerability in math.config 2020-10-10 10:24:48 +02:00
Jos de Jong
6f00715754
Specify import require paths (continuation of #1941) (#1962)
* Add `.js` extension to source file imports

* Specify package `exports` in `package.json`

Specify package type as `commonjs` (It's good to be specific)

* Move all compiled scripts into `lib` directory

Remove ./number.js (You can use the compiled ones in `./lib/*`)

Tell node that the `esm` directory is type `module` and enable tree shaking.

Remove unused files from packages `files` property

* Allow importing of package.json

* Make library ESM first

* - Fix merge conflicts
- Refactor `bundleAny` into `defaultInstance.js` and `browserBundle.cjs`
- Refactor unit tests to be able to run with plain nodejs (no transpiling)
- Fix browser examples

* Fix browser and browserstack tests

* Fix running unit tests on Node 10 (which has no support for modules)

* Fix node.js examples (those are still commonjs)

* Remove the need for `browserBundle.cjs`

* Generate minified bundle only

* [Security] Bump node-fetch from 2.6.0 to 2.6.1 (#1963)

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. **This update includes a security fix.**
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Cleanup console.log

* Add integration tests to test the entry points (commonjs/esm, full/number only)

* Create backward compatibility error messages in the files moved/removed since v8

* Describe breaking changes in HISTORY.md

* Bump karma from 5.2.1 to 5.2.2 (#1965)

Bumps [karma](https://github.com/karma-runner/karma) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v5.2.1...v5.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Co-authored-by: Lee Langley-Rees <lee@greenimp.co.uk>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-20 18:01:29 +02:00
josdejong
23e38bea60 Remove all deprecated code and warnings 2020-05-06 21:57:33 +02:00
josdejong
f9487554bc Fix broken bundle tests and linting issues 2020-05-03 16:04:22 +02:00
josdejong
3f6646f9e3 Fix #1813: bug in engineering notation for numbers of function format, sometimes resulting in needless trailing zeros 2020-04-11 13:26:46 +02:00
jos
8bf5206daf Fix lint error 2020-02-01 17:42:32 +01:00
jos
0c863f4e07 Fixed #1727: validate matrix size when creating a DenseMatrix using fromJSON 2020-02-01 17:37:34 +01:00
jos
b9175a1a29 Fixed IndexNode using a hardcoded, one-based implementation of index. See #782 2019-11-20 12:23:06 +01:00
jos
7b1cd7753e Fixed #1628: Cannot call methods on empty strings or numbers with value 0 2019-09-23 20:23:39 +02:00
jos
e37cc81735 Fixed #1606: function format not working for expressions 2019-08-29 10:17:57 +02:00
Harry Sarson
4cfef3ac34 fix no-case-declarations lint 2019-08-21 10:09:10 +01:00
Harry Sarson
e0adfb3e37 Ignore use of template literals in normal strings for latex
Mathjs latex uses same syntax as template literals, thus we need to
ignore some otherwise helpful rules that look for template literal
syntax in normal strings.
2019-08-21 10:09:10 +01:00
Harry Sarson
b6a42c032d run standard --fix 2019-08-21 10:09:10 +01:00
Waseem Yusuf
4cee37232f Added a combinationsWithRep function to calculate combinations with repitition (#1588)
* Implemented the `multicombinations` function

* Write unit tests for `multicombinations` function

* Integrate the `multicombinations` function throughout codebase

1. Include multicombinations factory function in factoriesAny.js and factoriesNumber.js
2. Write embedded docs for multicombinations
3. Added latex support
4. Refer to multicombinations in the "see also"-section of related functions

* Change name from `multichoose` to `combinationsWithRep`
2019-08-15 11:35:51 +02:00
jos
d8a4f3a00a Update to standard@13.0.2 2019-07-20 13:46:31 +02:00
jos
41efed79d3 Fix #1473: remove 'use strict' in every file 2019-05-26 20:21:18 +02:00
jos
fc66aa5bb5 Expose function factory via mathjs instance 2019-05-26 15:48:18 +02:00
jos
f54599a701 Fix #1530: apply rounding first and lowerExp and upperExp second when formatting a number 2019-05-25 15:51:33 +02:00
jos
859cac81a1 Merged function core and create into one function create 2019-05-22 21:20:56 +02:00
jos
9af5206a88 Make matrix dependency requried again for subset. Make IndexNodes dependencies explicit. Disable subset in number implementation for now 2019-05-22 11:08:12 +02:00
jos
28e33bb89b Merge remote-tracking branch 'origin/v5' into develop
# Conflicts:
#	package-lock.json
#	package.json
2019-05-17 19:44:25 +02:00
jos
0a6aded52a Fix #1512: bug in format notation engineering 2019-05-16 21:51:13 +02:00
jos
cc740b39be Move snapshot code into /src to have it transpiled 2019-05-04 15:17:15 +02:00
jos
33cead1327 Improved deprecation errors and warnings. Introduce lazy again for factories. 2019-04-22 09:45:57 +02:00
jos
850886f361 Fix occurrences of CommonCS exports 2019-04-13 17:07:21 +02:00
jos
6081360d6a Merged develop into modular_architecture 2019-04-13 16:51:51 +02:00
jos
87b9a3d07f Fixed #1459: engineering notation of function format not available for BigNumber 2019-04-08 21:17:39 +02:00
jos
22bec13d10 Implement number factories, dependencies. Make matrix and bignumber optional where possible 2019-04-03 09:46:44 +02:00
jos
6acadd71a0 Create number implementations of all functions in mainNumber.js 2019-03-06 21:49:30 +01:00
jos
827e49f66b Implement support for nested recipes. Describe the API concepts 2019-02-24 21:06:04 +01:00
jos
554d2243de Refactor hasNumericValue and sum.transform 2019-02-09 21:56:22 +01:00
jos
83df09800b Merge branch 'develop' into modular_architecture_merge
# Conflicts:
#	HISTORY.md
#	gulpfile.js
#	package-lock.json
#	package.json
#	src/core/function/typed.js
#	src/expression/transform/index.js
#	src/function/statistics/sum.js
#	src/function/utils/index.js
#	src/type/unit/Unit.js
#	src/version.js
#	test/expression/node/FunctionNode.test.js
#	test/type/unit/function/createUnit.test.js
#	test/utils/bignumber/formatter.test.js
#	test/utils/number.test.js
2019-02-09 21:26:25 +01:00
jos
99da53da0e Flatten everything in a mathjs instance to make it consistent with the ES6 exports. Create deprecation warnings for the old classes and functions 2019-02-07 21:24:51 +01:00
jos
91f67047c5 Drop support for non-lazy fallback in lazy 2019-02-06 15:02:18 +01:00
jos
e5ccd9cdf1 Remove support for factory names and dependencies containing paths 2019-02-06 11:49:09 +01:00
jos
c42844a5d8 Flatten all type.* dependencies 2019-01-30 13:47:45 +01:00
Eric Mansfield
aa68442238 Bignumber formatter fix (#1387)
* Fixed unit base recognition and formatting for user-defined units

* Fix for high precision bignumber formatting
2019-01-21 21:14:29 +01:00
jos
e36cb13c25 Implement util function warnOnce which is used for deprecated functionality 2019-01-14 21:16:44 +01:00
jos
9f3ec22ec8 Get bundles, bin, cli, and all travis tests working again 🎉 2019-01-09 11:36:03 +01:00
jos
5eb024742e Export physical constants in mainFull.js 2019-01-09 09:58:34 +01:00
jos
0721626422 Fix #1378: negative bignumbers not formatted correctly 2019-01-08 20:27:59 +01:00
jos
e178f3fbd8 Remove the need to have the Complex and Fraction classes for type checking 2019-01-05 22:11:33 +01:00
jos
058177f746 Some more replacements of of to forEach and some 2019-01-02 10:59:20 +01:00
jos
45f6f547c3 Replace Object.values with a util function 2018-12-30 22:34:13 +01:00
jos
a05d15e1db Remove partial and memoization. Gives too much complications. 2018-12-23 15:01:29 +01:00
jos
2a96327286 Fix lint errors 2018-12-19 18:10:57 +01:00
jos
c32d410565 Refactor functions create and core. Use the new index files from all unit tests 2018-12-19 18:08:01 +01:00
dkenul
30e1bfc9d2 Fix #1337: function format precision 0 bug (#1338) 2018-11-29 20:08:41 +01:00
jos
c78c465167 Deprecate Matrix.storage() 2018-11-28 11:35:42 +01:00