diff --git a/app/entry.client.tsx b/app/entry.client.tsx index a19979b2..3eec1fd0 100644 --- a/app/entry.client.tsx +++ b/app/entry.client.tsx @@ -1,4 +1,4 @@ +import { RemixBrowser } from "@remix-run/react"; import { hydrate } from "react-dom"; -import { RemixBrowser } from "remix"; hydrate(, document); diff --git a/app/entry.server.tsx b/app/entry.server.tsx index cae20674..5afa1823 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -1,6 +1,6 @@ +import type { EntryContext } from "@remix-run/node"; +import { RemixServer } from "@remix-run/react"; import { renderToString } from "react-dom/server"; -import { RemixServer } from "remix"; -import type { EntryContext } from "remix"; export default function handleRequest( request: Request, diff --git a/app/root.tsx b/app/root.tsx index e38495ec..b0fd2473 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,13 +1,6 @@ -import { - json, - Links, - LiveReload, - Meta, - Outlet, - Scripts, - ScrollRestoration, -} from "remix"; -import type { LinksFunction, MetaFunction, LoaderFunction } from "remix"; +import type { LinksFunction, LoaderFunction, MetaFunction } from "@remix-run/node"; +import { json } from "@remix-run/node"; +import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from "@remix-run/react"; import tailwindStylesheetUrl from "./styles/tailwind.css"; import { getUser } from "./session.server"; diff --git a/app/routes/healthcheck.tsx b/app/routes/healthcheck.tsx index 79d4a3b0..01a8ef08 100644 --- a/app/routes/healthcheck.tsx +++ b/app/routes/healthcheck.tsx @@ -1,5 +1,6 @@ // learn more: https://fly.io/docs/reference/configuration/#services-http_checks -import type { LoaderFunction } from "remix"; +import type { LoaderFunction } from "@remix-run/node"; + import { prisma } from "~/db.server"; export const loader: LoaderFunction = async ({ request }) => { diff --git a/app/routes/index.tsx b/app/routes/index.tsx index 18858776..b63be55b 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -1,4 +1,5 @@ -import { Link } from "remix"; +import { Link } from "@remix-run/react"; + import { useOptionalUser } from "~/utils"; export default function Index() { diff --git a/app/routes/join.tsx b/app/routes/join.tsx index ad0ed801..44a14d2b 100644 --- a/app/routes/join.tsx +++ b/app/routes/join.tsx @@ -1,13 +1,11 @@ +import type { + ActionFunction, + LoaderFunction, + MetaFunction, +} from "@remix-run/node"; +import { json, redirect } from "@remix-run/node"; +import { Form, Link, useActionData, useSearchParams } from "@remix-run/react"; import * as React from "react"; -import type { ActionFunction, LoaderFunction, MetaFunction } from "remix"; -import { - Form, - Link, - redirect, - useSearchParams, - json, - useActionData, -} from "remix"; import { getUserId, createUserSession } from "~/session.server"; diff --git a/app/routes/login.tsx b/app/routes/login.tsx index 9c9da9f5..a725365e 100644 --- a/app/routes/login.tsx +++ b/app/routes/login.tsx @@ -1,13 +1,11 @@ +import type { + ActionFunction, + LoaderFunction, + MetaFunction, +} from "@remix-run/node"; +import { json, redirect } from "@remix-run/node"; +import { Form, Link, useActionData, useSearchParams } from "@remix-run/react"; import * as React from "react"; -import type { ActionFunction, LoaderFunction, MetaFunction } from "remix"; -import { - Form, - json, - Link, - useActionData, - redirect, - useSearchParams, -} from "remix"; import { createUserSession, getUserId } from "~/session.server"; import { verifyLogin } from "~/models/user.server"; diff --git a/app/routes/logout.tsx b/app/routes/logout.tsx index 17be85ff..04ceac2b 100644 --- a/app/routes/logout.tsx +++ b/app/routes/logout.tsx @@ -1,5 +1,6 @@ -import type { ActionFunction, LoaderFunction } from "remix"; -import { redirect } from "remix"; +import type { ActionFunction, LoaderFunction } from "@remix-run/node"; +import { redirect } from "@remix-run/node"; + import { logout } from "~/session.server"; export const action: ActionFunction = async ({ request }) => { diff --git a/app/routes/notes.tsx b/app/routes/notes.tsx index 8a496a94..0860147a 100644 --- a/app/routes/notes.tsx +++ b/app/routes/notes.tsx @@ -1,5 +1,6 @@ -import { Form, json, useLoaderData, Outlet, Link, NavLink } from "remix"; -import type { LoaderFunction } from "remix"; +import type { LoaderFunction } from "@remix-run/node"; +import { json } from "@remix-run/node"; +import { Form, Link, NavLink, Outlet, useLoaderData } from "@remix-run/react"; import { requireUserId } from "~/session.server"; import { useUser } from "~/utils"; diff --git a/app/routes/notes/$noteId.tsx b/app/routes/notes/$noteId.tsx index 10b4e65f..fe5ee262 100644 --- a/app/routes/notes/$noteId.tsx +++ b/app/routes/notes/$noteId.tsx @@ -1,7 +1,8 @@ -import type { LoaderFunction, ActionFunction } from "remix"; -import { redirect } from "remix"; -import { json, useLoaderData, useCatch, Form } from "remix"; +import type { ActionFunction, LoaderFunction } from "@remix-run/node"; +import { json, redirect } from "@remix-run/node"; +import { Form, useCatch, useLoaderData } from "@remix-run/react"; import invariant from "tiny-invariant"; + import type { Note } from "~/models/note.server"; import { deleteNote } from "~/models/note.server"; import { getNote } from "~/models/note.server"; diff --git a/app/routes/notes/index.tsx b/app/routes/notes/index.tsx index 30df34be..aa858a99 100644 --- a/app/routes/notes/index.tsx +++ b/app/routes/notes/index.tsx @@ -1,4 +1,4 @@ -import { Link } from "remix"; +import { Link } from "@remix-run/react"; export default function NoteIndexPage() { return ( diff --git a/app/routes/notes/new.tsx b/app/routes/notes/new.tsx index 25041e6c..723b04f4 100644 --- a/app/routes/notes/new.tsx +++ b/app/routes/notes/new.tsx @@ -1,6 +1,7 @@ +import type { ActionFunction } from "@remix-run/node"; +import { json, redirect } from "@remix-run/node"; +import { Form, useActionData } from "@remix-run/react"; import * as React from "react"; -import { Form, json, redirect, useActionData } from "remix"; -import type { ActionFunction } from "remix"; import { createNote } from "~/models/note.server"; import { requireUserId } from "~/session.server"; diff --git a/app/session.server.ts b/app/session.server.ts index 9f233991..aa9efdea 100644 --- a/app/session.server.ts +++ b/app/session.server.ts @@ -1,4 +1,4 @@ -import { createCookieSessionStorage, redirect } from "remix"; +import { createCookieSessionStorage, redirect } from "@remix-run/node"; import invariant from "tiny-invariant"; import type { User } from "~/models/user.server"; diff --git a/app/utils.ts b/app/utils.ts index 7fd18822..d0238204 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -1,5 +1,5 @@ +import { useMatches } from "@remix-run/react"; import { useMemo } from "react"; -import { useMatches } from "remix"; import type { User } from "~/models/user.server"; diff --git a/package-lock.json b/package-lock.json index 5aa32927..9e222c8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,15 @@ "packages": { "": { "name": "indie-stack-template", - "hasInstallScript": true, "dependencies": { "@prisma/client": "^3.11.1", + "@remix-run/node": "*", "@remix-run/react": "*", "@remix-run/serve": "*", "@remix-run/server-runtime": "*", "bcryptjs": "^2.4.3", "react": "^17.0.2", "react-dom": "^17.0.2", - "remix": "*", "tiny-invariant": "^1.2.0" }, "devDependencies": { @@ -11009,11 +11008,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remix": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/remix/-/remix-1.3.4.tgz", - "integrity": "sha512-rUfoz7qgExOPzcNvoyBPAj9aOIKIcwvjiXA8O9NLCwxuIZ3lIUggFxqLI38HMwIlUUhNhA6keuYbRu9iWJCCQA==" - }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", @@ -21710,11 +21704,6 @@ "unified": "^10.0.0" } }, - "remix": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/remix/-/remix-1.3.4.tgz", - "integrity": "sha512-rUfoz7qgExOPzcNvoyBPAj9aOIKIcwvjiXA8O9NLCwxuIZ3lIUggFxqLI38HMwIlUUhNhA6keuYbRu9iWJCCQA==" - }, "request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", diff --git a/package.json b/package.json index 3ab3f366..a273f819 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "dev:remix": "cross-env NODE_ENV=development binode --require ./mocks -- @remix-run/dev:remix dev", "format": "prettier --write .", "generate:css": "tailwindcss -o ./app/styles/tailwind.css", - "postinstall": "remix setup node", "lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .", "setup": "prisma migrate dev && prisma db seed", "start": "remix-serve build", @@ -33,13 +32,13 @@ ], "dependencies": { "@prisma/client": "^3.11.1", + "@remix-run/node": "*", "@remix-run/react": "*", "@remix-run/serve": "*", "@remix-run/server-runtime": "*", "bcryptjs": "^2.4.3", "react": "^17.0.2", "react-dom": "^17.0.2", - "remix": "*", "tiny-invariant": "^1.2.0" }, "devDependencies": {