Skip to content
This repository was archived by the owner on Jul 26, 2025. It is now read-only.

Commit 7fe130e

Browse files
authored
chore: update dependencies (#446)
1 parent 3f36e57 commit 7fe130e

File tree

11 files changed

+28
-30
lines changed

11 files changed

+28
-30
lines changed

demo/components/CameraFeed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function CameraFeed() {
1212
if (!video || !selectedCamera) return;
1313
video.srcObject = selectedCamera.stream;
1414
video.onloadedmetadata = () => {
15-
video.play().catch(console.error);
15+
video.play().catch((err: unknown) => console.error(err));
1616
};
1717
}, [selectedCamera]);
1818
if (!selectedCamera) {

demo/components/CameraSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function CameraSelector() {
2929
camera: { device, stream },
3030
});
3131
})
32-
.catch(console.error);
32+
.catch((err: unknown) => console.error(err));
3333
}
3434
}}
3535
>

demo/components/CameraTransform.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function CameraTransform(props: CameraTransformProps) {
6868
}
6969
nextFrameRequest = requestAnimationFrame(nextFrame);
7070
})
71-
.catch(console.error);
71+
.catch((err: unknown) => console.error(err));
7272
};
7373

7474
return () => {

demo/contexts/cameraContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function CameraProvider(props: { children: ReactNode }) {
101101
}
102102

103103
function handleDeviceChange() {
104-
getCameras().catch(console.error);
104+
getCameras().catch((err: unknown) => console.error(err));
105105
}
106106

107107
navigator.mediaDevices.addEventListener('devicechange', handleDeviceChange);

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dependencies": {
4848
"bresenham-zingl": "^0.1.1",
4949
"colord": "^2.9.3",
50-
"fast-jpeg": "^2.0.0",
50+
"fast-jpeg": "^2.0.1",
5151
"fast-png": "^6.2.0",
5252
"image-type": "^4.1.0",
5353
"jpeg-js": "^0.4.4",
@@ -58,42 +58,42 @@
5858
"ml-matrix": "^6.11.0",
5959
"ml-ransac": "^1.0.0",
6060
"ml-regression-multivariate-linear": "^2.0.4",
61-
"ml-spectra-processing": "^14.0.0",
61+
"ml-spectra-processing": "^14.3.0",
6262
"robust-point-in-polygon": "^1.0.3",
6363
"ssim.js": "^3.5.0",
64-
"tiff": "^5.0.3"
64+
"tiff": "^6.0.0"
6565
},
6666
"devDependencies": {
67-
"@microsoft/api-extractor": "^7.42.3",
67+
"@microsoft/api-extractor": "^7.43.1",
6868
"@tailwindcss/forms": "^0.5.7",
6969
"@types/jest": "^29.5.12",
7070
"@types/jest-image-snapshot": "^6.4.0",
7171
"@types/js-priority-queue": "^0.0.9",
72-
"@types/node": "^20.11.24",
72+
"@types/node": "^20.12.7",
7373
"@types/picomatch": "^2.3.3",
74-
"@types/react": "^18.2.63",
75-
"@types/react-dom": "^18.2.20",
74+
"@types/react": "^18.2.75",
75+
"@types/react-dom": "^18.2.24",
7676
"@types/robust-point-in-polygon": "^1.0.4",
7777
"@vitejs/plugin-react": "^4.2.1",
78-
"autoprefixer": "^10.4.18",
78+
"autoprefixer": "^10.4.19",
7979
"clsx": "^2.1.0",
8080
"cross-env": "^7.0.3",
8181
"eslint": "^8.57.0",
82-
"eslint-config-cheminfo-react": "^10.1.0",
83-
"eslint-config-cheminfo-typescript": "^12.2.0",
84-
"immer": "^10.0.3",
82+
"eslint-config-cheminfo-react": "^11.0.1",
83+
"eslint-config-cheminfo-typescript": "^12.3.0",
84+
"immer": "^10.0.4",
8585
"jest": "^29.7.0",
8686
"jest-image-snapshot": "^6.4.0",
8787
"jest-matcher-deep-close-to": "^3.0.2",
88-
"postcss": "^8.4.35",
88+
"postcss": "^8.4.38",
8989
"prettier": "^3.2.5",
9090
"react": "^18.2.0",
9191
"react-dom": "^18.2.0",
92-
"react-router-dom": "^6.22.2",
92+
"react-router-dom": "^6.22.3",
9393
"rimraf": "^5.0.5",
94-
"tailwindcss": "^3.4.1",
94+
"tailwindcss": "^3.4.3",
9595
"ts-jest": "^29.1.2",
96-
"typescript": "~5.3.3",
97-
"vite": "^5.1.5"
96+
"typescript": "~5.4.5",
97+
"vite": "^5.2.8"
9898
}
9999
}

src/Image.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,6 @@ function printData(img: Image): string {
11251125
}
11261126

11271127
return `{
1128-
${`[\n ${result.join('\n ')}\n ]`}
1128+
[\n ${result.join('\n ')}\n ]
11291129
}`;
11301130
}

src/compute/mean.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ import { Image } from '../Image';
77
* @returns The mean pixel.
88
*/
99
export function mean(image: Image): number[] {
10-
const pixel = new Array(image.channels).fill(0);
10+
const pixel = new Array<number>(image.channels).fill(0);
1111
for (let row = 0; row < image.height; row++) {
1212
for (let column = 0; column < image.width; column++) {
1313
for (let channel = 0; channel < image.channels; channel++) {
1414
pixel[channel] += image.getValue(column, row, channel);
1515
}
1616
}
1717
}
18-
const channelMeans = pixel.map((channel) => channel / image.size);
19-
20-
return channelMeans;
18+
return pixel.map((channel) => channel / image.size);
2119
}

src/compute/variance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Image } from '../Image';
99
export function variance(image: Image): number[] {
1010
const mean = image.mean();
1111

12-
const sum = new Array(image.channels).fill(0);
12+
const sum = new Array<number>(image.channels).fill(0);
1313
for (let i = 0; i < image.size; i++) {
1414
for (let channel = 0; channel < image.channels; channel++) {
1515
sum[channel] += (image.getValueByIndex(i, channel) - mean[channel]) ** 2;

src/featureMatching/keypoints/getIntensityMoment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function getIntensityMoment(
2828
): number[] {
2929
const { origin = image.getCoordinates('center') } = options;
3030

31-
const moment = new Array(image.channels).fill(0);
31+
const moment = new Array<number>(image.channels).fill(0);
3232
for (let row = 0; row < image.height; row++) {
3333
for (let column = 0; column < image.width; column++) {
3434
const xDistance = column - origin.column;

src/featureMatching/keypoints/getPatchIntensityMoment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function getPatchIntensityMoment(
3939
if (!checkBorderDistance(image, origin, radius)) {
4040
throw new RangeError(`desired patch is too close to image border`);
4141
}
42-
const moment = new Array(image.channels).fill(0);
42+
const moment = new Array<number>(image.channels).fill(0);
4343

4444
const relativeCirclePoints = getFilledCirclePoints(radius);
4545
for (const point of relativeCirclePoints) {

0 commit comments

Comments
 (0)