Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Mar 7, 2024
1 parent fd108ca commit beebf51
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@
},
"homepage": "https://github.com/mljs/signal-processing#readme",
"devDependencies": {
"@types/jest": "^29.5.0",
"eslint": "^8.36.0",
"eslint-config-cheminfo-typescript": "^11.3.1",
"jest": "^29.5.0",
"@types/jest": "^29.5.12",
"eslint": "^8.57.0",
"eslint-config-cheminfo-typescript": "^12.2.0",
"jest": "^29.7.0",
"jest-matcher-deep-close-to": "^3.0.2",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"ts-jest": "^29.0.5",
"typescript": "^5.0.2",
"typescript-json-schema": "^0.55.0"
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"typescript": "^5.4.2",
"typescript-json-schema": "^0.63.0"
},
"dependencies": {
"baselines": "^1.1.5",
"cheminfo-types": "^1.4.0",
"ml-gsd": "^12.1.3",
"baselines": "^1.1.7",
"cheminfo-types": "^1.7.2",
"ml-gsd": "^12.1.5",
"ml-savitzky-golay-generalized": "^4.0.1",
"ml-spectra-processing": "^12.0.0"
"ml-spectra-processing": "^14.2.0"
}
}
2 changes: 1 addition & 1 deletion src/filterMatrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function filterMatrix(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
filters: FilterMatrixType[],
) {
let result = {
const result = {
data: matrix,
};

Expand Down
2 changes: 1 addition & 1 deletion src/filterXY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function filterXY(data: DataXY, filters: FilterXYType[]) {

const logs = [];

for (let filter of filters) {
for (const filter of filters) {
const start = Date.now();
// eslint-disable-next-line import/namespace
const filterFct = Filters[filter.name];
Expand Down
2 changes: 1 addition & 1 deletion src/filters/sg/__tests__/firstDerivative.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { firstDerivative } from '../firstDerivative';
expect.extend({ toBeDeepCloseTo, toMatchCloseTo });

test('firstDerivative', () => {
let result = firstDerivative(linear);
const result = firstDerivative(linear);
expect(result.data).toMatchCloseTo({
x: Float64Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9]),
y: Float64Array.from([
Expand Down
2 changes: 1 addition & 1 deletion src/filters/sg/__tests__/savitzkyGolay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { savitzkyGolay } from '../savitzkyGolay';
expect.extend({ toBeDeepCloseTo, toMatchCloseTo });

test('savitzkyGolay', () => {
let result = savitzkyGolay(linear, {
const result = savitzkyGolay(linear, {
derivative: 1,
});
expect(result.data).toMatchCloseTo({
Expand Down
2 changes: 1 addition & 1 deletion src/filters/sg/__tests__/secondDerivative.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { secondDerivative } from '../secondDerivative';
expect.extend({ toBeDeepCloseTo, toMatchCloseTo });

test('secondDerivative', () => {
let result = secondDerivative(linear);
const result = secondDerivative(linear);
expect(result.data).toMatchCloseTo({
x: Float64Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9]),
y: Float64Array.from([
Expand Down
2 changes: 1 addition & 1 deletion src/filters/sg/__tests__/thirdDerivate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { thirdDerivative } from '../thirdDerivative';
expect.extend({ toBeDeepCloseTo, toMatchCloseTo });

test('thirdDerivative', () => {
let result = thirdDerivative(linear);
const result = thirdDerivative(linear);
expect(result.data).toMatchCloseTo({
x: Float64Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9]),
y: Float64Array.from([0, 0, 0, 0, 0, 0, 0, 0, 0]),
Expand Down
24 changes: 12 additions & 12 deletions src/filters/x/__tests__/calibrateX.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ expect.extend({ toBeDeepCloseTo, toMatchCloseTo });

describe('calibrateX', () => {
it('undefined params', () => {
let data = {
const data = {
x: Float64Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),
y: Float64Array.from([1, 1, 1, 1, 1, 1, 700, 1, 1, 1, 1, 1, 1]),
};

let shifted = calibrateX(data);
const shifted = calibrateX(data);
expect(shifted.data.x).toMatchCloseTo(
Float64Array.from([-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]),
);
expect(shifted.data.y).toStrictEqual(data.y);
});

it('too small data', () => {
let data = {
const data = {
x: Float64Array.from([0, 1, 2, 3]),
y: Float64Array.from([1, 1, 5, 1]),
};
Expand All @@ -29,12 +29,12 @@ describe('calibrateX', () => {
});

it('no shift', () => {
let data = {
const data = {
x: Float64Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),
y: Float64Array.from([1, 1, 5, 1, 1, 1, 700, 1, 1, 1, 1, 1, 1]),
};

let gsdOptions = {
const gsdOptions = {
minMaxRatio: 0.4,
realTopDetection: true,
smoothY: true,
Expand All @@ -44,7 +44,7 @@ describe('calibrateX', () => {
},
};

let shifted = calibrateX(data, {
const shifted = calibrateX(data, {
from: 1,
to: 10,
targetX: 6,
Expand All @@ -58,12 +58,12 @@ describe('calibrateX', () => {
});

it('shift of 2', () => {
let data = {
const data = {
x: Float64Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),
y: Float64Array.from([1, 1, 1, 1, 700, 1, 5, 1, 1, 1, 1, 1, 1]),
};

let gsdOptions = {
const gsdOptions = {
minMaxRatio: 0.4,
realTopDetection: true,
smoothY: true,
Expand All @@ -73,7 +73,7 @@ describe('calibrateX', () => {
},
};

let shifted = calibrateX(data, {
const shifted = calibrateX(data, {
targetX: 6,
gsd: gsdOptions,
from: 1,
Expand All @@ -89,7 +89,7 @@ describe('calibrateX', () => {
});

it('2 peaks', () => {
let data = {
const data = {
x: Float64Array.from([
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20,
Expand All @@ -99,7 +99,7 @@ describe('calibrateX', () => {
]),
};

let gsdOptions = {
const gsdOptions = {
minMaxRatio: 0.4,
realTopDetection: true,
smoothY: true,
Expand All @@ -109,7 +109,7 @@ describe('calibrateX', () => {
},
};

let shifted = calibrateX(data, {
const shifted = calibrateX(data, {
targetX: 6,
gsd: gsdOptions,
nbPeaks: 2,
Expand Down
2 changes: 1 addition & 1 deletion src/filters/x/calibrateX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function calibrateX(
const fromIndex = xFindClosestIndex(data.x, from);
const toIndex = xFindClosestIndex(data.x, to);

let peaks = gsd(
const peaks = gsd(
{
x: data.x.subarray(fromIndex, toIndex),
y: data.y.subarray(fromIndex, toIndex),
Expand Down

0 comments on commit beebf51

Please sign in to comment.