From 77b56d585b8eb7d1fbc0defc3251f98ea74627ac Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Wed, 25 Feb 2026 16:09:54 +1100 Subject: [PATCH] fix: resolve CI type-check errors - Install @types/lodash.throttle (fixes missing declaration for @myst-theme/site upstream import) - Convert Buffer to Uint8Array in [objects.inv].tsx and [favicon.ico].tsx (Buffer no longer assignable to BodyInit in newer @types/node) --- app/routes/[favicon.ico].tsx | 2 +- app/routes/[objects.inv].tsx | 2 +- package-lock.json | 13 ++++++++++++- package.json | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/routes/[favicon.ico].tsx b/app/routes/[favicon.ico].tsx index efb8657..ca7ccd5 100644 --- a/app/routes/[favicon.ico].tsx +++ b/app/routes/[favicon.ico].tsx @@ -5,7 +5,7 @@ export const loader: LoaderFunction = async (): Promise => { const favicon = await getFavicon(); if (!favicon) return new Response("No favicon found", { status: 404 }); return new Response( - favicon.buffer, + new Uint8Array(favicon.buffer), favicon.contentType ? { headers: { "Content-Type": favicon.contentType } } : undefined diff --git a/app/routes/[objects.inv].tsx b/app/routes/[objects.inv].tsx index 6e254a6..d4adb5a 100644 --- a/app/routes/[objects.inv].tsx +++ b/app/routes/[objects.inv].tsx @@ -4,5 +4,5 @@ import { getObjectsInv } from "~/backend/loaders.server"; export const loader: LoaderFunction = async (): Promise => { const inv = await getObjectsInv(); if (!inv) return new Response("Inventory not found", { status: 404 }); - return new Response(inv); + return new Response(new Uint8Array(inv)); }; diff --git a/package-lock.json b/package-lock.json index 8e77c3b..77fc82f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "@remix-run/eslint-config": "~1.19.0", "@remix-run/serve": "~1.19.0", "@tailwindcss/typography": "^0.5.16", + "@types/lodash.throttle": "^4.1.9", "@types/node-fetch": "^2.6.12", "@types/react": "^18.2.24", "@types/react-dom": "^18.2.8", @@ -48,7 +49,7 @@ "tailwindcss": "^3.4.17" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@alloc/quick-lru": { @@ -10737,6 +10738,16 @@ "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", "license": "MIT" }, + "node_modules/@types/lodash.throttle": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/lodash.throttle/-/lodash.throttle-4.1.9.tgz", + "integrity": "sha512-PCPVfpfueguWZQB7pJQK890F2scYKoDUL3iM522AptHWn7d5NQmeS/LTEHIcLr5PaTzl3dK2Z0xSUHHTHwaL5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/mapbox__point-geometry": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz", diff --git a/package.json b/package.json index 274a665..899fda8 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@remix-run/eslint-config": "~1.19.0", "@remix-run/serve": "~1.19.0", "@tailwindcss/typography": "^0.5.16", + "@types/lodash.throttle": "^4.1.9", "@types/node-fetch": "^2.6.12", "@types/react": "^18.2.24", "@types/react-dom": "^18.2.8",