Skip to content

Commit e5df93f

Browse files
committed
ci: update pm
Signed-off-by: Logan McAnsh <[email protected]>
1 parent d3726d4 commit e5df93f

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

__scripts/test.mjs

+12-6
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,17 @@ for (const example of examples) {
8383
}
8484

8585
console.log(`📥\u00A0Installing ${example} with "${pm}"`);
86-
const installResult = await execa(
87-
pm,
88-
["install", "--silent", "--legacy-peer-deps"],
89-
options
90-
);
86+
/** @type {import('execa').ExecaChildProcess<string>} */
87+
let installResult;
88+
if (pm === "npm") {
89+
installResult = await execa(
90+
pm,
91+
["--silent", "--legacy-peer-deps"],
92+
options
93+
);
94+
} else {
95+
installResult = await execa(pm, ["--silent"], options);
96+
}
9197

9298
if (installResult.exitCode) {
9399
console.error(installResult.stderr);
@@ -120,7 +126,7 @@ for (const example of examples) {
120126
throw new Error(`🚨\u00A0Error building ${example}`);
121127
}
122128

123-
console.log(`🕵️\u00A0\u00A0Typechecking ${example}`);
129+
console.log(`🕵️\u00A0Typechecking ${example}`);
124130
const typecheckResult = await execa(pm, ["run", "typecheck"], options);
125131

126132
if (typecheckResult.exitCode) {

_official-tutorial/app/data.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
////////////////////////////////////////////////////////////////////////////////
44

55
import { matchSorter } from "match-sorter";
6-
// @ts-ignore - no types, but it's a tiny function
76
import sortBy from "sort-by";
87
import invariant from "tiny-invariant";
98

_official-tutorial/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@remix-run/eslint-config": "~1.14.2",
2424
"@types/react": "^18.0.25",
2525
"@types/react-dom": "^18.0.8",
26+
"@types/sort-by": "^1.2.0",
2627
"eslint": "^8.27.0",
2728
"typescript": "^4.8.4"
2829
},

basic/app/routes/demos/params/$id.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const loader = async ({ params }: LoaderArgs) => {
2929
// Sometimes your code just blows up and you never anticipated it. Remix will
3030
// automatically catch it and send the UI to the error boundary.
3131
if (params.id === "kaboom") {
32-
// @ts-expect-error
32+
// @ts-expect-error - this is a deliberate error to test the error boundary
3333
lol();
3434
}
3535

0 commit comments

Comments
 (0)