Skip to content

Commit b6f7e90

Browse files
authored
Merge branch 'develop' into faster-dense-matrix-iterator
2 parents 3260d02 + 0e9d818 commit b6f7e90

File tree

7 files changed

+29
-12
lines changed

7 files changed

+29
-12
lines changed

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# History
22

3+
# unpublished changes since 14.6.0
4+
5+
- Fix: #3519, #3368 categories "Core functions" and "Construction functions"
6+
missing from the generated function overview.
7+
- Fix #3517: `printTransformDependencies` not exported in the type definitions.
8+
39
# 2025-07-25, 14.6.0
410

511
- Feat: new function `toBest(unit, unitList, offset)`, and corresponding

src/core/function/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export function configFactory (config, emit) {
1717
*
1818
* Examples:
1919
*
20-
*
2120
* import { create, all } from 'mathjs'
2221
*
2322
* // create a mathjs instance

src/expression/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const createParse = /* #__PURE__ */ factory(name, dependencies, ({
6666
* node1.compile().evaluate() // 5
6767
*
6868
* let scope = {a:3, b:4}
69-
* const node2 = math.parse('a * b') // 12
69+
* const node2 = math.parse('a * b')
7070
* node2.evaluate(scope) // 12
7171
* const code2 = node2.compile()
7272
* code2.evaluate(scope) // 12

src/type/string.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ export const createString = /* #__PURE__ */ factory(name, dependencies, ({ typed
1616
*
1717
* Examples:
1818
*
19-
* math.string(4.2) // returns string '4.2'
20-
* math.string(math.complex(3, 2) // returns string '3 + 2i'
19+
* math.string(4.2) // returns string '4.2'
20+
* math.string(math.complex(3, 2)) // returns string '3 + 2i'
2121
*
2222
* const u = math.unit(5, 'km')
23-
* math.string(u.to('m')) // returns string '5000 m'
23+
* math.string(u.to('m')) // returns string '5000 m'
2424
*
25-
* math.string([true, false]) // returns ['true', 'false']
25+
* math.string([true, false]) // returns ['true', 'false']
2626
*
2727
* See also:
2828
*

test/node-tests/doc.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ function extractValue (spec) {
8686
return value
8787
}
8888

89+
const ignoreFunctions = new Set([
90+
'config'
91+
])
92+
8993
const knownProblems = new Set([
9094
'setUnion', 'unequal', 'equal', 'deepEqual', 'compareNatural', 'randomInt',
9195
'random', 'pickRandom', 'kldivergence',
@@ -97,7 +101,10 @@ const knownProblems = new Set([
97101
'mod', 'floor', 'fix', 'expm1', 'exp',
98102
'ceil', 'cbrt', 'add', 'slu',
99103
'rationalize', 'qr', 'lusolve', 'lup', 'derivative',
100-
'symbolicEqual', 'schur', 'sylvester', 'freqz', 'round'
104+
'symbolicEqual', 'schur', 'sylvester', 'freqz', 'round',
105+
'import', 'typed',
106+
'unit', 'sparse', 'matrix', 'index', 'bignumber', 'fraction', 'complex',
107+
'parse'
101108
])
102109

103110
let issueCount = 0
@@ -371,6 +378,10 @@ describe('Testing examples from (jsdoc) comments', function () {
371378
for (const category in byCategory) {
372379
describe('category: ' + category, function () {
373380
for (const doc of byCategory[category]) {
381+
if (ignoreFunctions.has(doc.name)) {
382+
continue
383+
}
384+
374385
it('satisfies ' + doc.name, function () {
375386
if (debug) {
376387
console.log(` Testing ${doc.name} ...`) // can remove once no known failures; for now it clarifies "PLEASE RESOLVE"

tools/docgenerator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,18 +567,18 @@ export function collectDocs (functionNames, inputPath) {
567567
if (!path.includes('docs') && functionIndex !== -1) {
568568
if (path.includes('expression')) {
569569
category = 'expression'
570-
} else if (/\/lib\/cjs\/type\/[a-zA-Z0-9_]*\/function/.test(fullPath)) {
570+
} else if (/\/src\/type\/[a-zA-Z0-9_]*\/function/.test(fullPath)) {
571571
// for type/bignumber/function/bignumber.js, type/fraction/function/fraction.js, etc
572572
category = 'construction'
573-
} else if (/\/lib\/cjs\/core\/function/.test(fullPath)) {
573+
} else if (/\/src\/core\/function/.test(fullPath)) {
574574
category = 'core'
575575
} else {
576576
category = path[functionIndex + 1]
577577
}
578-
} else if (fullPath.endsWith('/lib/cjs/expression/parse.js')) {
578+
} else if (fullPath.endsWith('/src/expression/parse.js')) {
579579
// TODO: this is an ugly special case
580580
category = 'expression'
581-
} else if (path.join('/').endsWith('/lib/cjs/type')) {
581+
} else if (path.join('/').endsWith('/src/type')) {
582582
// for boolean.js, number.js, string.js
583583
category = 'construction'
584584
}

types/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4079,7 +4079,8 @@ export const {
40794079
concatTransformDependencies,
40804080
stdTransformDependencies,
40814081
sumTransformDependencies,
4082-
varianceTransformDependencies
4082+
varianceTransformDependencies,
4083+
printTransformDependencies
40834084
}: Record<string, FactoryFunctionMap>
40844085

40854086
export interface Matrix<T = MathGeneric> {

0 commit comments

Comments
 (0)