diff --git a/package.json b/package.json index 0b0c5e8d..86a44025 100644 --- a/package.json +++ b/package.json @@ -40,26 +40,26 @@ }, "dependencies": { "binary-search": "^1.3.6", - "cheminfo-types": "^1.8.1", + "cheminfo-types": "^1.10.0", "fft.js": "^4.0.4", "is-any-array": "^2.0.1", "ml-matrix": "^6.12.1", "ml-xsadd": "^3.0.1" }, "devDependencies": { - "@types/node": "^24.5.2", - "@vitest/coverage-v8": "^3.2.4", + "@types/node": "^25.0.3", + "@vitest/coverage-v8": "^4.0.16", "@zakodium/tsconfig": "^1.0.2", - "cheminfo-build": "^1.3.1", - "eslint": "^9.36.0", - "eslint-config-cheminfo-typescript": "^20.0.0", + "cheminfo-build": "^1.3.2", + "eslint": "^9.39.2", + "eslint-config-cheminfo-typescript": "^21.0.1", "jest-matcher-deep-close-to": "^3.0.2", "ml-spectra-fitting": "^5.0.1", - "prettier": "^3.6.2", - "rimraf": "^6.0.1", + "prettier": "^3.7.4", + "rimraf": "^6.1.2", "spectrum-generator": "^8.1.1", - "typescript": "^5.9.2", - "vitest": "^3.2.4" + "typescript": "^5.9.3", + "vitest": "^4.0.16" }, "repository": { "type": "git", diff --git a/src/matrix/matrixGetSubMatrix.ts b/src/matrix/matrixGetSubMatrix.ts index 2e14c94b..514ac568 100644 --- a/src/matrix/matrixGetSubMatrix.ts +++ b/src/matrix/matrixGetSubMatrix.ts @@ -39,10 +39,10 @@ export function matrixGetSubMatrix( options: MatrixGetSubMatrixOptions, ): Float64Array[] { const { - startRow = 0, - endRow = matrix.length - 1, - startColumn = 0, - endColumn = matrix[0].length - 1, + startRow, + endRow, + startColumn, + endColumn, duplicate = true, } = options; matrixCheckRanges(matrix, { startColumn, startRow, endColumn, endRow }); diff --git a/src/xy/xyCumulativeDistributionStatistics.ts b/src/xy/xyCumulativeDistributionStatistics.ts index e123ff1f..e78a93ea 100644 --- a/src/xy/xyCumulativeDistributionStatistics.ts +++ b/src/xy/xyCumulativeDistributionStatistics.ts @@ -34,18 +34,16 @@ export function xyCumulativeDistributionStatistics( } const result: XYCumulativeDistributionStatisticsResult = { - x0: 0, + x0: x[0], x25: 0, x50: 0, x75: 0, - x100: 0, + x100: x.at(-1) as number, xMode: 0, xMean: 0, }; // need to find the x values closest to STEPS/100 - result.x0 = x[0]; - result.x100 = x.at(-1) as number; let currentStep = 0; breakPoint: for (let i = 1; i < cumulativeSum.length; i++) { diff --git a/src/xyObject/__tests__/xyObjectSlotX.test.ts b/src/xyObject/__tests__/xyObjectSlotX.test.ts index fde973e2..bdcf32dd 100644 --- a/src/xyObject/__tests__/xyObjectSlotX.test.ts +++ b/src/xyObject/__tests__/xyObjectSlotX.test.ts @@ -10,8 +10,10 @@ test('xyObjectSlotX', () => { { x: 1.9, y: 4 }, ]; - const expected = []; - expected.push({ x: 1, y: 6 }, { x: 2, y: 4 }); + const expected = [ + { x: 1, y: 6 }, + { x: 2, y: 4 }, + ]; expect(xyObjectSlotX(arrayXY)).toStrictEqual(expected);