Skip to content

Commit c3a41d2

Browse files
committed
chore: update dependencies
1 parent cc50b98 commit c3a41d2

File tree

124 files changed

+464
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+464
-41
lines changed

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import cheminfo from 'eslint-config-cheminfo-typescript';
21
import { defineConfig } from 'eslint/config';
2+
import cheminfo from 'eslint-config-cheminfo-typescript';
33

44
export default defineConfig([
55
...cheminfo,
@@ -9,6 +9,7 @@ export default defineConfig([
99
'jsdoc/lines-before-block': 'off',
1010
'no-loss-of-precision': 'off',
1111
'@typescript-eslint/prefer-for-of': 'off',
12+
'unicorn/no-array-reverse': 'off',
1213
'unicorn/import-style': [
1314
'error',
1415
{

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,19 @@
8484
},
8585
"homepage": "https://github.com/mljs/spectra-processing#readme",
8686
"devDependencies": {
87-
"@types/node": "^22.15.2",
88-
"@vitest/coverage-v8": "^3.1.2",
87+
"@types/node": "^24.2.0",
88+
"@vitest/coverage-v8": "^3.2.4",
8989
"cheminfo-build": "^1.2.1",
90-
"eslint": "^9.25.1",
91-
"eslint-config-cheminfo-typescript": "^18.0.0",
90+
"eslint": "^9.32.0",
91+
"eslint-config-cheminfo-typescript": "^19.0.0",
9292
"jest-matcher-deep-close-to": "^3.0.2",
9393
"jscpd": "^4.0.5",
9494
"ml-spectra-fitting": "^4.2.4",
95-
"prettier": "^3.5.3",
95+
"prettier": "^3.6.2",
9696
"rimraf": "^6.0.1",
9797
"spectrum-generator": "^8.1.0",
98-
"typescript": "^5.8.3",
99-
"vitest": "^3.1.2"
98+
"typescript": "^5.9.2",
99+
"vitest": "^3.2.4"
100100
},
101101
"dependencies": {
102102
"binary-search": "^1.3.6",

src/__tests__/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { expect, it } from 'vitest';
1+
import { expect, test } from 'vitest';
22

33
import * as SpectraProcessing from '../index';
44

5-
it('test existence of exported functions', () => {
5+
test('test existence of exported functions', () => {
66
const exports = Object.keys(SpectraProcessing);
7+
78
expect(exports).toMatchSnapshot();
89
});

src/matrix/__tests__/matrixAbsoluteMedian.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ test('matrixAbsoluteMedian', () => {
88
[1, 2, 3],
99
];
1010
const absoluteMedian = matrixAbsoluteMedian(matrix);
11+
1112
expect(absoluteMedian).toBe(2);
1213
});

src/matrix/__tests__/matrixApplyNumericalDecoding.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ test('should return an array of numbers', () => {
2626
);
2727

2828
const nonNumbers = matrix.flat().filter((value) => typeof value !== 'number');
29+
2930
expect(nonNumbers).toHaveLength(0);
3031
});

src/matrix/__tests__/matrixAutoCorrelation.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ test('simple', () => {
99
[3, 1],
1010
];
1111
const result = matrixAutoCorrelation(matrix);
12+
1213
expect(result[0]).toBeCloseTo(1, 10);
1314
expect(result[1]).toBeCloseTo(-1, 10);
1415
});
1516

1617
test('test matrixAutoCorrelation too small', () => {
1718
const matrix = [[0]];
19+
1820
expect(() => matrixAutoCorrelation(matrix)).toThrow(
1921
'can not calculate info if matrix contains less than 2 rows',
2022
);

src/matrix/__tests__/matrixBoxPlot.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ test('test matrixBoxPlot even', () => {
1717
[10, 100],
1818
[11, 110],
1919
];
20+
2021
expect(matrixBoxPlot(matrix)).toStrictEqual({
2122
q1: Float64Array.from([2.5, 25]),
2223
median: Float64Array.from([5.5, 55]),
@@ -28,6 +29,7 @@ test('test matrixBoxPlot even', () => {
2829

2930
test('test matrixBoxPlot even small', () => {
3031
const matrix = [[0], [1], [2], [3], [4], [5]];
32+
3133
expect(matrixBoxPlot(matrix)).toStrictEqual({
3234
q1: Float64Array.from([1]),
3335
median: Float64Array.from([2.5]),
@@ -39,6 +41,7 @@ test('test matrixBoxPlot even small', () => {
3941

4042
test('test matrixBoxPlot odd', () => {
4143
const matrix = [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10]];
44+
4245
expect(matrixBoxPlot(matrix)).toStrictEqual({
4346
q1: Float64Array.from([2]),
4447
median: Float64Array.from([5]),
@@ -50,6 +53,7 @@ test('test matrixBoxPlot odd', () => {
5053

5154
test('test matrixBoxPlot odd small', () => {
5255
const matrix = [[0], [1], [2], [3], [4]];
56+
5357
expect(matrixBoxPlot(matrix)).toStrictEqual({
5458
q1: Float64Array.from([0.5]),
5559
median: Float64Array.from([2]),
@@ -61,6 +65,7 @@ test('test matrixBoxPlot odd small', () => {
6165

6266
test('test matrixBoxPlot too small', () => {
6367
const matrix = [[0], [1], [2], [4]];
68+
6469
expect(() => matrixBoxPlot(matrix)).toThrow(
6570
'can not calculate info if matrix contains less than 5 rows',
6671
);

src/matrix/__tests__/matrixCenterZMean.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ test('matrixCenterZMean', () => {
99
[3, 1, 3, 1],
1010
];
1111
const result = matrixCenterZMean(data);
12+
1213
expect(result).toStrictEqual([
1314
Float64Array.from([-1, 1, 0, 0]),
1415
Float64Array.from([0, 0, -1, 1]),

src/matrix/__tests__/matrixCholeskySolver.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { matrixCholeskySolver } from '../matrixCholeskySolver';
88
import { matrixCuthillMckee } from '../matrixCuthillMckee';
99

1010
type Func = (b: NumberArray) => NumberArray;
11+
1112
test('solve a least square system', () => {
1213
const x = xSequentialFillFromTo({ from: 0, to: Math.PI, size: 101 });
1314
const noise = x.map(() => Math.random() * 0.1 - 0.05);
@@ -22,17 +23,23 @@ test('solve a least square system', () => {
2223
const weighted = addWeights(upperTriangularNonZeros, y, weights);
2324

2425
const cho = matrixCholeskySolver(weighted.leftHandSide, dimension) as Func;
26+
2527
expect(cho).not.toBeNull();
28+
2629
const smoothed = cho(weighted.rightHandSide);
30+
2731
expect(smoothed[50]).toBeLessThan(0.2);
2832
expect(smoothed[50]).toBeGreaterThan(-0.2);
2933

3034
//ignore the outlier, it implicates the smooth should pass closer to zero.
3135
weights[50] = 0;
3236
const weighted2 = addWeights(upperTriangularNonZeros, y, weights);
3337
const cho2 = matrixCholeskySolver(weighted.leftHandSide, dimension) as Func;
38+
3439
expect(cho2).not.toBeNull();
40+
3541
const smoothed2 = cho2(weighted2.rightHandSide);
42+
3643
expect(smoothed2[50]).toBeLessThan(smoothed[50]);
3744

3845
const permutationEncodedArray = matrixCuthillMckee(
@@ -46,6 +53,8 @@ test('solve a least square system', () => {
4653
) as Func;
4754

4855
expect(cho3).not.toBeNull();
56+
4957
const smoothed3 = cho2(weighted2.rightHandSide);
50-
expect(smoothed3[50]).toEqual(smoothed3[50]);
58+
59+
expect(smoothed3[50]).toStrictEqual(smoothed3[50]);
5160
});

src/matrix/__tests__/matrixClone.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { datasetForEncoding } from './fixtures/encoding';
66

77
test('should return an array of numbers', () => {
88
const matrix = matrixClone(datasetForEncoding);
9+
910
expect(matrix).toStrictEqual(datasetForEncoding);
1011
expect(matrix).not.toBe(datasetForEncoding);
1112
});

0 commit comments

Comments
 (0)