From 26a2bc4dab6927da465b763fcd137ede0cb8b5ed Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Fri, 16 Dec 2022 11:55:36 -0500 Subject: [PATCH 01/29] ci: wip add script to install, build, and typecheck examples Signed-off-by: Logan McAnsh --- .github/workflows/changed.yml | 31 +++++ dataloader/app/data.server.ts | 2 +- dataloader/app/loaders/userLoader.ts | 11 +- dataloader/app/routes/users.tsx | 7 +- dataloader/app/routes/users/index.tsx | 4 +- dataloader/package.json | 5 +- dataloader/server/index.ts | 12 +- dataloader/tsconfig.json | 2 + .../app/routes/cloudinary-upload.tsx | 11 +- .../app/routes/local-upload.tsx | 8 +- .../app/utils/utils.server.ts | 32 ++--- package.json | 6 + pm-app/app/routes/register.tsx | 24 ++-- pm-app/app/ui/form.tsx | 2 +- pm-app/package.json | 4 +- scripts/test.mjs | 101 ++++++++++++++++ yarn.lock | 113 +++++++++++++++++- 17 files changed, 322 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/changed.yml create mode 100755 scripts/test.mjs diff --git a/.github/workflows/changed.yml b/.github/workflows/changed.yml new file mode 100644 index 00000000..af2c4d5c --- /dev/null +++ b/.github/workflows/changed.yml @@ -0,0 +1,31 @@ +name: Typecheck changed examples + +on: + push: + branches: + - main + pull_request: + +jobs: + typecheck: + if: github.repository == 'remix-run/examples' + runs-on: ubuntu-latest + + steps: + - name: 🛑 Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + cache: "yarn" + + - name: 📥 Install deps + run: yarn --frozen-lockfile + + - name: install, build, typecheck + run: node ./scripts/test.mjs diff --git a/dataloader/app/data.server.ts b/dataloader/app/data.server.ts index 7b0efdbe..6efc7929 100644 --- a/dataloader/app/data.server.ts +++ b/dataloader/app/data.server.ts @@ -1,4 +1,4 @@ -interface User { +export interface User { id: string; email: string; name: string; diff --git a/dataloader/app/loaders/userLoader.ts b/dataloader/app/loaders/userLoader.ts index 5cc506f4..4342f7a4 100644 --- a/dataloader/app/loaders/userLoader.ts +++ b/dataloader/app/loaders/userLoader.ts @@ -1,10 +1,11 @@ +import { DataFunctionArgs } from "@remix-run/node"; import DataLoader from "dataloader"; import { db } from "~/data.server"; export const createUsersByIdLoader = () => new DataLoader(async (ids: Readonly) => { - const users = await db.user.findMany({ + const users = db.user.findMany({ where: { id: { in: ids, @@ -14,3 +15,11 @@ export const createUsersByIdLoader = () => const userMap = new Map(users.map((user) => [user.id, user])); return ids.map((id) => userMap.get(id) ?? null); }); + +export interface DataLoaderArgs extends DataFunctionArgs { + context: { + loaders: { + usersById: ReturnType; + }; + }; +} diff --git a/dataloader/app/routes/users.tsx b/dataloader/app/routes/users.tsx index 62e644ab..bef3b7ef 100644 --- a/dataloader/app/routes/users.tsx +++ b/dataloader/app/routes/users.tsx @@ -1,13 +1,14 @@ -import type { LoaderArgs } from "@remix-run/node"; import { json } from "@remix-run/node"; import { Outlet, useLoaderData } from "@remix-run/react"; +import { User } from "~/data.server"; +import { DataLoaderArgs } from "~/loaders/userLoader"; -export const loader = async ({ context }: LoaderArgs) => { +export const loader = async ({ context }: DataLoaderArgs) => { const users = await context.loaders.usersById.loadMany([ "ef3fcb93-0623-4d10-adbf-4dd865d6688c", "2cbad877-2da6-422d-baa6-c6a96a9e085f", ]); - return json({ users }); + return json({ users: users.filter((u): u is User => !!u) }); }; export default function UserNames() { diff --git a/dataloader/app/routes/users/index.tsx b/dataloader/app/routes/users/index.tsx index bdd504e1..e44b7da5 100644 --- a/dataloader/app/routes/users/index.tsx +++ b/dataloader/app/routes/users/index.tsx @@ -1,8 +1,8 @@ -import type { LoaderArgs } from "@remix-run/node"; import { json } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; +import { DataLoaderArgs } from "~/loaders/userLoader"; -export const loader = async ({ context }: LoaderArgs) => { +export const loader = async ({ context }: DataLoaderArgs) => { /* * For demo purposes: * Batching & caching also works with multiple calls to `DataLoader#load` diff --git a/dataloader/package.json b/dataloader/package.json index 6eb14f26..90d18834 100644 --- a/dataloader/package.json +++ b/dataloader/package.json @@ -16,14 +16,17 @@ "cross-env": "^7.0.3", "dataloader": "^2.0.0", "express": "^4.17.3", - "morgan": "^1.10.0", "isbot": "^3.6.5", + "morgan": "^1.10.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@remix-run/dev": "~1.14.2", "@remix-run/eslint-config": "~1.14.2", + "@types/compression": "1.7.2", + "@types/express": "4.17.15", + "@types/morgan": "1.9.3", "@types/react": "^18.0.25", "@types/react-dom": "^18.0.8", "esbuild-register": "^3.3.2", diff --git a/dataloader/server/index.ts b/dataloader/server/index.ts index 8d7ad5d9..479f8575 100644 --- a/dataloader/server/index.ts +++ b/dataloader/server/index.ts @@ -1,11 +1,11 @@ -const path = require("path"); +import path from "path"; -const { createRequestHandler } = require("@remix-run/express"); -const compression = require("compression"); -const express = require("express"); -const morgan = require("morgan"); +import express from "express"; +import compression from "compression"; +import morgan from "morgan"; +import { createRequestHandler } from "@remix-run/express"; -const { createUsersByIdLoader } = require("../app/loaders/userLoader"); +import { createUsersByIdLoader } from "../app/loaders/userLoader"; const MODE = process.env.NODE_ENV; const BUILD_DIR = path.join(process.cwd(), "server/build"); diff --git a/dataloader/tsconfig.json b/dataloader/tsconfig.json index 0700df63..d3f495c2 100644 --- a/dataloader/tsconfig.json +++ b/dataloader/tsconfig.json @@ -1,6 +1,8 @@ { "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx", "server/index.ts"], "compilerOptions": { + "allowJs": true, + "forceConsistentCasingInFileNames": true, "lib": ["DOM", "DOM.Iterable", "ES2019"], "isolatedModules": true, "esModuleInterop": true, diff --git a/file-and-cloudinary-upload/app/routes/cloudinary-upload.tsx b/file-and-cloudinary-upload/app/routes/cloudinary-upload.tsx index 8fef5a8c..31bf8bc0 100644 --- a/file-and-cloudinary-upload/app/routes/cloudinary-upload.tsx +++ b/file-and-cloudinary-upload/app/routes/cloudinary-upload.tsx @@ -33,7 +33,7 @@ export const action = async ({ request }: ActionArgs) => { }; export default function Index() { - const data = useActionData(); + const actionData = useActionData(); return ( <> @@ -44,12 +44,15 @@ export default function Index() { - {data?.error ?

{data.error}

: null} + {actionData && "error" in actionData ?

{actionData.error}

: null} - {data?.imgSrc ? ( + {actionData && "imgSrc" in actionData ? ( <>

uploaded image

- {data.imgDesc + {actionData.imgDesc ) : null} diff --git a/file-and-cloudinary-upload/app/routes/local-upload.tsx b/file-and-cloudinary-upload/app/routes/local-upload.tsx index 46788914..4afa0e1d 100644 --- a/file-and-cloudinary-upload/app/routes/local-upload.tsx +++ b/file-and-cloudinary-upload/app/routes/local-upload.tsx @@ -26,7 +26,7 @@ export const action = async ({ request }: ActionArgs) => { }; export default function Index() { - const data = useActionData(); + const actionData = useActionData(); return ( <> @@ -34,12 +34,12 @@ export default function Index() { - {data?.error ?

{data.error}

: null} + {actionData && "error" in actionData ?

{actionData.error}

: null} - {data?.imgSrc ? ( + {actionData && "imgSrc" in actionData ? ( <>

uploaded image

- uploaded + uploaded ) : null} diff --git a/file-and-cloudinary-upload/app/utils/utils.server.ts b/file-and-cloudinary-upload/app/utils/utils.server.ts index 0fc45551..4cc1714e 100644 --- a/file-and-cloudinary-upload/app/utils/utils.server.ts +++ b/file-and-cloudinary-upload/app/utils/utils.server.ts @@ -1,5 +1,5 @@ +import cloudinary, { UploadApiResponse } from "cloudinary"; import { writeAsyncIterableToWritable } from "@remix-run/node"; -import cloudinary from "cloudinary"; cloudinary.v2.config({ cloud_name: process.env.CLOUD_NAME, @@ -8,21 +8,23 @@ cloudinary.v2.config({ }); async function uploadImage(data: AsyncIterable) { - const uploadPromise = new Promise(async (resolve, reject) => { - const uploadStream = cloudinary.v2.uploader.upload_stream( - { - folder: "remix", - }, - (error, result) => { - if (error) { - reject(error); - return; + const uploadPromise = new Promise( + async (resolve, reject) => { + const uploadStream = cloudinary.v2.uploader.upload_stream( + { + folder: "remix", + }, + (error, result) => { + if (error || !result) { + reject(error); + return; + } + resolve(result); } - resolve(result); - } - ); - await writeAsyncIterableToWritable(data, uploadStream); - }); + ); + await writeAsyncIterableToWritable(data, uploadStream); + } + ); return uploadPromise; } diff --git a/package.json b/package.json index 8cb55881..558f19c3 100644 --- a/package.json +++ b/package.json @@ -22,5 +22,11 @@ }, "engines": { "node": ">=14" + }, + "dependencies": { + "@antfu/ni": "^0.18.8", + "@npmcli/package-json": "^3.0.0", + "execa": "^6.1.0", + "fs-extra": "11.1.0" } } diff --git a/pm-app/app/routes/register.tsx b/pm-app/app/routes/register.tsx index a7bc6d34..f16a22d2 100644 --- a/pm-app/app/routes/register.tsx +++ b/pm-app/app/routes/register.tsx @@ -125,8 +125,15 @@ export const action = async ({ request }: ActionArgs) => { }; export default function Register() { - const actionData = useActionData() || {}; - const { fieldErrors, fields, formError } = actionData; + const actionData = useActionData(); + let fieldErrors = + actionData && "fieldErrors" in actionData + ? actionData.fieldErrors + : undefined; + let formError = + actionData && "formError" in actionData ? actionData.formError : undefined; + let fields = + actionData && "fields" in actionData ? actionData.fields : undefined; const [searchParams] = useSearchParams(); React.useEffect(() => { @@ -169,7 +176,7 @@ export default function Register() { id="form-error-text" role="alert" > - {actionData.formError} + {formError} ) : null} @@ -194,7 +201,7 @@ export default function Register() { error={fieldErrors?.nameFirst} > - + - + @@ -227,7 +234,10 @@ export default function Register() { error={fieldErrors?.password} > - + diff --git a/pm-app/app/ui/form.tsx b/pm-app/app/ui/form.tsx index 0b07f859..5a70a36b 100644 --- a/pm-app/app/ui/form.tsx +++ b/pm-app/app/ui/form.tsx @@ -9,7 +9,7 @@ export function useFieldContext() { return React.useContext(FieldContext); } -const FieldProvider = React.forwardRef< +export const FieldProvider = React.forwardRef< HTMLDivElement, React.PropsWithChildren >(({ children, className, ...ctx }, ref) => { diff --git a/pm-app/package.json b/pm-app/package.json index dc3b2016..040264dd 100644 --- a/pm-app/package.json +++ b/pm-app/package.json @@ -2,19 +2,19 @@ "private": true, "sideEffects": false, "scripts": { - "build": "run-s \"build:*\"", "build:css": "npm run generate:css -- --env production", "build:remix": "remix build", + "build": "run-s \"build:*\"", "db:check": "docker ps", "db:reset": "prisma migrate reset --force", "db:start": "docker compose up -d", "db:stop": "docker compose down", "db:update": "prisma migrate dev", "deploy": "flyctl deploy", - "dev": "npm run db:start && pm2-dev pm2.config.js", "dev:css": "npm run generate:css -- --watch", "dev:remix": "remix dev", "dev:server": "node server/index.js", + "dev": "npm run db:start && pm2-dev pm2.config.js", "generate:css": "postcss app/styles --base app/styles --dir app/dist/styles", "start": "node server/index.js", "typecheck": "tsc" diff --git a/scripts/test.mjs b/scripts/test.mjs new file mode 100755 index 00000000..f83ed3b5 --- /dev/null +++ b/scripts/test.mjs @@ -0,0 +1,101 @@ +#!/usr/bin/env node + +import path from "node:path"; + +import { execa } from "execa"; +import { detect, getCommand } from "@antfu/ni"; +import PackageJson from "@npmcli/package-json"; +import fse from "fs-extra"; + +const TO_IGNORE = [".github", "scripts", "yarn.lock", "package.json"]; + +const { stderr, stdout, exitCode } = await execa( + "git", + ["--no-pager", "diff", "--name-only", "HEAD~1"], + { cwd: process.cwd() } +); + +if (exitCode !== 0) { + console.error(stderr); + process.exit(exitCode); +} + +const files = stdout.split("\n"); + +const dirs = files.map((f) => f.split("/").at(0)); + +const examples = [...new Set(dirs)].filter((d) => !TO_IGNORE.includes(d)); + +const settled = await Promise.allSettled( + examples.map(async (example) => { + const pkgJson = await PackageJson.load(example); + + /** @type {import('execa').Options} */ + const options = { cwd: example }; + + const detected = await detect({ cwd: example }); + + const install = await getCommand(detected, "install", ["--silent"]); + const installArgs = install.split(" ").slice(1, -1); + const installResult = await execa(detected, installArgs, options); + + if (installResult.exitCode) { + console.error(`Error installing ${example}`); + console.error(installResult.stderr); + return; + } + + const hasPrisma = fse.existsSync( + path.join(example, "prisma", "schema.prisma") + ); + + if (hasPrisma) { + const prismaGenerate = await execa( + "npx", + ["prisma", "generate"], + options + ); + + if (prismaGenerate.exitCode) { + console.error(`Error generating prisma types for ${example}`); + console.error(prismaGenerate.stderr); + return; + } + } + + const build = await getCommand(detected, "run", ["build"]); + const buildArgs = build.split(" ").slice(1); + const buildResult = await execa(detected, buildArgs, options); + + if (buildResult.exitCode) { + console.error(`Error building ${example}`); + console.error(buildResult.stderr); + return; + } + + if (!("typecheck" in pkgJson.content.scripts)) { + pkgJson.update({ + scripts: { + ...pkgJson.content.scripts, + typecheck: "tsc --skipLibCheck", + }, + }); + + await pkgJson.save(); + } + + const typecheck = await getCommand(detected, "run", ["typecheck"]); + const typecheckArgs = typecheck.split(" ").slice(1); + const typecheckResult = await execa(detected, typecheckArgs, options); + + if (typecheckResult.exitCode) { + console.error(`Error typechecking ${example}`); + console.error(typecheckResult.stderr); + return; + } + }) +); + +const rejected = settled.filter((s) => s.status === "rejected"); +rejected.forEach((s) => console.error(s.reason)); +process.exit(rejected.length > 0 ? 1 : 0); diff --git a/yarn.lock b/yarn.lock index 6c220173..d52eb825 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,7 +10,19 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.21.4": +"@antfu/ni@^0.18.8": + version "0.18.8" + resolved "https://registry.npmjs.org/@antfu/ni/-/ni-0.18.8.tgz#a0963b8ac07374e6d9ba2b5d81c4d1fc98017c22" + integrity sha512-0m++AudwQq+wWAz/Ax7g+sh/wFW51HHQ6BtPLsuTAsFIzWB/bv/0COwZE7BRS+u0nqMb6Ks6nlk6cY1TpPDwHg== + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/code-frame@^7.21.4": version "7.21.4" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== @@ -744,6 +756,13 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@npmcli/package-json@^3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@npmcli/package-json/-/package-json-3.0.0.tgz#c9219a197e1be8dbf43c4ef8767a72277c0533b6" + integrity sha512-NnuPuM97xfiCpbTEJYtEuKz6CFbpUHtaT0+5via5pQeI25omvQDFbp1GcGJ/c4zvL/WX0qbde6YiLgfZbWFgvg== + dependencies: + json-parse-even-better-errors "^3.0.0" + "@pkgr/utils@^2.3.1": version "2.3.1" resolved "https://registry.npmjs.org/@pkgr/utils/-/utils-2.3.1.tgz#0a9b06ffddee364d6642b3cd562ca76f55b34a03" @@ -2040,6 +2059,21 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^6.1.0: + version "6.1.0" + resolved "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" + integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^3.0.1" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -2146,6 +2180,15 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +fs-extra@11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2200,7 +2243,7 @@ get-package-type@^0.1.0: resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-stream@^6.0.0: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -2303,10 +2346,10 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== grapheme-splitter@^1.0.4: version "1.0.4" @@ -2369,6 +2412,11 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" + integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== + ignore@^5.1.1, ignore@^5.2.0: version "5.2.4" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" @@ -2575,6 +2623,11 @@ is-stream@^2.0.0: resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3075,6 +3128,11 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-parse-even-better-errors@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz#2cb2ee33069a78870a0c7e3da560026b89669cf7" + integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -3097,6 +3155,15 @@ json5@^2.2.2: resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.3" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" @@ -3246,6 +3313,11 @@ mimic-fn@^2.1.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3300,6 +3372,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3382,6 +3461,13 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.4.0: version "8.4.2" resolved "https://registry.npmjs.org/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -3480,6 +3566,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -3856,6 +3947,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -4019,6 +4115,11 @@ unist-util-stringify-position@^2.0.0: dependencies: "@types/unist" "^2.0.2" +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + update-browserslist-db@^1.0.10: version "1.0.10" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" From 6dd6bc5e23ec01079c52f26a1def8432cee1c4ae Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 28 Jan 2023 12:08:33 -0500 Subject: [PATCH 02/29] chore: update tsconfigs Signed-off-by: Logan McAnsh --- .github/workflows/changed.yml | 2 +- {scripts => __scripts}/test.mjs | 4 ++++ __template/tsconfig.json | 1 + _official-jokes/tsconfig.json | 1 + _official-realtime-app/tsconfig.json | 1 + basic/tsconfig.json | 1 + bullmq-task-queue/tsconfig.json | 1 + catch-boundary/tsconfig.json | 1 + chakra-ui/tsconfig.json | 1 + client-only-components/tsconfig.json | 1 + client-side-validation/tsconfig.json | 1 + collected-notes/tsconfig.json | 1 + combobox-resource-route/tsconfig.json | 1 + dark-mode/tsconfig.json | 1 + dataloader/tsconfig.json | 7 ++++--- emotion/tsconfig.json | 1 + file-and-cloudinary-upload/tsconfig.json | 1 + file-and-s3-upload/tsconfig.json | 1 + firebase/tsconfig.json | 1 + form-to-notion-db/tsconfig.json | 1 + framer-motion/tsconfig.json | 1 + framer-route-animation/tsconfig.json | 1 + gdpr-cookie-consent/tsconfig.json | 1 + google-analytics/tsconfig.json | 1 + graphql-api/tsconfig.json | 1 + image-resize/tsconfig.json | 1 + infinite-scrolling/tsconfig.json | 1 + io-ts-formdata-decoding/tsconfig.json | 1 + ioredis/tsconfig.json | 1 + leaflet/tsconfig.json | 1 + mantine/tsconfig.json | 1 + msw/tsconfig.json | 1 + multiple-forms/tsconfig.json | 1 + multiple-params/tsconfig.json | 1 + newsletter-signup/tsconfig.json | 1 + nprogress/tsconfig.json | 1 + on-demand-hydration/tsconfig.json | 1 + outlet-form-rerender/tsconfig.json | 1 + pathless-routes/tsconfig.json | 1 + playwright/tsconfig.json | 1 + pm-app/tsconfig.json | 1 + quirrel/tsconfig.json | 1 + react-quill/tsconfig.json | 1 + react-spring/tsconfig.json | 1 + redis-upstash-session/tsconfig.json | 1 + remix-auth-auth0/tsconfig.json | 1 + remix-auth-form/tsconfig.json | 1 + remix-auth-github/tsconfig.json | 1 + remix-auth-supabase-github/tsconfig.json | 1 + remix-auth-supabase/tsconfig.json | 1 + route-modal/tsconfig.json | 1 + routes-gen/tsconfig.json | 1 + rust/tsconfig.json | 1 + sanity/tsconfig.json | 1 + sass/tsconfig.json | 1 + search-input/tsconfig.json | 1 + session-flash/tsconfig.json | 9 ++++++--- sharing-loader-data/tsconfig.json | 1 + socket.io/tsconfig.json | 1 + sse-chat/tsconfig.json | 1 + sse-counter/tsconfig.json | 1 + stitches/tsconfig.json | 1 + strapi/tsconfig.json | 1 + stripe-integration/tsconfig.json | 1 + styled-components/tsconfig.json | 1 + styletron/tsconfig.json | 1 + supabase-subscription/tsconfig.json | 1 + tailwindcss/tsconfig.json | 1 + theme-ui/tsconfig.json | 2 +- tiptap-collab-editing/tsconfig.json | 1 + toast-message/tsconfig.json | 1 + turborepo-vercel/apps/remix-app/tsconfig.json | 1 + twind/tsconfig.json | 9 ++++++--- unocss/tsconfig.json | 1 + usematches-loader-data/tsconfig.json | 1 + vanilla-extract/tsconfig.json | 1 + xata/tsconfig.json | 1 + yarn-pnp/tsconfig.json | 1 + 78 files changed, 94 insertions(+), 11 deletions(-) rename {scripts => __scripts}/test.mjs (94%) diff --git a/.github/workflows/changed.yml b/.github/workflows/changed.yml index af2c4d5c..d8eb3725 100644 --- a/.github/workflows/changed.yml +++ b/.github/workflows/changed.yml @@ -28,4 +28,4 @@ jobs: run: yarn --frozen-lockfile - name: install, build, typecheck - run: node ./scripts/test.mjs + run: node ./__scripts/test.mjs diff --git a/scripts/test.mjs b/__scripts/test.mjs similarity index 94% rename from scripts/test.mjs rename to __scripts/test.mjs index f83ed3b5..e434e1bd 100755 --- a/scripts/test.mjs +++ b/__scripts/test.mjs @@ -26,6 +26,10 @@ const dirs = files.map((f) => f.split("/").at(0)); const examples = [...new Set(dirs)].filter((d) => !TO_IGNORE.includes(d)); +const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }); + +console.log(`Testing changed examples: ${list.format(examples)}`); + const settled = await Promise.allSettled( examples.map(async (example) => { const pkgJson = await PackageJson.load(example); diff --git a/__template/tsconfig.json b/__template/tsconfig.json index 20f8a386..29d8538a 100644 --- a/__template/tsconfig.json +++ b/__template/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/_official-jokes/tsconfig.json b/_official-jokes/tsconfig.json index 20f8a386..29d8538a 100644 --- a/_official-jokes/tsconfig.json +++ b/_official-jokes/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/_official-realtime-app/tsconfig.json b/_official-realtime-app/tsconfig.json index 20f8a386..29d8538a 100644 --- a/_official-realtime-app/tsconfig.json +++ b/_official-realtime-app/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/basic/tsconfig.json b/basic/tsconfig.json index 20f8a386..29d8538a 100644 --- a/basic/tsconfig.json +++ b/basic/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/bullmq-task-queue/tsconfig.json b/bullmq-task-queue/tsconfig.json index 20f8a386..29d8538a 100644 --- a/bullmq-task-queue/tsconfig.json +++ b/bullmq-task-queue/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/catch-boundary/tsconfig.json b/catch-boundary/tsconfig.json index 20f8a386..29d8538a 100644 --- a/catch-boundary/tsconfig.json +++ b/catch-boundary/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/chakra-ui/tsconfig.json b/chakra-ui/tsconfig.json index 20f8a386..29d8538a 100644 --- a/chakra-ui/tsconfig.json +++ b/chakra-ui/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/client-only-components/tsconfig.json b/client-only-components/tsconfig.json index 20f8a386..29d8538a 100644 --- a/client-only-components/tsconfig.json +++ b/client-only-components/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/client-side-validation/tsconfig.json b/client-side-validation/tsconfig.json index 20f8a386..29d8538a 100644 --- a/client-side-validation/tsconfig.json +++ b/client-side-validation/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/collected-notes/tsconfig.json b/collected-notes/tsconfig.json index 20f8a386..29d8538a 100644 --- a/collected-notes/tsconfig.json +++ b/collected-notes/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/combobox-resource-route/tsconfig.json b/combobox-resource-route/tsconfig.json index 20f8a386..29d8538a 100644 --- a/combobox-resource-route/tsconfig.json +++ b/combobox-resource-route/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/dark-mode/tsconfig.json b/dark-mode/tsconfig.json index 20f8a386..29d8538a 100644 --- a/dark-mode/tsconfig.json +++ b/dark-mode/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/dataloader/tsconfig.json b/dataloader/tsconfig.json index d3f495c2..29d8538a 100644 --- a/dataloader/tsconfig.json +++ b/dataloader/tsconfig.json @@ -1,8 +1,6 @@ { - "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx", "server/index.ts"], + "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], "compilerOptions": { - "allowJs": true, - "forceConsistentCasingInFileNames": true, "lib": ["DOM", "DOM.Iterable", "ES2019"], "isolatedModules": true, "esModuleInterop": true, @@ -11,10 +9,13 @@ "resolveJsonModule": true, "target": "ES2019", "strict": true, + "allowJs": true, + "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/emotion/tsconfig.json b/emotion/tsconfig.json index 20f8a386..29d8538a 100644 --- a/emotion/tsconfig.json +++ b/emotion/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/file-and-cloudinary-upload/tsconfig.json b/file-and-cloudinary-upload/tsconfig.json index 20f8a386..29d8538a 100644 --- a/file-and-cloudinary-upload/tsconfig.json +++ b/file-and-cloudinary-upload/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/file-and-s3-upload/tsconfig.json b/file-and-s3-upload/tsconfig.json index 20f8a386..29d8538a 100644 --- a/file-and-s3-upload/tsconfig.json +++ b/file-and-s3-upload/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/firebase/tsconfig.json b/firebase/tsconfig.json index 20f8a386..29d8538a 100644 --- a/firebase/tsconfig.json +++ b/firebase/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/form-to-notion-db/tsconfig.json b/form-to-notion-db/tsconfig.json index 20f8a386..29d8538a 100644 --- a/form-to-notion-db/tsconfig.json +++ b/form-to-notion-db/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/framer-motion/tsconfig.json b/framer-motion/tsconfig.json index 20f8a386..29d8538a 100644 --- a/framer-motion/tsconfig.json +++ b/framer-motion/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/framer-route-animation/tsconfig.json b/framer-route-animation/tsconfig.json index 20f8a386..29d8538a 100644 --- a/framer-route-animation/tsconfig.json +++ b/framer-route-animation/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/gdpr-cookie-consent/tsconfig.json b/gdpr-cookie-consent/tsconfig.json index 20f8a386..29d8538a 100644 --- a/gdpr-cookie-consent/tsconfig.json +++ b/gdpr-cookie-consent/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/google-analytics/tsconfig.json b/google-analytics/tsconfig.json index 20f8a386..29d8538a 100644 --- a/google-analytics/tsconfig.json +++ b/google-analytics/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/graphql-api/tsconfig.json b/graphql-api/tsconfig.json index 20f8a386..29d8538a 100644 --- a/graphql-api/tsconfig.json +++ b/graphql-api/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/image-resize/tsconfig.json b/image-resize/tsconfig.json index 20f8a386..29d8538a 100644 --- a/image-resize/tsconfig.json +++ b/image-resize/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/infinite-scrolling/tsconfig.json b/infinite-scrolling/tsconfig.json index 20f8a386..29d8538a 100644 --- a/infinite-scrolling/tsconfig.json +++ b/infinite-scrolling/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/io-ts-formdata-decoding/tsconfig.json b/io-ts-formdata-decoding/tsconfig.json index 20f8a386..29d8538a 100644 --- a/io-ts-formdata-decoding/tsconfig.json +++ b/io-ts-formdata-decoding/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/ioredis/tsconfig.json b/ioredis/tsconfig.json index 20f8a386..29d8538a 100644 --- a/ioredis/tsconfig.json +++ b/ioredis/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/leaflet/tsconfig.json b/leaflet/tsconfig.json index 20f8a386..29d8538a 100644 --- a/leaflet/tsconfig.json +++ b/leaflet/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/mantine/tsconfig.json b/mantine/tsconfig.json index 20f8a386..29d8538a 100644 --- a/mantine/tsconfig.json +++ b/mantine/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/msw/tsconfig.json b/msw/tsconfig.json index 20f8a386..29d8538a 100644 --- a/msw/tsconfig.json +++ b/msw/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/multiple-forms/tsconfig.json b/multiple-forms/tsconfig.json index 20f8a386..29d8538a 100644 --- a/multiple-forms/tsconfig.json +++ b/multiple-forms/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/multiple-params/tsconfig.json b/multiple-params/tsconfig.json index 20f8a386..29d8538a 100644 --- a/multiple-params/tsconfig.json +++ b/multiple-params/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/newsletter-signup/tsconfig.json b/newsletter-signup/tsconfig.json index 20f8a386..29d8538a 100644 --- a/newsletter-signup/tsconfig.json +++ b/newsletter-signup/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/nprogress/tsconfig.json b/nprogress/tsconfig.json index 20f8a386..29d8538a 100644 --- a/nprogress/tsconfig.json +++ b/nprogress/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/on-demand-hydration/tsconfig.json b/on-demand-hydration/tsconfig.json index 20f8a386..29d8538a 100644 --- a/on-demand-hydration/tsconfig.json +++ b/on-demand-hydration/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/outlet-form-rerender/tsconfig.json b/outlet-form-rerender/tsconfig.json index 20f8a386..29d8538a 100644 --- a/outlet-form-rerender/tsconfig.json +++ b/outlet-form-rerender/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/pathless-routes/tsconfig.json b/pathless-routes/tsconfig.json index 20f8a386..29d8538a 100644 --- a/pathless-routes/tsconfig.json +++ b/pathless-routes/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/playwright/tsconfig.json b/playwright/tsconfig.json index 20f8a386..29d8538a 100644 --- a/playwright/tsconfig.json +++ b/playwright/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/pm-app/tsconfig.json b/pm-app/tsconfig.json index 20f8a386..29d8538a 100644 --- a/pm-app/tsconfig.json +++ b/pm-app/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/quirrel/tsconfig.json b/quirrel/tsconfig.json index 20f8a386..29d8538a 100644 --- a/quirrel/tsconfig.json +++ b/quirrel/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/react-quill/tsconfig.json b/react-quill/tsconfig.json index 20f8a386..29d8538a 100644 --- a/react-quill/tsconfig.json +++ b/react-quill/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/react-spring/tsconfig.json b/react-spring/tsconfig.json index 20f8a386..29d8538a 100644 --- a/react-spring/tsconfig.json +++ b/react-spring/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/redis-upstash-session/tsconfig.json b/redis-upstash-session/tsconfig.json index 20f8a386..29d8538a 100644 --- a/redis-upstash-session/tsconfig.json +++ b/redis-upstash-session/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/remix-auth-auth0/tsconfig.json b/remix-auth-auth0/tsconfig.json index 20f8a386..29d8538a 100644 --- a/remix-auth-auth0/tsconfig.json +++ b/remix-auth-auth0/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/remix-auth-form/tsconfig.json b/remix-auth-form/tsconfig.json index 20f8a386..29d8538a 100644 --- a/remix-auth-form/tsconfig.json +++ b/remix-auth-form/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/remix-auth-github/tsconfig.json b/remix-auth-github/tsconfig.json index 20f8a386..29d8538a 100644 --- a/remix-auth-github/tsconfig.json +++ b/remix-auth-github/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/remix-auth-supabase-github/tsconfig.json b/remix-auth-supabase-github/tsconfig.json index 20f8a386..29d8538a 100644 --- a/remix-auth-supabase-github/tsconfig.json +++ b/remix-auth-supabase-github/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/remix-auth-supabase/tsconfig.json b/remix-auth-supabase/tsconfig.json index 20f8a386..29d8538a 100644 --- a/remix-auth-supabase/tsconfig.json +++ b/remix-auth-supabase/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/route-modal/tsconfig.json b/route-modal/tsconfig.json index 20f8a386..29d8538a 100644 --- a/route-modal/tsconfig.json +++ b/route-modal/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/routes-gen/tsconfig.json b/routes-gen/tsconfig.json index 20f8a386..29d8538a 100644 --- a/routes-gen/tsconfig.json +++ b/routes-gen/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/rust/tsconfig.json b/rust/tsconfig.json index 20f8a386..29d8538a 100644 --- a/rust/tsconfig.json +++ b/rust/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/sanity/tsconfig.json b/sanity/tsconfig.json index 20f8a386..29d8538a 100644 --- a/sanity/tsconfig.json +++ b/sanity/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/sass/tsconfig.json b/sass/tsconfig.json index 20f8a386..29d8538a 100644 --- a/sass/tsconfig.json +++ b/sass/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/search-input/tsconfig.json b/search-input/tsconfig.json index 20f8a386..29d8538a 100644 --- a/search-input/tsconfig.json +++ b/search-input/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/session-flash/tsconfig.json b/session-flash/tsconfig.json index 914a10eb..29d8538a 100644 --- a/session-flash/tsconfig.json +++ b/session-flash/tsconfig.json @@ -9,12 +9,15 @@ "resolveJsonModule": true, "target": "ES2019", "strict": true, + "allowJs": true, + "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "~/*": ["./app/*"] }, - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "allowJs": true + "skipLibCheck": true, + + // Remix takes care of building everything in `remix build`. + "noEmit": true } } diff --git a/sharing-loader-data/tsconfig.json b/sharing-loader-data/tsconfig.json index 20f8a386..29d8538a 100644 --- a/sharing-loader-data/tsconfig.json +++ b/sharing-loader-data/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/socket.io/tsconfig.json b/socket.io/tsconfig.json index 20f8a386..29d8538a 100644 --- a/socket.io/tsconfig.json +++ b/socket.io/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/sse-chat/tsconfig.json b/sse-chat/tsconfig.json index 20f8a386..29d8538a 100644 --- a/sse-chat/tsconfig.json +++ b/sse-chat/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/sse-counter/tsconfig.json b/sse-counter/tsconfig.json index 20f8a386..29d8538a 100644 --- a/sse-counter/tsconfig.json +++ b/sse-counter/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/stitches/tsconfig.json b/stitches/tsconfig.json index 20f8a386..29d8538a 100644 --- a/stitches/tsconfig.json +++ b/stitches/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/strapi/tsconfig.json b/strapi/tsconfig.json index 20f8a386..29d8538a 100755 --- a/strapi/tsconfig.json +++ b/strapi/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/stripe-integration/tsconfig.json b/stripe-integration/tsconfig.json index 20f8a386..29d8538a 100644 --- a/stripe-integration/tsconfig.json +++ b/stripe-integration/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/styled-components/tsconfig.json b/styled-components/tsconfig.json index 20f8a386..29d8538a 100644 --- a/styled-components/tsconfig.json +++ b/styled-components/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/styletron/tsconfig.json b/styletron/tsconfig.json index 20f8a386..29d8538a 100644 --- a/styletron/tsconfig.json +++ b/styletron/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/supabase-subscription/tsconfig.json b/supabase-subscription/tsconfig.json index 20f8a386..29d8538a 100644 --- a/supabase-subscription/tsconfig.json +++ b/supabase-subscription/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/tailwindcss/tsconfig.json b/tailwindcss/tsconfig.json index 20f8a386..29d8538a 100644 --- a/tailwindcss/tsconfig.json +++ b/tailwindcss/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/theme-ui/tsconfig.json b/theme-ui/tsconfig.json index ab2be78e..29d8538a 100644 --- a/theme-ui/tsconfig.json +++ b/theme-ui/tsconfig.json @@ -5,7 +5,6 @@ "isolatedModules": true, "esModuleInterop": true, "jsx": "react-jsx", - "jsxImportSource": "@theme-ui/core", "moduleResolution": "node", "resolveJsonModule": true, "target": "ES2019", @@ -16,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/tiptap-collab-editing/tsconfig.json b/tiptap-collab-editing/tsconfig.json index 20f8a386..29d8538a 100644 --- a/tiptap-collab-editing/tsconfig.json +++ b/tiptap-collab-editing/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/toast-message/tsconfig.json b/toast-message/tsconfig.json index 20f8a386..29d8538a 100644 --- a/toast-message/tsconfig.json +++ b/toast-message/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/turborepo-vercel/apps/remix-app/tsconfig.json b/turborepo-vercel/apps/remix-app/tsconfig.json index 20f8a386..29d8538a 100644 --- a/turborepo-vercel/apps/remix-app/tsconfig.json +++ b/turborepo-vercel/apps/remix-app/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/twind/tsconfig.json b/twind/tsconfig.json index 914a10eb..29d8538a 100644 --- a/twind/tsconfig.json +++ b/twind/tsconfig.json @@ -9,12 +9,15 @@ "resolveJsonModule": true, "target": "ES2019", "strict": true, + "allowJs": true, + "forceConsistentCasingInFileNames": true, "baseUrl": ".", "paths": { "~/*": ["./app/*"] }, - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "allowJs": true + "skipLibCheck": true, + + // Remix takes care of building everything in `remix build`. + "noEmit": true } } diff --git a/unocss/tsconfig.json b/unocss/tsconfig.json index 20f8a386..29d8538a 100644 --- a/unocss/tsconfig.json +++ b/unocss/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/usematches-loader-data/tsconfig.json b/usematches-loader-data/tsconfig.json index 20f8a386..29d8538a 100644 --- a/usematches-loader-data/tsconfig.json +++ b/usematches-loader-data/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/vanilla-extract/tsconfig.json b/vanilla-extract/tsconfig.json index 20f8a386..29d8538a 100644 --- a/vanilla-extract/tsconfig.json +++ b/vanilla-extract/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/xata/tsconfig.json b/xata/tsconfig.json index 20f8a386..29d8538a 100644 --- a/xata/tsconfig.json +++ b/xata/tsconfig.json @@ -15,6 +15,7 @@ "paths": { "~/*": ["./app/*"] }, + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true diff --git a/yarn-pnp/tsconfig.json b/yarn-pnp/tsconfig.json index 53f97889..5066ddee 100644 --- a/yarn-pnp/tsconfig.json +++ b/yarn-pnp/tsconfig.json @@ -12,6 +12,7 @@ "allowJs": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", + "skipLibCheck": true, // Remix takes care of building everything in `remix build`. "noEmit": true From 5413cab01caba1e8e190d3b3930853f0db584762 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 28 Jan 2023 12:12:13 -0500 Subject: [PATCH 03/29] chore: add some logging Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index e434e1bd..ad6bf3d3 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -41,6 +41,9 @@ const settled = await Promise.allSettled( const install = await getCommand(detected, "install", ["--silent"]); const installArgs = install.split(" ").slice(1, -1); + console.log( + `Installing ${example} with ${detected} ${installArgs.join(" ")}` + ); const installResult = await execa(detected, installArgs, options); if (installResult.exitCode) { @@ -54,6 +57,7 @@ const settled = await Promise.allSettled( ); if (hasPrisma) { + console.log("Generating prisma types for", example); const prismaGenerate = await execa( "npx", ["prisma", "generate"], @@ -69,6 +73,7 @@ const settled = await Promise.allSettled( const build = await getCommand(detected, "run", ["build"]); const buildArgs = build.split(" ").slice(1); + console.log(`Building ${example} with ${detected} ${buildArgs.join(" ")}`); const buildResult = await execa(detected, buildArgs, options); if (buildResult.exitCode) { @@ -90,6 +95,9 @@ const settled = await Promise.allSettled( const typecheck = await getCommand(detected, "run", ["typecheck"]); const typecheckArgs = typecheck.split(" ").slice(1); + console.log( + `Typechecking ${example} with ${detected} ${typecheckArgs.join(" ")}` + ); const typecheckResult = await execa(detected, typecheckArgs, options); if (typecheckResult.exitCode) { From ed6a1133a5cdeff6bbf9fbe3cb111d6e7997490a Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 28 Jan 2023 12:19:31 -0500 Subject: [PATCH 04/29] Update changed.yml --- .github/workflows/changed.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/changed.yml b/.github/workflows/changed.yml index d8eb3725..00858260 100644 --- a/.github/workflows/changed.yml +++ b/.github/workflows/changed.yml @@ -17,6 +17,8 @@ jobs: - name: ⬇️ Checkout repo uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: ⎔ Setup node uses: actions/setup-node@v3 From ae7801ae0fdf27841cb5f67aaec779abe322e751 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 28 Jan 2023 18:01:03 -0500 Subject: [PATCH 05/29] chore: test all the things when not in ci Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index ad6bf3d3..ecb8336c 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -7,24 +7,31 @@ import { detect, getCommand } from "@antfu/ni"; import PackageJson from "@npmcli/package-json"; import fse from "fs-extra"; -const TO_IGNORE = [".github", "scripts", "yarn.lock", "package.json"]; +const TO_IGNORE = [".github", "__scripts", "yarn.lock", "package.json"]; -const { stderr, stdout, exitCode } = await execa( - "git", - ["--no-pager", "diff", "--name-only", "HEAD~1"], - { cwd: process.cwd() } -); +let examples = []; -if (exitCode !== 0) { - console.error(stderr); - process.exit(exitCode); -} +if (process.env.CI) { + const { stderr, stdout, exitCode } = await execa( + "git", + ["--no-pager", "diff", "--name-only", "HEAD~1"], + { cwd: process.cwd() } + ); -const files = stdout.split("\n"); + if (exitCode !== 0) { + console.error(stderr); + process.exit(exitCode); + } -const dirs = files.map((f) => f.split("/").at(0)); + const files = stdout.split("\n"); -const examples = [...new Set(dirs)].filter((d) => !TO_IGNORE.includes(d)); + const dirs = files.map((f) => f.split("/").at(0)); + + examples = [...new Set(dirs)].filter((d) => !TO_IGNORE.includes(d)); +} else { + examples = await fse.readdir(process.cwd()); + examples = examples.filter((d) => !TO_IGNORE.includes(d)); +} const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }); From a25509c11badb881282b5fc1012a709f1214d675 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Sat, 28 Jan 2023 18:19:59 -0500 Subject: [PATCH 06/29] set remix version Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 53 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index ecb8336c..ecf8f259 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -29,8 +29,10 @@ if (process.env.CI) { examples = [...new Set(dirs)].filter((d) => !TO_IGNORE.includes(d)); } else { - examples = await fse.readdir(process.cwd()); - examples = examples.filter((d) => !TO_IGNORE.includes(d)); + const entries = await fse.readdir(process.cwd(), { withFileTypes: true }); + examples = entries + .filter((entry) => entry.isDirectory()) + .filter((d) => !TO_IGNORE.includes(d)); } const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }); @@ -41,6 +43,29 @@ const settled = await Promise.allSettled( examples.map(async (example) => { const pkgJson = await PackageJson.load(example); + const remixDeps = Object.keys(pkgJson.content.dependencies).filter((d) => { + return d.startsWith("@remix-run/"); + }); + + const remixDevDeps = Object.keys(pkgJson.content.devDependencies).filter( + (d) => { + return d.startsWith("@remix-run/"); + } + ); + + pkgJson.update({ + dependencies: { + ...pkgJson.content.dependencies, + ...Object.fromEntries(remixDeps.map((d) => [d, `latest`])), + }, + devDependencies: { + ...pkgJson.content.devDependencies, + ...Object.fromEntries(remixDevDeps.map((d) => [d, `latest`])), + }, + }); + + await pkgJson.save(); + /** @type {import('execa').Options} */ const options = { cwd: example }; @@ -89,17 +114,6 @@ const settled = await Promise.allSettled( return; } - if (!("typecheck" in pkgJson.content.scripts)) { - pkgJson.update({ - scripts: { - ...pkgJson.content.scripts, - typecheck: "tsc --skipLibCheck", - }, - }); - - await pkgJson.save(); - } - const typecheck = await getCommand(detected, "run", ["typecheck"]); const typecheckArgs = typecheck.split(" ").slice(1); console.log( @@ -112,6 +126,19 @@ const settled = await Promise.allSettled( console.error(typecheckResult.stderr); return; } + + pkgJson.update({ + dependencies: { + ...pkgJson.content.dependencies, + ...Object.fromEntries(remixDeps.map((d) => [d, `*`])), + }, + devDependencies: { + ...pkgJson.content.devDependencies, + ...Object.fromEntries(remixDevDeps.map((d) => [d, `*`])), + }, + }); + + await pkgJson.save(); }) ); From d13d36fb35bdaf3b8e65c596ba503df51cc0cc8b Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Mon, 30 Jan 2023 11:19:38 -0500 Subject: [PATCH 07/29] chore: tweak concurrency Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 35 ++++++++++++++++++++++++++--------- package.json | 3 ++- prettier.config.js | 2 +- yarn.lock | 18 ++++++++++++++++++ 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index ecf8f259..bcc43b63 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -1,13 +1,19 @@ #!/usr/bin/env node import path from "node:path"; +import os from "node:os"; import { execa } from "execa"; import { detect, getCommand } from "@antfu/ni"; import PackageJson from "@npmcli/package-json"; import fse from "fs-extra"; +import PQueue from "p-queue"; -const TO_IGNORE = [".github", "__scripts", "yarn.lock", "package.json"]; +console.log({ concurrency: os.cpus().length }); + +const queue = new PQueue({ concurrency: os.cpus().length }); + +const TO_IGNORE = [".git", ".github", "__scripts", "yarn.lock", "package.json"]; let examples = []; @@ -32,15 +38,19 @@ if (process.env.CI) { const entries = await fse.readdir(process.cwd(), { withFileTypes: true }); examples = entries .filter((entry) => entry.isDirectory()) - .filter((d) => !TO_IGNORE.includes(d)); + .filter((entry) => !TO_IGNORE.includes(entry.name)) + .map((entry) => entry.name) + .filter((entry) => { + return fse.existsSync(path.join(entry, "package.json")); + }); } const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }); console.log(`Testing changed examples: ${list.format(examples)}`); -const settled = await Promise.allSettled( - examples.map(async (example) => { +for (const example of examples) { + queue.add(async () => { const pkgJson = await PackageJson.load(example); const remixDeps = Object.keys(pkgJson.content.dependencies).filter((d) => { @@ -139,9 +149,16 @@ const settled = await Promise.allSettled( }); await pkgJson.save(); - }) -); + }); +} + +try { + queue.start(); +} catch (error) { + console.error(error); + process.exit(1); +} -const rejected = settled.filter((s) => s.status === "rejected"); -rejected.forEach((s) => console.error(s.reason)); -process.exit(rejected.length > 0 ? 1 : 0); +// const rejected = promises.filter((s) => s.status === "rejected"); +// rejected.forEach((s) => console.error(s.reason)); +// process.exit(rejected.length > 0 ? 1 : 0); diff --git a/package.json b/package.json index 558f19c3..566363ea 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@antfu/ni": "^0.18.8", "@npmcli/package-json": "^3.0.0", "execa": "^6.1.0", - "fs-extra": "11.1.0" + "fs-extra": "11.1.0", + "p-queue": "^7.3.0" } } diff --git a/prettier.config.js b/prettier.config.js index 27cca4c3..1c0267e8 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,2 +1,2 @@ -/** @type {import('prettier').Options} */ +/** @type {import('prettier').Config} */ module.exports = {}; diff --git a/yarn.lock b/yarn.lock index d52eb825..2d0f5d0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2044,6 +2044,11 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + execa@^5.0.0: version "5.1.1" resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3517,6 +3522,19 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-queue@^7.3.0: + version "7.3.0" + resolved "https://registry.npmjs.org/p-queue/-/p-queue-7.3.0.tgz#90dfa104894b286dc2f3638961380fb6dc262e55" + integrity sha512-5fP+yVQ0qp0rEfZoDTlP2c3RYBgxvRsw30qO+VtPPc95lyvSG+x6USSh1TuLB4n96IO6I8/oXQGsTgtna4q2nQ== + dependencies: + eventemitter3 "^4.0.7" + p-timeout "^5.0.2" + +p-timeout@^5.0.2: + version "5.1.0" + resolved "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" + integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== + p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" From afefe530f2486e39e28f2e701aed52ec2386b691 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Mon, 30 Jan 2023 11:38:42 -0500 Subject: [PATCH 08/29] chore: update log Signed-off-by: Logan McAnsh --- __scripts/test.mjs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/__scripts/test.mjs b/__scripts/test.mjs index bcc43b63..cf6171ce 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -83,9 +83,7 @@ for (const example of examples) { const install = await getCommand(detected, "install", ["--silent"]); const installArgs = install.split(" ").slice(1, -1); - console.log( - `Installing ${example} with ${detected} ${installArgs.join(" ")}` - ); + console.log(`📥 Installing ${example} with ${install}`); const installResult = await execa(detected, installArgs, options); if (installResult.exitCode) { @@ -115,7 +113,7 @@ for (const example of examples) { const build = await getCommand(detected, "run", ["build"]); const buildArgs = build.split(" ").slice(1); - console.log(`Building ${example} with ${detected} ${buildArgs.join(" ")}`); + console.log(`📦 Building ${example} with ${build}`); const buildResult = await execa(detected, buildArgs, options); if (buildResult.exitCode) { @@ -126,9 +124,7 @@ for (const example of examples) { const typecheck = await getCommand(detected, "run", ["typecheck"]); const typecheckArgs = typecheck.split(" ").slice(1); - console.log( - `Typechecking ${example} with ${detected} ${typecheckArgs.join(" ")}` - ); + console.log(`🕵️ Typechecking ${example} with ${typecheck}`); const typecheckResult = await execa(detected, typecheckArgs, options); if (typecheckResult.exitCode) { From fe9d69c65e1775c22f9e0c4d4c62a7a9521fdded Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Mon, 30 Jan 2023 11:42:03 -0500 Subject: [PATCH 09/29] fix: lint Signed-off-by: Logan McAnsh --- dataloader/app/loaders/userLoader.ts | 2 +- dataloader/app/routes/users.tsx | 5 +++-- dataloader/app/routes/users/index.tsx | 3 ++- file-and-cloudinary-upload/app/utils/utils.server.ts | 3 ++- pm-app/app/routes/register.tsx | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dataloader/app/loaders/userLoader.ts b/dataloader/app/loaders/userLoader.ts index 4342f7a4..b9388a8c 100644 --- a/dataloader/app/loaders/userLoader.ts +++ b/dataloader/app/loaders/userLoader.ts @@ -1,4 +1,4 @@ -import { DataFunctionArgs } from "@remix-run/node"; +import type { DataFunctionArgs } from "@remix-run/node"; import DataLoader from "dataloader"; import { db } from "~/data.server"; diff --git a/dataloader/app/routes/users.tsx b/dataloader/app/routes/users.tsx index bef3b7ef..4cd7f39e 100644 --- a/dataloader/app/routes/users.tsx +++ b/dataloader/app/routes/users.tsx @@ -1,7 +1,8 @@ import { json } from "@remix-run/node"; import { Outlet, useLoaderData } from "@remix-run/react"; -import { User } from "~/data.server"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { User } from "~/data.server"; +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { const users = await context.loaders.usersById.loadMany([ diff --git a/dataloader/app/routes/users/index.tsx b/dataloader/app/routes/users/index.tsx index e44b7da5..2cda57ea 100644 --- a/dataloader/app/routes/users/index.tsx +++ b/dataloader/app/routes/users/index.tsx @@ -1,6 +1,7 @@ import { json } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { /* diff --git a/file-and-cloudinary-upload/app/utils/utils.server.ts b/file-and-cloudinary-upload/app/utils/utils.server.ts index 4cc1714e..55f8be83 100644 --- a/file-and-cloudinary-upload/app/utils/utils.server.ts +++ b/file-and-cloudinary-upload/app/utils/utils.server.ts @@ -1,4 +1,5 @@ -import cloudinary, { UploadApiResponse } from "cloudinary"; +import type { UploadApiResponse } from "cloudinary"; +import cloudinary from "cloudinary"; import { writeAsyncIterableToWritable } from "@remix-run/node"; cloudinary.v2.config({ diff --git a/pm-app/app/routes/register.tsx b/pm-app/app/routes/register.tsx index f16a22d2..f2e63660 100644 --- a/pm-app/app/routes/register.tsx +++ b/pm-app/app/routes/register.tsx @@ -126,13 +126,13 @@ export const action = async ({ request }: ActionArgs) => { export default function Register() { const actionData = useActionData(); - let fieldErrors = + const fieldErrors = actionData && "fieldErrors" in actionData ? actionData.fieldErrors : undefined; - let formError = + const formError = actionData && "formError" in actionData ? actionData.formError : undefined; - let fields = + const fields = actionData && "fields" in actionData ? actionData.fields : undefined; const [searchParams] = useSearchParams(); From 9f85d356fe2e84bad211354f9990c07196b3badf Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Tue, 31 Jan 2023 23:39:32 -0500 Subject: [PATCH 10/29] chore: get this mostly working... Signed-off-by: Logan McAnsh --- .gitignore | 3 +- __scripts/test.mjs | 92 +- _official-blog-tutorial/tsconfig.json | 2 + _official-jokes/app/routes/login.tsx | 3 +- basic/app/routes/demos/params/$id.tsx | 1 + .../app/components/complex-component.tsx | 2 +- combobox-resource-route/package.json | 2 +- emotion/app/entry.server.tsx | 2 +- firebase/package.json | 2 +- graphql-api/app/routes/character/$id.tsx | 3 +- graphql-api/app/routes/character/error.tsx | 4 +- graphql-api/app/routes/index.tsx | 2 +- image-resize/app/components/image.tsx | 3 +- .../app/utils/backend.server.ts | 9 + leaflet/package.json | 6 +- mantine/app/entry.server.tsx | 2 + nprogress/package.json | 2 +- .../routes/dashboard/projects/$projectId.tsx | 5 + .../projects/$projectId/list/$listId.tsx | 1 + pm-app/app/routes/dashboard/projects/new.tsx | 43 +- .../dashboard/todo-lists/$listId/index.tsx | 1 + .../app/routes/dashboard/todo-lists/new.tsx | 2 + pm-app/app/routes/sign-in.tsx | 1 + pm-app/app/ui/button.tsx | 2 + pm-app/app/ui/link.tsx | 3 + quirrel/package.json | 2 +- .../app/components/textEditor.client.tsx | 2 +- react-quill/package.json | 3 +- .../app/sessions/upstash.server.ts | 3 +- remix-auth-supabase-github/app/auth.server.ts | 2 + remix-auth-supabase/app/auth.server.ts | 1 + route-modal/app/routes/invoices/$id/edit.tsx | 20 +- route-modal/app/routes/invoices/add.tsx | 29 +- rust/README.md | 2 +- rust/package.json | 3 +- sanity/app/root.tsx | 8 +- sanity/package.json | 2 +- socket.io/package.json | 2 +- stitches/app/entry.server.tsx | 1 + strapi/package.json | 1 - .../app/routes/api/stripe-web-hook.tsx | 1 + .../app/utils/stripe.server.tsx | 1 + styled-components/app/entry.server.tsx | 1 + styletron/app/entry.server.tsx | 1 + supabase-subscription/app/routes/realtime.tsx | 2 +- theme-ui/app/entry.client.tsx | 4 +- theme-ui/app/root.tsx | 4 +- theme-ui/package.json | 4 +- theme-ui/tsconfig.json | 1 + turborepo-vercel/packages/ui/tsconfig.json | 4 +- twind/app/entry.server.tsx | 2 + xata/app/routes/index.tsx | 4 +- yarn-pnp/package.json | 6 +- yarn-pnp/yarn.lock | 7823 +++++++++++++++++ yarn.lock | 437 +- 55 files changed, 8256 insertions(+), 318 deletions(-) create mode 100644 yarn-pnp/yarn.lock diff --git a/.gitignore b/.gitignore index b57c8544..fde832d3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ yarn.lock pnpm-lock.yaml pnpm-lock.yml -!./yarn.lock +!/yarn.lock +!yarn-pnp/yarn.lock diff --git a/__scripts/test.mjs b/__scripts/test.mjs index cf6171ce..5dad8af3 100755 --- a/__scripts/test.mjs +++ b/__scripts/test.mjs @@ -5,13 +5,13 @@ import os from "node:os"; import { execa } from "execa"; import { detect, getCommand } from "@antfu/ni"; -import PackageJson from "@npmcli/package-json"; import fse from "fs-extra"; import PQueue from "p-queue"; +import PackageJson from "@npmcli/package-json"; console.log({ concurrency: os.cpus().length }); -const queue = new PQueue({ concurrency: os.cpus().length }); +const queue = new PQueue({ concurrency: os.cpus().length, autoStart: false }); const TO_IGNORE = [".git", ".github", "__scripts", "yarn.lock", "package.json"]; @@ -40,9 +40,7 @@ if (process.env.CI) { .filter((entry) => entry.isDirectory()) .filter((entry) => !TO_IGNORE.includes(entry.name)) .map((entry) => entry.name) - .filter((entry) => { - return fse.existsSync(path.join(entry, "package.json")); - }); + .filter((entry) => fse.existsSync(path.join(entry, "package.json"))); } const list = new Intl.ListFormat("en", { style: "long", type: "conjunction" }); @@ -53,43 +51,47 @@ for (const example of examples) { queue.add(async () => { const pkgJson = await PackageJson.load(example); - const remixDeps = Object.keys(pkgJson.content.dependencies).filter((d) => { - return d.startsWith("@remix-run/"); - }); - - const remixDevDeps = Object.keys(pkgJson.content.devDependencies).filter( - (d) => { - return d.startsWith("@remix-run/"); - } - ); - + // TODO: figure out why this is blowing up pkgJson.update({ dependencies: { ...pkgJson.content.dependencies, - ...Object.fromEntries(remixDeps.map((d) => [d, `latest`])), - }, - devDependencies: { - ...pkgJson.content.devDependencies, - ...Object.fromEntries(remixDevDeps.map((d) => [d, `latest`])), + "@vanilla-extract/css": "1.9.2", }, }); await pkgJson.save(); /** @type {import('execa').Options} */ - const options = { cwd: example }; + const options = { cwd: example, reject: false }; + // detect package manager const detected = await detect({ cwd: example }); - const install = await getCommand(detected, "install", ["--silent"]); + const hasSetup = !!pkgJson.content.scripts?.__setup; + + if (hasSetup) { + const setup = await getCommand(detected, "run", ["__setup"]); + const setupArgs = setup.split(" ").slice(1); + console.log("🔧 Running setup script for", example); + const setupResult = await execa(detected, setupArgs, options); + if (setupResult.exitCode) { + console.error(setupResult.stderr); + throw new Error(`Error running setup script for ${example}`); + } + } + + const install = await getCommand(detected, "install", [ + "--silent", + "--legacy-peer-deps", + ]); + // this is silly, but is needed in order for execa to work const installArgs = install.split(" ").slice(1, -1); - console.log(`📥 Installing ${example} with ${install}`); + console.log(`📥 Installing ${example} with "${install}"`); const installResult = await execa(detected, installArgs, options); if (installResult.exitCode) { - console.error(`Error installing ${example}`); console.error(installResult.stderr); - return; + throw new Error(`Error installing ${example}`); } const hasPrisma = fse.existsSync( @@ -105,56 +107,34 @@ for (const example of examples) { ); if (prismaGenerate.exitCode) { - console.error(`Error generating prisma types for ${example}`); console.error(prismaGenerate.stderr); - return; + throw new Error(`Error generating prisma types for ${example}`); } } const build = await getCommand(detected, "run", ["build"]); const buildArgs = build.split(" ").slice(1); - console.log(`📦 Building ${example} with ${build}`); + console.log(`📦 Building ${example} with "${build}"`); const buildResult = await execa(detected, buildArgs, options); if (buildResult.exitCode) { - console.error(`Error building ${example}`); console.error(buildResult.stderr); - return; + throw new Error(`Error building ${example}`); } const typecheck = await getCommand(detected, "run", ["typecheck"]); const typecheckArgs = typecheck.split(" ").slice(1); - console.log(`🕵️ Typechecking ${example} with ${typecheck}`); + console.log(`🕵️ Typechecking ${example} with "${typecheck}"`); const typecheckResult = await execa(detected, typecheckArgs, options); if (typecheckResult.exitCode) { - console.error(`Error typechecking ${example}`); console.error(typecheckResult.stderr); - return; + throw new Error(`Error typechecking ${example}`); } - - pkgJson.update({ - dependencies: { - ...pkgJson.content.dependencies, - ...Object.fromEntries(remixDeps.map((d) => [d, `*`])), - }, - devDependencies: { - ...pkgJson.content.devDependencies, - ...Object.fromEntries(remixDevDeps.map((d) => [d, `*`])), - }, - }); - - await pkgJson.save(); }); } -try { - queue.start(); -} catch (error) { - console.error(error); - process.exit(1); -} - -// const rejected = promises.filter((s) => s.status === "rejected"); -// rejected.forEach((s) => console.error(s.reason)); -// process.exit(rejected.length > 0 ? 1 : 0); +queue.start(); +queue.on("error", (error) => { + console.error("🚨", error); +}); diff --git a/_official-blog-tutorial/tsconfig.json b/_official-blog-tutorial/tsconfig.json index 9bacef83..39808a96 100644 --- a/_official-blog-tutorial/tsconfig.json +++ b/_official-blog-tutorial/tsconfig.json @@ -2,6 +2,8 @@ "exclude": ["./cypress", "./cypress.config.ts"], "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], "compilerOptions": { + "allowJs": true, + "forceConsistentCasingInFileNames": true, "lib": ["DOM", "DOM.Iterable", "ES2019"], "types": ["vitest/globals"], "isolatedModules": true, diff --git a/_official-jokes/app/routes/login.tsx b/_official-jokes/app/routes/login.tsx index 16d14d8a..fb9d3e84 100644 --- a/_official-jokes/app/routes/login.tsx +++ b/_official-jokes/app/routes/login.tsx @@ -36,7 +36,8 @@ function validatePassword(password: string) { } } -function validateUrl(url: string) { +function validateUrl(url: FormDataEntryValue) { + if (typeof url !== "string") return; const urls = ["/jokes", "/", "https://remix.run"]; if (urls.includes(url)) { return url; diff --git a/basic/app/routes/demos/params/$id.tsx b/basic/app/routes/demos/params/$id.tsx index 0c16fb95..adf3260b 100644 --- a/basic/app/routes/demos/params/$id.tsx +++ b/basic/app/routes/demos/params/$id.tsx @@ -29,6 +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 lol(); } diff --git a/client-only-components/app/components/complex-component.tsx b/client-only-components/app/components/complex-component.tsx index c1ce4cc1..a6270f5e 100644 --- a/client-only-components/app/components/complex-component.tsx +++ b/client-only-components/app/components/complex-component.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; export function ComplexComponent() { - const [count, setCount] = useState(() => { + const [count, setCount] = useState(() => { const stored = localStorage.getItem("count"); if (!stored) return 0; return JSON.parse(stored); diff --git a/combobox-resource-route/package.json b/combobox-resource-route/package.json index 89075dc0..649c1215 100644 --- a/combobox-resource-route/package.json +++ b/combobox-resource-route/package.json @@ -12,8 +12,8 @@ "@remix-run/node": "~1.14.2", "@remix-run/react": "~1.14.2", "@remix-run/serve": "~1.14.2", - "match-sorter": "^6.3.1", "isbot": "^3.6.5", + "match-sorter": "^6.3.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/emotion/app/entry.server.tsx b/emotion/app/entry.server.tsx index b4a28d3f..f665406c 100644 --- a/emotion/app/entry.server.tsx +++ b/emotion/app/entry.server.tsx @@ -11,7 +11,7 @@ export default function handleRequest( request: Request, responseStatusCode: number, responseHeaders: Headers, - remixContext: EntryContext + remixContext: any ) { const cache = createEmotionCache(); const { extractCriticalToChunks } = createEmotionServer(cache); diff --git a/firebase/package.json b/firebase/package.json index e13e6b6c..91f1a8d5 100644 --- a/firebase/package.json +++ b/firebase/package.json @@ -30,6 +30,6 @@ "typescript": "^4.8.4" }, "engines": { - "node": "16" + "node": ">=16" } } diff --git a/graphql-api/app/routes/character/$id.tsx b/graphql-api/app/routes/character/$id.tsx index 74fad202..5fefda6a 100644 --- a/graphql-api/app/routes/character/$id.tsx +++ b/graphql-api/app/routes/character/$id.tsx @@ -21,8 +21,7 @@ export const loader = async ({ params }: LoaderArgs) => { * the Remix loader & route params. */ export default function Character() { - const loader = useLoaderData(); - const { data } = loader; + const { data } = useLoaderData(); const character = data.character; diff --git a/graphql-api/app/routes/character/error.tsx b/graphql-api/app/routes/character/error.tsx index 0e2a88d1..c385e651 100644 --- a/graphql-api/app/routes/character/error.tsx +++ b/graphql-api/app/routes/character/error.tsx @@ -43,12 +43,12 @@ export const loader = async () => { * an array of errors coming back from the GraphQL API. */ export default function CharacterError() { - const loader = useLoaderData(); + const data = useLoaderData(); return (

Ex: GraphQL Error

- +

Uh oh, we've intentionally triggered an error, expand the details above to see what's going on. diff --git a/graphql-api/app/routes/index.tsx b/graphql-api/app/routes/index.tsx index 6e9fcb42..994dcfb3 100644 --- a/graphql-api/app/routes/index.tsx +++ b/graphql-api/app/routes/index.tsx @@ -27,7 +27,7 @@ export default function Index() { above to see what the Remix loader returned.


- {characters.map((character) => { + {characters.map((character: any) => { if (!character) return null; const { image } = character; diff --git a/image-resize/app/components/image.tsx b/image-resize/app/components/image.tsx index efdcb890..a117386a 100644 --- a/image-resize/app/components/image.tsx +++ b/image-resize/app/components/image.tsx @@ -6,8 +6,9 @@ export interface ImageProps extends React.ComponentPropsWithRef<"img"> { width?: number; // either width or height is required height?: number; fit?: keyof FitEnum; // contain is default - alt: string; + alt?: string; } + export const Image = forwardRef( ({ children, width, height, fit, src, alt = "", ...other }, forwardedRef) => { const query = new URLSearchParams(); diff --git a/infinite-scrolling/app/utils/backend.server.ts b/infinite-scrolling/app/utils/backend.server.ts index afd821a7..55d26332 100644 --- a/infinite-scrolling/app/utils/backend.server.ts +++ b/infinite-scrolling/app/utils/backend.server.ts @@ -1,3 +1,12 @@ +interface Item { + id: string; + value: string; +} + +declare global { + var __items: Item[]; +} + const items = (global.__items = global.__items ?? Array.from({ length: 50_000 }, (_, i) => ({ diff --git a/leaflet/package.json b/leaflet/package.json index 922e6710..36b00c3d 100644 --- a/leaflet/package.json +++ b/leaflet/package.json @@ -11,11 +11,11 @@ "@remix-run/node": "~1.14.2", "@remix-run/react": "~1.14.2", "@remix-run/serve": "~1.14.2", - "leaflet": "^1.8.0", - "react-leaflet": "^4.0.2", "isbot": "^3.6.5", + "leaflet": "^1.8.0", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "react-leaflet": "^4.0.2" }, "devDependencies": { "@remix-run/dev": "~1.14.2", diff --git a/mantine/app/entry.server.tsx b/mantine/app/entry.server.tsx index e74f9d0a..8fb5a1c2 100644 --- a/mantine/app/entry.server.tsx +++ b/mantine/app/entry.server.tsx @@ -41,6 +41,7 @@ const handleBotRequest = ( const { pipe, abort } = renderToPipeableStream( injectStylesIntoStaticMarkup( + // @ts-expect-error ), { @@ -83,6 +84,7 @@ const handleBrowserRequest = ( const { pipe, abort } = renderToPipeableStream( injectStylesIntoStaticMarkup( + // @ts-expect-error ), { diff --git a/nprogress/package.json b/nprogress/package.json index ad17b003..18ac0cf8 100644 --- a/nprogress/package.json +++ b/nprogress/package.json @@ -11,8 +11,8 @@ "@remix-run/node": "~1.14.2", "@remix-run/react": "~1.14.2", "@remix-run/serve": "~1.14.2", - "nprogress": "^0.2.0", "isbot": "^3.6.5", + "nprogress": "^0.2.0", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/pm-app/app/routes/dashboard/projects/$projectId.tsx b/pm-app/app/routes/dashboard/projects/$projectId.tsx index ab1f0122..af1668f7 100644 --- a/pm-app/app/routes/dashboard/projects/$projectId.tsx +++ b/pm-app/app/routes/dashboard/projects/$projectId.tsx @@ -296,12 +296,15 @@ export default function ProjectRoute() { @@ -387,7 +390,9 @@ export default function ProjectRoute() { diff --git a/pm-app/app/routes/dashboard/projects/$projectId/list/$listId.tsx b/pm-app/app/routes/dashboard/projects/$projectId/list/$listId.tsx index 66f5c9bc..7aee3d60 100644 --- a/pm-app/app/routes/dashboard/projects/$projectId/list/$listId.tsx +++ b/pm-app/app/routes/dashboard/projects/$projectId/list/$listId.tsx @@ -117,6 +117,7 @@ function TodoListRoute() { const fetchers = useFetchers(); const taskFetcherMap = new Map(); + // @ts-expect-error const allTodos: Todo[] = todoList.todos; for (const fetcher of fetchers) { if (fetcher.type === "actionSubmission") { diff --git a/pm-app/app/routes/dashboard/projects/new.tsx b/pm-app/app/routes/dashboard/projects/new.tsx index 00e992a8..9e574b7c 100644 --- a/pm-app/app/routes/dashboard/projects/new.tsx +++ b/pm-app/app/routes/dashboard/projects/new.tsx @@ -98,7 +98,7 @@ export const action = async ({ request }: ActionArgs) => { function NewProject() { const { allUsers, user } = useLoaderData(); - const { fieldErrors, fields, formError } = useActionData(); + const actionData = useActionData(); const selectableUsers = React.useMemo(() => { return allUsers.filter((u) => u.id !== user.id); @@ -130,10 +130,14 @@ function NewProject() {
- {formError ? ( + {actionData && "formError" in actionData && actionData.formError ? (
@@ -162,10 +174,20 @@ function NewProject() { -