From e5df93f0a6637c46995b10c5139c126bad5dc614 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Tue, 25 Apr 2023 15:06:38 -0400 Subject: [PATCH] ci: update pm Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 18 ++++++++++++------ _official-tutorial/app/data.ts | 1 - _official-tutorial/package.json | 1 + basic/app/routes/demos/params/$id.tsx | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index 83130edb..d181f60d 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -83,11 +83,17 @@ for (const example of examples) { } console.log(`📥\u00A0Installing ${example} with "${pm}"`); - const installResult = await execa( - pm, - ["install", "--silent", "--legacy-peer-deps"], - options - ); + /** @type {import('execa').ExecaChildProcess} */ + let installResult; + if (pm === "npm") { + installResult = await execa( + pm, + ["--silent", "--legacy-peer-deps"], + options + ); + } else { + installResult = await execa(pm, ["--silent"], options); + } if (installResult.exitCode) { console.error(installResult.stderr); @@ -120,7 +126,7 @@ for (const example of examples) { throw new Error(`🚨\u00A0Error building ${example}`); } - console.log(`🕵️\u00A0\u00A0Typechecking ${example}`); + console.log(`🕵️\u00A0Typechecking ${example}`); const typecheckResult = await execa(pm, ["run", "typecheck"], options); if (typecheckResult.exitCode) { diff --git a/_official-tutorial/app/data.ts b/_official-tutorial/app/data.ts index 05f6649d..c366c152 100644 --- a/_official-tutorial/app/data.ts +++ b/_official-tutorial/app/data.ts @@ -3,7 +3,6 @@ //////////////////////////////////////////////////////////////////////////////// import { matchSorter } from "match-sorter"; -// @ts-ignore - no types, but it's a tiny function import sortBy from "sort-by"; import invariant from "tiny-invariant"; diff --git a/_official-tutorial/package.json b/_official-tutorial/package.json index 51c10402..e85ea708 100644 --- a/_official-tutorial/package.json +++ b/_official-tutorial/package.json @@ -23,6 +23,7 @@ "@remix-run/eslint-config": "~1.14.2", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", + "@types/sort-by": "^1.2.0", "eslint": "^8.27.0", "typescript": "^4.8.4" }, diff --git a/basic/app/routes/demos/params/$id.tsx b/basic/app/routes/demos/params/$id.tsx index adf3260b..59a16637 100644 --- a/basic/app/routes/demos/params/$id.tsx +++ b/basic/app/routes/demos/params/$id.tsx @@ -29,7 +29,7 @@ export const loader = async ({ params }: LoaderArgs) => { // Sometimes your code just blows up and you never anticipated it. Remix will // automatically catch it and send the UI to the error boundary. if (params.id === "kaboom") { - // @ts-expect-error + // @ts-expect-error - this is a deliberate error to test the error boundary lol(); }