Skip to content

Commit 65d1c36

Browse files
authored
chore: update dev dependencies (#327)
1 parent 525db22 commit 65d1c36

File tree

14 files changed

+39
-27
lines changed

14 files changed

+39
-27
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
"ml-xsadd": "^3.0.1"
4747
},
4848
"devDependencies": {
49-
"@types/node": "^24.3.0",
49+
"@types/node": "^24.3.1",
5050
"@vitest/coverage-v8": "^3.2.4",
5151
"@zakodium/tsconfig": "^1.0.2",
5252
"cheminfo-build": "^1.3.1",
53-
"eslint": "^9.34.0",
54-
"eslint-config-cheminfo-typescript": "^19.0.0",
53+
"eslint": "^9.35.0",
54+
"eslint-config-cheminfo-typescript": "^20.0.0",
5555
"jest-matcher-deep-close-to": "^3.0.2",
5656
"ml-spectra-fitting": "^5.0.1",
5757
"prettier": "^3.6.2",
5858
"rimraf": "^6.0.1",
59-
"spectrum-generator": "^8.1.0",
59+
"spectrum-generator": "^8.1.1",
6060
"typescript": "^5.9.2",
6161
"vitest": "^3.2.4"
6262
},

src/matrix/matrixCuthillMckee.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export function matrixCuthillMckee(
5656
visited[i] = true;
5757
while (ptr < eol) {
5858
const v = toVisit[ptr++];
59-
const nbhd = Float64Array.from(adj[v]).sort();
59+
const nbhd = Float64Array.from(adj[v]);
60+
nbhd.sort();
6061
for (const u of nbhd) {
6162
if (visited[u]) {
6263
continue;

src/utils/__tests__/recursiveRemoveEmptyAndNull.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ describe('Type preservation', () => {
683683
boolean: true,
684684
falsyBoolean: false,
685685
zero: 0,
686-
bigint: BigInt(123),
686+
bigint: 123n,
687687
symbol: Symbol('test'),
688688
};
689689

src/x/xBoxPlot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function xBoxPlot(array: NumberArray): XBoxPlot {
3030

3131
// duplicate the array to avoid modifying the original one
3232
// and sort typed array that is much faster than sorting a normal array
33-
array = Float64Array.from(array).sort();
33+
array = Float64Array.from(array);
34+
array.sort();
3435

3536
// need to deal with very close points otherwise it yields to incorrect results
3637
if ((array.at(-1) as number) - array[0] <= Number.EPSILON) {

src/x/xNoiseSanPlot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ function prepareData(
354354
}
355355
}
356356

357-
input.sort().reverse();
357+
input.sort();
358+
input.reverse();
358359

359360
return input;
360361
}

src/x/xSortAscending.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ export function xSortAscending<ArrayType extends NumberArray>(
1111
array: ArrayType,
1212
): ArrayType {
1313
if (ArrayBuffer.isView(array)) {
14-
return array.sort() as ArrayType;
14+
array.sort();
15+
return array;
1516
} else if (Array.isArray(array)) {
16-
return array.sort((a, b) => a - b) as ArrayType;
17+
array.sort((a, b) => a - b);
18+
return array;
1719
}
1820
throw new Error('trying to sort non array');
1921
}

src/x/xSortDescending.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export function xSortDescending<ArrayType extends NumberArray>(
99
array: ArrayType,
1010
): ArrayType {
1111
if (ArrayBuffer.isView(array)) {
12-
array.sort().reverse();
12+
array.sort();
13+
array.reverse();
1314
return array;
1415
} else if (Array.isArray(array)) {
1516
array.sort((a, b) => b - a);

src/x/xUniqueSorted.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ import type { NumberArray } from 'cheminfo-types';
66
* @returns - sorted array
77
*/
88
export function xUniqueSorted(array: NumberArray): Float64Array<ArrayBuffer> {
9-
return Float64Array.from(new Set(array)).sort();
9+
const unique = Float64Array.from(new Set(array));
10+
unique.sort();
11+
return unique;
1012
}

src/xy/xyGetNMaxY.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export function xyGetNMaxY(data: DataXY, numberMaxPoints: number): DataXY {
1717
const newY = new Float64Array(numberMaxPoints);
1818

1919
const floatY = Float64Array.from(data.y);
20-
floatY.sort().reverse();
20+
floatY.sort();
21+
floatY.reverse();
2122
const threshold = floatY[numberMaxPoints - 1];
2223

2324
let index = 0;

src/xy/xySortX.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export function xySortX(data: DataXY): DataXY<Float64Array> {
2525
const xyObject = Array.from(x, (val, index) => ({
2626
x: val,
2727
y: y[index],
28-
})).sort((a, b) => a.x - b.x);
28+
}));
29+
xyObject.sort((a, b) => a.x - b.x);
2930

3031
const response = {
3132
x: new Float64Array(x.length),

0 commit comments

Comments
 (0)