58 Commits

Author SHA1 Message Date
Jos de Jong
b3e67e5e91 fix: #3519, #3368 categories "Core functions" and "Construction functions" missing from the generated function overview 2025-08-28 14:28:15 +02:00
Jos de Jong
1f05a35d68
chore: convert CJS files to ESM (#3204) 2024-05-22 08:46:14 +02:00
Jos de Jong
d97f338fcc chore: replace util functions values and contains and usages of indexOf with using native JS functions values and contains (see #3194) 2024-04-25 08:35:49 +02:00
Vrushaket Chaudhari
8f8e506166
feat: implement subtractScalar (#3081, #2643)
* added subtractScaler

* added subtractScaler missing entries

* added test cases for 2 or more parameters, test for subtractScalar instead fo subtract

* replaced subtract with subtractScalar whereever possible

---------

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2023-10-25 13:46:58 +02:00
Jos de Jong
5477d3829f chore: update devDependencies 2023-07-19 15:15:22 +02:00
Jos de Jong
caf5a69e6a Don't use replaceAll (not supported on node@14) 2022-07-19 14:43:17 +02:00
Jos de Jong
e7f5e8f2af Upgrade from glob@7 to glob@8 2022-07-19 14:34:20 +02:00
Jos de Jong
ef0c62551b
Hotfix: missing functions in docs (#2556)
* Fix core and construction functions missing in docs

* Cleanup unused import

* Fix function `parse` missing in docs

* Add a TODO, remove unused `relativePath`
2022-05-11 09:57:36 +02:00
Jos de Jong
3166b7f57b
Gwhitney doctesting (#2471)
* test: Add unit tests for all of the examples in (jsdoc) comments

  Uses the existing extraction of examples from tools/docgenerator.js
  Hence, for now this is limited to documentation of functions, but
  hopefully it can be extended to classes, units (and physical constants),
  and constants as well in the future.

  Exposes numerous errors in the examples, some of which are bugs; these
  are for now put on a known error list to be worked on, so that this
  PR does not change a huge number of source files.

  Also adds a test to check that all symbols are documented (which
  similarly doesn't really pass at the moment, and is patched to a
  hopefully temporary warning).

* refactor: Make doc.test.js into a node test

  The source code is not available in its layout as in the repository in
  the browser tests, so the new doc testing can only occur in the node tests

* Add simplifyCore, symbolicEqual, map, and resolve to the list with functions with known issues in the jsdoc examples

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
2022-03-07 11:50:42 +01:00
Glen Whitney
151926c75b
fix: simplify.resolve detects reference loop and throws error (#2405)
* docs: Enhance generation to pick up functions with a prefix

  For example, prior to this commit, docgenerator.js would miss
  simplify.resolve because it is not a direct key of the math
  object.

  Also incorporates any "throws" attributes in the comments into
  the generated documentation, and uses this to document the
  new error-case behavior of simplify.resolve to be added in the next
  commit.

* fix(resolve): Detect and throw errors for reference loops

  Also extends resolve to work inside all node types. Adds tests
  for both changes.

* docs: Add embedded docs for simplify.resolve et al.

  To support finding the embedded doc from the `math.simplify.resolve`
  function itself, required extending the search for objects with
  documentation one level deeper in the `help()` function. Added test for
  this search.

  Also added support for documenting throws in embedded docs.

* refactor(simplify): Move resolve and simplifyCore to top-level

  Also reverts changes searching for docs and embedded docs one level
  down in the naming hierarchy.
  Also splits tests for resolve and simplifyCore into their own files,
  reflecting their new top-level status.

* fix(resolve): Remaining changes as requested

  Also removed a stray blank line inadvertently introduced in
  docgenerator.js

* refactor: Declare resolve and simplifyCore as dependencies of simplify

  ... rather than explicitly loading them, which is unnecessary now that they
  are at top level.

* fix: Add dependencies to factoriesNumber

  Also register simplifyCore as a dependency to rationalize

Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
2022-02-28 09:58:10 +01: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
Jos de Jong
76a0ec755b Publish v7.1.0 2020-07-13 21:26:05 +02:00
Jos de Jong
6ef0f9b887 Allow to pick embedded docs from an other comment block than just the first 2020-07-13 21:17:28 +02:00
jos
d8a4f3a00a Update to standard@13.0.2 2019-07-20 13:46:31 +02:00
jos
b390a23f4b Fix function reference not published in npm library 2019-06-09 20:44:16 +02:00
jos
ec44199dc0 Ignore generated docs in repo, cleanup generated docs before generation 2019-05-22 14:25:42 +02:00
jos
158e39b673 Replace deprecated gulp-util with fancy-log 2019-05-04 10:05:15 +02:00
jos
078f1dd69f Renamed methods .eval to .evaluate, updated all docs and examples accordingly 2019-01-16 10:11:32 +01:00
jos
05e6cfec7f Doc generation working again. Renamed variance and evaluate occurrences in the docs. 2019-01-09 11:21:43 +01:00
jos
88263c47c7 Woohoo fixed the last lint errors 2018-06-13 21:51:09 +02:00
jos
e844004cbf Removed redundant escape characters 2018-06-13 21:15:10 +02:00
jos
b1777e3cf9 Fixed mixing || and && in expressions 2018-06-13 15:38:57 +02:00
jos
b6b36bfd9b Use strict equality checks everywhere (=== and !==) 2018-06-13 15:02:21 +02:00
jos
6d340e0faa Fixed import.js not being documented correctly in the function reference 2018-06-13 13:34:27 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
6308e5b7fc Added missing embedded docs 2018-05-02 09:51:08 +02:00
jos
8eb8aba6ce Fixed truncation of multi-line descriptions of @return too (see #1040) 2018-02-21 14:34:52 +01:00
jos
3059e1b94f Fixed truncation of some docs when generating markdown (see #1040) 2018-02-21 13:22:08 +01:00
jos
e0095229ac Handle functions without examples correctly in docgenerator 2016-08-15 21:17:57 +02:00
jos
cd9214727d Released version 3.4.1 2016-08-08 20:22:15 +02:00
jos
d9cc810689 Put the comment on automatically generated docs on top of the files 2016-03-19 09:44:24 +01:00
jos
2ef9bf5878 Fixed the links on the functions reference page 2016-03-04 13:45:22 +01:00
jos
e2a3878ba9 Moved functions format and print to section string 2016-03-03 20:17:41 +01:00
jos
6a94e1a0de Improved function reference page (see #556):
- changed headers to "Category functions"
 - show function name with namespace, like `math.sin`
 - functions are now shown in a table with description
2016-03-03 20:08:57 +01:00
jos
10bc7be287 Fixed escaping of html tags in function parameter types 2016-03-01 21:01:29 +01:00
jos
344f681a9f Order function categories in a particular order 2016-02-27 21:01:53 +01:00
jos
2898fd09eb Fixed broken filter for construction functions 2016-02-27 20:52:29 +01:00
jos
0922121e82 Added core functions config, import, and typed to the docs. Updated other docs 2016-02-27 20:37:26 +01:00
jos
481e8da2b5 Removed alphabetical function list, moved categorical list to root of docs. 2016-02-27 14:27:19 +01:00
jos
22300be63b Updated docgenerator to ignore function distribution 2015-11-20 20:13:33 +01:00
jos
507c0119e5 Fixed: added functions math.sparse and math.index to the reference docs, they where missing. 2015-10-28 21:12:25 +01:00
jos
d2e8ec06f2 Fixed docgenerator for v2. Updated docs. 2015-06-10 20:50:29 +02:00
jos
7e3eda8603 Moved all data types and their construction functions into a folder of their own under ./lib/type 2015-05-05 13:51:24 +02:00
jos
2614ca6203 Added docs for xor, removed docs of _divide 2014-12-25 14:11:15 +01:00
jos
32060ca104 Removed a redundant comma 2014-06-25 13:17:50 +02:00
jos
087463dc84 Added a set with functions syntax for special cases 2014-06-25 13:17:30 +02:00
jos
a42dcd9cc3 Added categorical function reference 2014-06-23 22:36:24 +02:00
jos
4719d213de Created docs page with alphabetical function reference 2014-06-23 22:22:42 +02:00
jos
31aa5655b1 Added a section "Where:" to some of the reference docs 2014-05-22 22:15:40 +02:00