Upgrade deps

This commit is contained in:
Kalle
2022-04-15 18:22:36 +03:00
parent 9a16581027
commit 270e00fbe1
55 changed files with 7726 additions and 331 deletions

View File

@@ -1,4 +1,4 @@
import { Form } from "remix";
import { Form } from "@remix-run/react";
import { useBaseURL, useTimeoutState } from "~/hooks/common";
import { FindManyByTrustReceiverId } from "~/models/TrustRelationship.server";
import { Button } from "./Button";

View File

@@ -1,4 +1,4 @@
import { useCatch, useLocation } from "remix";
import { useCatch, useLocation } from "@remix-run/react";
import { DISCORD_URL } from "~/constants";
import { getLogInUrl } from "~/utils";
import { useUser } from "~/hooks/common";

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { useFetcher } from "remix";
import { useFetcher } from "@remix-run/react";
import invariant from "tiny-invariant";
import { useUser } from "~/hooks/common";
import { useSocketEvent } from "~/hooks/useSocketEvent";

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import { Fragment } from "react";
import { Link } from "remix";
import { Link } from "@remix-run/react";
import { navItems } from "~/constants";
import { SearchInput } from "./SearchInput";

View File

@@ -1,4 +1,4 @@
import { useLocation } from "remix";
import { useLocation } from "@remix-run/react";
import { useUser } from "~/hooks/common";
import { getLogInUrl } from "~/utils";
import { Button } from "../Button";

View File

@@ -4,7 +4,7 @@ import { HamburgerButton } from "./HamburgerButton";
import { MobileNav } from "./MobileNav";
import { SearchInput } from "./SearchInput";
import { UserItem } from "./UserItem";
import { Link } from "remix";
import { Link } from "@remix-run/react";
import { navItems } from "~/constants";
import { layoutIcon } from "~/utils";
import clsx from "clsx";

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { Link, useNavigate } from "remix";
import { Link, useNavigate } from "@remix-run/react";
import { useOnClickOutside } from "~/hooks/common";
const ESC_BUTTON = "Escape";

View File

@@ -1,5 +1,5 @@
import { useEffect } from "react";
import { useActionData, useTransition } from "remix";
import { useActionData, useTransition } from "@remix-run/react";
import { useTimeoutState } from "~/hooks/common";
import { Button, ButtonProps } from "./Button";

View File

@@ -1,4 +1,4 @@
import { Form, useLoaderData } from "remix";
import { Form, useLoaderData } from "@remix-run/react";
import { LookingLoaderData } from "~/routes/play/looking";
import { Button } from "../Button";
import { Chat } from "../Chat";

View File

@@ -1,5 +1,5 @@
import clsx from "clsx";
import { useFetcher } from "remix";
import { useFetcher } from "@remix-run/react";
import { Button, ButtonProps } from "~/components/Button";
import type {
LookingActionSchema,

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { Form, useLoaderData } from "remix";
import { Form, useLoaderData } from "@remix-run/react";
import {
groupExpirationStatus,
groupWillBeInactiveAt,

View File

@@ -2,7 +2,7 @@ import { Mode } from "@prisma/client";
import clsx from "clsx";
import clone from "just-clone";
import * as React from "react";
import { Form, useLoaderData } from "remix";
import { Form, useLoaderData } from "@remix-run/react";
import { scoreValid } from "~/core/play/validators";
import { LFGMatchLoaderData } from "~/routes/play/match.$id";
import { userFullDiscordName } from "~/utils";

View File

@@ -1,5 +1,5 @@
import clsx from "clsx";
import { useLoaderData } from "remix";
import { useLoaderData } from "@remix-run/react";
import { LFGMatchLoaderData } from "~/routes/play/match.$id";
import { userFullDiscordName } from "~/utils";
import { weaponsInGameOrder } from "~/utils/sorters";

View File

@@ -1,4 +1,4 @@
import { Form, useMatches } from "remix";
import { Form, useMatches } from "@remix-run/react";
import invariant from "tiny-invariant";
import { allMatchesReported, matchIsOver } from "~/core/tournament/utils";
import type { BracketModified } from "~/services/bracket";

View File

@@ -1,6 +1,6 @@
// TODO: Warning: Text content did not match. Server: "57" Client: "56"
import * as React from "react";
import { Form, useLoaderData, useTransition } from "remix";
import { Form, useLoaderData, useTransition } from "@remix-run/react";
import {
checkInClosesDate,
TOURNAMENT_TEAM_ROSTER_MIN_SIZE,

View File

@@ -1,4 +1,4 @@
import { Form, useMatches } from "remix";
import { Form, useMatches } from "@remix-run/react";
import invariant from "tiny-invariant";
import type { BracketModified } from "~/services/bracket";
import type { FindTournamentByNameForUrlI } from "~/services/tournament";

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { Form } from "remix";
import { Form } from "@remix-run/react";
import { TOURNAMENT_TEAM_ROSTER_MIN_SIZE } from "~/constants";
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
import { Unpacked } from "~/utils";

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import * as React from "react";
import { Link } from "remix";
import { Link } from "@remix-run/react";
import type { BracketModified } from "~/services/bracket";
import { Unpacked } from "~/utils";

View File

@@ -1,4 +1,4 @@
import { Link, useLoaderData, useLocation } from "remix";
import { Link, useLoaderData, useLocation } from "@remix-run/react";
import { DiscordIcon } from "~/components/icons/Discord";
import { TwitterIcon } from "~/components/icons/Twitter";
import { resolveTournamentFormatString } from "~/core/tournament/bracket";

View File

@@ -1,4 +1,4 @@
import { Form, useTransition } from "remix";
import { Form, useTransition } from "@remix-run/react";
import { useUser } from "~/hooks/common";
import { Avatar } from "../Avatar";
import { Button } from "../Button";

View File

@@ -1,5 +1,5 @@
import { LfgGroupStatus } from "@prisma/client";
import { redirect } from "remix";
import { redirect } from "@remix-run/node";
import invariant from "tiny-invariant";
import {
BIT_HIGHER_MMR_LIMIT,

View File

@@ -1,5 +1,5 @@
import { hydrate } from "react-dom";
import { RemixBrowser } from "remix";
import { RemixBrowser } from "@remix-run/react";
// TODO: should this be hydrateRoot?
hydrate(<RemixBrowser />, document);

View File

@@ -1,6 +1,6 @@
import { renderToString } from "react-dom/server";
import type { EntryContext } from "remix";
import { RemixServer } from "remix";
import type { EntryContext } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
export default function handleRequest(
request: Request,

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { useLoaderData, useMatches, useNavigate } from "remix";
import { useLoaderData, useMatches, useNavigate } from "@remix-run/react";
import { z } from "zod";
import { LoggedInUserSchema } from "~/utils/schemas";

View File

@@ -1,4 +1,4 @@
import { useLoaderData } from "remix";
import { useLoaderData } from "@remix-run/react";
import type { BracketModified } from "~/services/bracket";
import { Unpacked } from "~/utils";
import * as React from "react";

View File

@@ -1,6 +1,7 @@
import * as React from "react";
import type { LinksFunction, LoaderFunction } from "@remix-run/node";
import { json } from "@remix-run/node";
import {
json,
Links,
LiveReload,
Meta,
@@ -8,8 +9,7 @@ import {
Scripts,
useCatch,
useLoaderData,
} from "remix";
import type { LinksFunction, LoaderFunction } from "remix";
} from "@remix-run/react";
import { LoggedInUser, LoggedInUserSchema } from "~/utils/schemas";
import { Layout } from "./components/Layout";
import { Catcher } from "./components/Catcher";

View File

@@ -1,4 +1,4 @@
import { ActionFunction, json, LoaderFunction } from "remix";
import { ActionFunction, json, LoaderFunction } from "@remix-run/node";
import { z } from "zod";
import { MAX_CHAT_MESSAGE_LENGTH } from "~/constants";
import * as ChatMessage from "~/models/ChatMessage.server";

View File

@@ -1,4 +1,4 @@
import { LoaderFunction } from "remix";
import { LoaderFunction } from "@remix-run/node";
import { db } from "~/utils/db.server";
export const loader: LoaderFunction = async () => {

View File

@@ -1,4 +1,4 @@
import type { MetaFunction } from "remix";
import type { MetaFunction } from "@remix-run/node";
export const meta: MetaFunction = () => {
return {

View File

@@ -1,15 +1,17 @@
import {
ActionFunction,
Form,
json,
LinksFunction,
LoaderFunction,
redirect,
} from "@remix-run/node";
import {
Form,
useLoaderData,
useLocation,
useNavigate,
useTransition,
} from "remix";
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Button } from "~/components/Button";

View File

@@ -1,13 +1,10 @@
import {
Form,
json,
Link,
LinksFunction,
LoaderFunction,
MetaFunction,
useLoaderData,
useSubmit,
} from "remix";
} from "@remix-run/node";
import { Form, Link, useLoaderData, useSubmit } from "@remix-run/react";
import { monthNames } from "~/constants";
import {
LeaderboardEntry,

View File

@@ -1,4 +1,4 @@
import type { ActionFunction } from "remix";
import type { ActionFunction } from "@remix-run/node";
import { z } from "zod";
import { abilities, weapons } from "~/constants";
import { idToStage, modesShort, stages } from "~/core/stages/stages";

View File

@@ -1,6 +1,7 @@
import clsx from "clsx";
import { Link } from "react-router-dom";
import { LinksFunction, NavLink, Outlet, useLocation } from "remix";
import { LinksFunction } from "@remix-run/node";
import { NavLink, Outlet, useLocation } from "@remix-run/react";
import { useUser } from "~/hooks/common";
import styles from "~/styles/play-layout.css";

View File

@@ -1,13 +1,13 @@
import {
ActionFunction,
Form,
json,
LinksFunction,
LoaderFunction,
MetaFunction,
redirect,
useLoaderData,
} from "remix";
} from "@remix-run/node";
import { Form, useLoaderData } from "@remix-run/react";
import { z } from "zod";
import { AddPlayers } from "~/components/AddPlayers";
import { Alert } from "~/components/Alert";

View File

@@ -1,11 +1,10 @@
import {
json,
Link,
LinksFunction,
LoaderFunction,
MetaFunction,
useLoaderData,
} from "remix";
} from "@remix-run/node";
import { Link, useLoaderData } from "@remix-run/react";
import { makeTitle, Unpacked } from "~/utils";
import * as LFGMatch from "~/models/LFGMatch.server";
import * as User from "~/models/User.server";

View File

@@ -1,16 +1,19 @@
import {
ActionFunction,
Form,
json,
Link,
LinksFunction,
LoaderFunction,
MetaFunction,
redirect,
} from "@remix-run/node";
import {
Form,
Link,
useLoaderData,
useLocation,
useTransition,
} from "remix";
} from "@remix-run/react";
import { z } from "zod";
import { LFGGroupSelector } from "~/components/play/LFGGroupSelector";
import styles from "~/styles/play.css";

View File

@@ -1,4 +1,5 @@
import { LfgGroupType } from "@prisma/client";
import {
ActionFunction,
json,
@@ -6,9 +7,9 @@ import {
LoaderFunction,
MetaFunction,
redirect,
ShouldReloadFunction,
useLoaderData,
} from "remix";
} from "@remix-run/node";
import { ShouldReloadFunction, useLoaderData } from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Alert } from "~/components/Alert";

View File

@@ -1,20 +1,25 @@
import { Mode } from "@prisma/client";
import clsx from "clsx";
import React from "react";
import {
ActionFunction,
Form,
json,
LinksFunction,
LoaderFunction,
MetaFunction,
redirect,
} from "@remix-run/node";
import {
Form,
ShouldReloadFunction,
useActionData,
useLoaderData,
useParams,
useTransition,
} from "remix";
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Button } from "~/components/Button";

View File

@@ -1,5 +1,5 @@
import React from "react";
import { MetaFunction } from "remix";
import { MetaFunction } from "@remix-run/node";
import { makeTitle } from "~/utils";
export const meta: MetaFunction = () => {

View File

@@ -2,13 +2,11 @@ import clsx from "clsx";
import * as React from "react";
import {
ActionFunction,
Form,
json,
LinksFunction,
MetaFunction,
useLoaderData,
useTransition,
} from "remix";
} from "@remix-run/node";
import { Form, useLoaderData, useTransition } from "@remix-run/react";
import { Button } from "~/components/Button";
import {
LFG_WEAPON_POOL_MAX_LENGTH,

View File

@@ -1,15 +1,17 @@
// TODO: 404 page that shows other tournaments by the organization
import {
ActionFunction,
LinksFunction,
LoaderFunction,
ActionFunction,
MetaFunction,
} from "@remix-run/node";
import {
NavLink,
Outlet,
useLoaderData,
ShouldReloadFunction,
} from "remix";
useLoaderData,
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { AdminIcon } from "~/components/icons/Admin";
import { CheckinActions } from "~/components/tournament/CheckinActions";

View File

@@ -3,10 +3,8 @@ import {
json,
LinksFunction,
LoaderFunction,
Outlet,
ShouldReloadFunction,
useMatches,
} from "remix";
} from "@remix-run/node";
import { Outlet, ShouldReloadFunction, useMatches } from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { BracketActions } from "~/components/tournament/BracketActions";

View File

@@ -1,10 +1,5 @@
import {
json,
LinksFunction,
LoaderFunction,
useLoaderData,
useLocation,
} from "remix";
import { json, LinksFunction, LoaderFunction } from "@remix-run/node";
import { useLoaderData, useLocation } from "@remix-run/react";
import { z } from "zod";
import Modal from "~/components/Modal";
import { TeamRosterInputs } from "~/components/tournament/TeamRosterInputs";

View File

@@ -1,4 +1,4 @@
import { useMatches } from "remix";
import { useMatches } from "@remix-run/react";
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
export default function DefaultTab() {

View File

@@ -1,13 +1,18 @@
import { ActionFunction, Form, LinksFunction, LoaderFunction } from "remix";
import {
ActionFunction,
json,
LinksFunction,
LoaderFunction,
redirect,
} from "@remix-run/node";
import {
Form,
useLoaderData,
useLocation,
useMatches,
useNavigate,
useTransition,
useLocation,
} from "remix";
} from "@remix-run/react";
import { z } from "zod";
import { Button } from "~/components/Button";
import { Catcher } from "~/components/Catcher";

View File

@@ -5,10 +5,8 @@ import {
LinksFunction,
LoaderFunction,
redirect,
useActionData,
useLoaderData,
useLocation,
} from "remix";
} from "@remix-run/node";
import { useActionData, useLoaderData, useLocation } from "@remix-run/react";
import { z } from "zod";
import { AddPlayers } from "~/components/AddPlayers";
import { Alert } from "~/components/Alert";

View File

@@ -1,11 +1,6 @@
import { useRef } from "react";
import {
ActionFunction,
Form,
LinksFunction,
useMatches,
useTransition,
} from "remix";
import { ActionFunction, LinksFunction } from "@remix-run/node";
import { Form, useMatches, useTransition } from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Button } from "~/components/Button";

View File

@@ -1,7 +1,8 @@
import styles from "~/styles/tournament-map-pool.css";
import type { Mode } from ".prisma/client";
import clsx from "clsx";
import { LinksFunction, useMatches } from "remix";
import { LinksFunction } from "@remix-run/node";
import { useMatches } from "@remix-run/react";
import { FindTournamentByNameForUrlI } from "~/services/tournament";
import { modeToImageUrl, stageNameToImageUrl } from "~/utils";
import { modesShort, stages } from "~/core/stages/stages";

View File

@@ -1,15 +1,13 @@
import { Prisma } from ".prisma/client";
import { ActionFunction, LinksFunction, redirect } from "@remix-run/node";
import {
ActionFunction,
Form,
LinksFunction,
redirect,
useActionData,
useLocation,
useMatches,
useNavigate,
useTransition,
} from "remix";
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Button } from "~/components/Button";

View File

@@ -17,14 +17,16 @@ import clsx from "clsx";
import * as React from "react";
import {
ActionFunction,
Form,
json,
LinksFunction,
LoaderFunction,
} from "@remix-run/node";
import {
Form,
useLoaderData,
useMatches,
useTransition,
} from "remix";
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { z } from "zod";
import { Alert } from "~/components/Alert";

View File

@@ -2,15 +2,17 @@ import type { Mode, Stage } from ".prisma/client";
import clsx from "clsx";
import {
ActionFunction,
Form,
json,
LinksFunction,
LoaderFunction,
redirect,
} from "@remix-run/node";
import {
Form,
useLoaderData,
useMatches,
useTransition,
} from "remix";
} from "@remix-run/react";
import invariant from "tiny-invariant";
import { Alert } from "~/components/Alert";
import { Button } from "~/components/Button";

View File

@@ -1,4 +1,4 @@
import { useMatches } from "remix";
import { useMatches } from "@remix-run/react";
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
import { TeamRoster } from "~/components/tournament/TeamRoster";
import { useUser } from "~/hooks/common";

View File

@@ -1,6 +1,7 @@
import { Mode, User } from "@prisma/client";
import type { CSSProperties } from "react";
import { json, useLocation } from "remix";
import { json } from "@remix-run/node";
import { useLocation } from "@remix-run/react";
import type { Socket } from "socket.io-client";
import { z } from "zod";
import { ADMIN_UUID, NZAP_UUID } from "~/constants";

7824
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,6 @@
"dev": "cross-env NODE_ENV=development remix build && run-p dev:*",
"dev:remix": "cross-env NODE_ENV=development remix watch",
"dev:node": "cross-env NODE_ENV=development nodemon ./build/index.js --watch ./build/index.js",
"postinstall": "remix setup node",
"gen": "npx prisma generate",
"start": "cross-env NODE_ENV=production node ./build/index.js",
"migration:create": "npx prisma migrate dev --create-only",
@@ -21,6 +20,7 @@
"lint:styles": "stylelint \"app/styles/**/*.css\"",
"lsf": "npm run lint:styles -- --fix",
"prettier:check": "prettier --check .",
"prettier:write": "prettier --write .",
"typecheck": "tsc --noEmit",
"cy:open": "npx cypress open",
"cy:run": "npx cypress run",
@@ -33,10 +33,11 @@
"@dnd-kit/sortable": "^6.0.1",
"@dnd-kit/utilities": "^3.1.0",
"@headlessui/react": "^1.5.0",
"@popperjs/core": "^2.11.4",
"@popperjs/core": "^2.11.5",
"@prisma/client": "^3.10.0",
"@remix-run/express": "^1.3.3",
"@remix-run/react": "^1.3.3",
"@remix-run/express": "^1.4.0",
"@remix-run/node": "^1.4.0",
"@remix-run/react": "^1.4.0",
"clsx": "^1.1.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
@@ -44,7 +45,7 @@
"cross-env": "^7.0.3",
"express": "^4.17.3",
"fuse.js": "^6.5.3",
"ioredis": "^5.0.1",
"ioredis": "^5.0.4",
"just-clone": "^5.0.1",
"just-shuffle": "^4.0.1",
"morgan": "^1.10.0",
@@ -54,15 +55,14 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-popper": "^2.2.5",
"remix": "^1.3.3",
"socket.io": "^4.4.1",
"socket.io-client": "^4.4.1",
"tiny-invariant": "^1.2.0",
"uuid": "^8.3.2",
"zod": "^3.14.3"
"zod": "^3.14.4"
},
"devDependencies": {
"@remix-run/dev": "^1.3.3",
"@remix-run/dev": "^1.4.0",
"@types/compression": "^1.7.2",
"@types/cookie-parser": "^1.4.2",
"@types/cookie-session": "^2.0.44",
@@ -70,18 +70,18 @@
"@types/morgan": "^1.9.3",
"@types/passport": "^1.0.7",
"@types/passport-discord": "^0.1.5",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"cypress": "^9.5.3",
"eslint": "^8.12.0",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"cypress": "^9.5.4",
"eslint": "^8.13.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"nodemon": "^2.0.15",
"npm-run-all": "^4.1.5",
"prettier": "2.6.1",
"prettier": "2.6.2",
"prisma": "^3.10.0",
"stylelint": "^14.6.1",
"stylelint-config-idiomatic-order": "^8.1.0",