Skip to content

Commit 92e163f

Browse files
committed
we're close!
Signed-off-by: Logan McAnsh <[email protected]>
1 parent 106c830 commit 92e163f

File tree

14 files changed

+176
-130
lines changed

14 files changed

+176
-130
lines changed

__scripts/test.mjs

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
#!/usr/bin/env node
22

3-
import path from "node:path";
43
import os from "node:os";
4+
import path from "node:path";
55

6-
import { execa } from "execa";
76
import { detect, getCommand } from "@antfu/ni";
7+
import PackageJson from "@npmcli/package-json";
8+
import { execa } from "execa";
89
import fse from "fs-extra";
910
import PQueue from "p-queue";
10-
import PackageJson from "@npmcli/package-json";
1111

12-
console.log({ concurrency: os.cpus().length });
12+
const concurrency = os.cpus().length;
13+
14+
console.log({ concurrency });
1315

14-
const queue = new PQueue({ concurrency: os.cpus().length, autoStart: false });
16+
const queue = new PQueue({ concurrency, autoStart: false });
1517

1618
const TO_IGNORE = [".git", ".github", "__scripts", "yarn.lock", "package.json"];
1719

@@ -51,16 +53,6 @@ for (const example of examples) {
5153
queue.add(async () => {
5254
const pkgJson = await PackageJson.load(example);
5355

54-
// TODO: figure out why this is blowing up
55-
pkgJson.update({
56-
dependencies: {
57-
...pkgJson.content.dependencies,
58-
"@vanilla-extract/css": "1.9.2",
59-
},
60-
});
61-
62-
await pkgJson.save();
63-
6456
/** @type {import('execa').Options} */
6557
const options = { cwd: example, reject: false };
6658

@@ -72,21 +64,21 @@ for (const example of examples) {
7264
if (hasSetup) {
7365
const setup = await getCommand(detected, "run", ["__setup"]);
7466
const setupArgs = setup.split(" ").slice(1);
75-
console.log("🔧 Running setup script for", example);
67+
console.log("🔧\u00A0Running setup script for", example);
7668
const setupResult = await execa(detected, setupArgs, options);
7769
if (setupResult.exitCode) {
7870
console.error(setupResult.stderr);
7971
throw new Error(`Error running setup script for ${example}`);
8072
}
8173
}
8274

83-
const install = await getCommand(detected, "install", [
75+
const installCommand = await getCommand(detected, "install", [
8476
"--silent",
8577
"--legacy-peer-deps",
8678
]);
8779
// this is silly, but is needed in order for execa to work
88-
const installArgs = install.split(" ").slice(1, -1);
89-
console.log(`📥 Installing ${example} with "${install}"`);
80+
const installArgs = installCommand.split(" ").slice(1, -1);
81+
console.log(`📥\u00A0Installing ${example} with "${installCommand}"`);
9082
const installResult = await execa(detected, installArgs, options);
9183

9284
if (installResult.exitCode) {
@@ -100,31 +92,33 @@ for (const example of examples) {
10092

10193
if (hasPrisma) {
10294
console.log("Generating prisma types for", example);
103-
const prismaGenerate = await execa(
95+
const prismaGenerateCommand = await execa(
10496
"npx",
10597
["prisma", "generate"],
10698
options
10799
);
108100

109-
if (prismaGenerate.exitCode) {
110-
console.error(prismaGenerate.stderr);
101+
if (prismaGenerateCommand.exitCode) {
102+
console.error(prismaGenerateCommand.stderr);
111103
throw new Error(`Error generating prisma types for ${example}`);
112104
}
113105
}
114106

115-
const build = await getCommand(detected, "run", ["build"]);
116-
const buildArgs = build.split(" ").slice(1);
117-
console.log(`📦 Building ${example} with "${build}"`);
107+
const buildCommand = await getCommand(detected, "run", ["build"]);
108+
const buildArgs = buildCommand.split(" ").slice(1);
109+
console.log(`📦\u00A0Building ${example} with "${buildCommand}"`);
118110
const buildResult = await execa(detected, buildArgs, options);
119111

120112
if (buildResult.exitCode) {
121113
console.error(buildResult.stderr);
122114
throw new Error(`Error building ${example}`);
123115
}
124116

125-
const typecheck = await getCommand(detected, "run", ["typecheck"]);
126-
const typecheckArgs = typecheck.split(" ").slice(1);
127-
console.log(`🕵️ Typechecking ${example} with "${typecheck}"`);
117+
const typecheckCommand = await getCommand(detected, "run", ["typecheck"]);
118+
const typecheckArgs = typecheckCommand.split(" ").slice(1);
119+
console.log(
120+
`🕵️\u00A0\u00A0Typechecking ${example} with "${typecheckCommand}"`
121+
);
128122
const typecheckResult = await execa(detected, typecheckArgs, options);
129123

130124
if (typecheckResult.exitCode) {

_official-tutorial/app/root.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ function OptimisticFavorite({ contact }: { contact: ContactRecord }) {
176176

177177
// Now check if there are any pending fetchers that are changing this contact
178178
for (const fetcher of fetchers) {
179-
// @ts-expect-error https://github.com/remix-run/remix/pull/5476
180179
if (fetcher.formAction === `/contacts/${contact.id}`) {
181180
// Ask for the optimistic version of the data
182-
// @ts-expect-error https://github.com/remix-run/remix/pull/5476
183181
isFavorite = fetcher.formData.get("favorite") === "true";
184182
}
185183
}

_official-tutorial/app/routes/contacts.$contactId.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ export default function Contact() {
9494
function Favorite({ contact }: { contact: ContactRecord }) {
9595
const fetcher = useFetcher<typeof action>();
9696
let favorite = contact.favorite;
97-
// @ts-expect-error
9897
if (fetcher.formData) {
99-
// @ts-expect-error
10098
favorite = fetcher.formData.get("favorite") === "true";
10199
}
102100
return (

_official-tutorial/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"strict": true,
1212
"allowJs": true,
1313
"forceConsistentCasingInFileNames": true,
14+
"skipLibCheck": true,
1415
"baseUrl": ".",
1516
"paths": {
1617
"~/*": ["./app/*"]

emotion/app/entry.server.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function handleRequest(
1919
const html = renderToString(
2020
<ServerStyleContext.Provider value={null}>
2121
<CacheProvider value={cache}>
22+
{/* @ts-expect-error */}
2223
<RemixServer context={remixContext} url={request.url} />
2324
</CacheProvider>
2425
</ServerStyleContext.Provider>
@@ -29,6 +30,7 @@ export default function handleRequest(
2930
const markup = renderToString(
3031
<ServerStyleContext.Provider value={chunks.styles}>
3132
<CacheProvider value={cache}>
33+
{/* @ts-expect-error */}
3234
<RemixServer context={remixContext} url={request.url} />
3335
</CacheProvider>
3436
</ServerStyleContext.Provider>

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
},
1010
"devDependencies": {
1111
"@remix-run/eslint-config": "^1.15.0",
12-
"@types/react": "^18.0.35",
12+
"@types/react": "^18.0.37",
1313
"eslint": "^8.38.0",
1414
"eslint-config-prettier": "^8.8.0",
15-
"eslint-plugin-markdown": "^3.0.0",
1615
"eslint-plugin-cypress": "^2.13.2",
16+
"eslint-plugin-markdown": "^3.0.0",
1717
"eslint-plugin-prefer-let": "^3.0.1",
1818
"jest": "^29.5.0",
1919
"prettier": "^2.8.7",
@@ -24,10 +24,10 @@
2424
"node": ">=14"
2525
},
2626
"dependencies": {
27-
"@antfu/ni": "^0.18.8",
27+
"@antfu/ni": "^0.21.3",
2828
"@npmcli/package-json": "^3.0.0",
29-
"execa": "^6.1.0",
30-
"fs-extra": "11.1.0",
31-
"p-queue": "^7.3.0"
29+
"execa": "^7.1.1",
30+
"fs-extra": "11.1.1",
31+
"p-queue": "^7.3.4"
3232
}
3333
}

picocss/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"strict": true,
1212
"allowJs": true,
1313
"forceConsistentCasingInFileNames": true,
14+
"skipLibCheck": true,
1415
"baseUrl": ".",
1516
"paths": {
1617
"~/*": ["./app/*"]

strapi/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@remix-run/node": "~1.14.2",
1414
"@remix-run/react": "~1.14.2",
1515
"@remix-run/serve": "~1.14.2",
16+
"isbot": "^3.6.8",
1617
"marked": "^4.0.12",
1718
"react": "^18.2.0",
1819
"react-dom": "^18.2.0"

theme-ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"@remix-run/serve": "~1.14.2",
1717
"@theme-ui/core": "^0.14.6",
1818
"react": "^17.0.2",
19-
"react-dom": "^17.0.2"
19+
"react-dom": "^17.0.2",
20+
"theme-ui": "0.15.7"
2021
},
2122
"devDependencies": {
2223
"@remix-run/dev": "~1.14.2",

theme-ui/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"strict": true,
1212
"allowJs": true,
1313
"forceConsistentCasingInFileNames": true,
14+
"skipLibCheck": true,
1415
"jsxImportSource": "theme-ui",
1516
"baseUrl": ".",
1617
"paths": {
1718
"~/*": ["./app/*"]
1819
},
19-
"skipLibCheck": true,
2020

2121
// Remix takes care of building everything in `remix build`.
2222
"noEmit": true

0 commit comments

Comments
 (0)