From d342f60437d753799d3a8dc4a10e76bd8503811e Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Thu, 7 Mar 2024 14:33:05 +0100 Subject: [PATCH] fix: update ml-spectra-processing and dependencies --- package.json | 20 ++++++++++---------- src/dataBlock/newDataBlock.ts | 5 +---- src/dataBlock/oldDataBlock.ts | 5 +---- tsconfig.json | 2 +- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 6bf3f40..6f54c32 100644 --- a/package.json +++ b/package.json @@ -38,20 +38,20 @@ }, "homepage": "https://github.com/cheminfo/spc-parser#readme", "devDependencies": { - "@babel/preset-typescript": "^7.22.15", - "@types/jest": "^29.5.4", - "@types/node": "^20.5.9", + "@babel/preset-typescript": "^7.23.3", + "@types/jest": "^29.5.12", + "@types/node": "^20.11.25", "cheminfo-build": "^1.2.0", - "eslint": "^8.48.0", - "eslint-config-cheminfo-typescript": "^12.0.4", - "jest": "^29.6.4", - "prettier": "^3.0.3", - "rimraf": "^5.0.1", - "typescript": "~5.1.6" + "eslint": "^8.57.0", + "eslint-config-cheminfo-typescript": "^12.2.0", + "jest": "^29.7.0", + "prettier": "^3.2.5", + "rimraf": "^5.0.5", + "typescript": "~5.4.2" }, "dependencies": { "cheminfo-types": "^1.7.2", "iobuffer": "^5.3.2", - "ml-spectra-processing": "^12.5.0" + "ml-spectra-processing": "^14.2.0" } } diff --git a/src/dataBlock/newDataBlock.ts b/src/dataBlock/newDataBlock.ts index e81906b..2ddcd00 100644 --- a/src/dataBlock/newDataBlock.ts +++ b/src/dataBlock/newDataBlock.ts @@ -77,10 +77,7 @@ export function getNewY( if (subHeader.exponentY === 0) { subHeader.exponentY = exponentY; } - const yFactor = Math.pow( - 2, - subHeader.exponentY - (y16BitPrecision ? 16 : 32), - ); + const yFactor = 2 ** (subHeader.exponentY - (y16BitPrecision ? 16 : 32)); if (y16BitPrecision) { for (let j = 0; j < y.length; j++) { diff --git a/src/dataBlock/oldDataBlock.ts b/src/dataBlock/oldDataBlock.ts index 79edc5b..e80b36e 100644 --- a/src/dataBlock/oldDataBlock.ts +++ b/src/dataBlock/oldDataBlock.ts @@ -71,10 +71,7 @@ export function getOldY( if (subHeader.exponentY === 0) { subHeader.exponentY = exponentY; } - const yFactor = Math.pow( - 2, - subHeader.exponentY - (y16BitPrecision ? 16 : 32), - ); + const yFactor = 2 ** (subHeader.exponentY - (y16BitPrecision ? 16 : 32)); if (y16BitPrecision) { for (let j = 0; j < y.length; j++) { diff --git a/tsconfig.json b/tsconfig.json index b82975b..e0e533e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "allowJs": true, "esModuleInterop": true, - "moduleResolution": "node16", + "moduleResolution": "node", "outDir": "lib", "sourceMap": true, "strict": true,