From 16bbb4252b83dfd046ffa307c9332cf5d92dd304 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 6 Sep 2026 15:03:09 +0300 Subject: [PATCH] Enable Biome rules 5 --- app/components/AbilitiesSelector.tsx | 2 +- app/components/Chart.tsx | 2 +- app/components/FormWithConfirm.tsx | 2 +- app/components/TimePopover.tsx | 2 +- .../useCloseOnScrollClip.browser.test.tsx | 2 +- .../match-page/MatchBannerScheduledTime.tsx | 2 +- app/components/match-page/MatchRosterTab.tsx | 2 +- app/components/match-page/MatchTabs.tsx | 2 +- app/db/seed/core/SplatoonFaker.ts | 2 +- app/db/seed/dev/calendar.ts | 2 +- app/db/seed/dev/sendouq.ts | 2 +- .../seed/factories/PlusSuggestionFactory.ts | 2 +- app/db/seed/factories/SQGroupFactory.ts | 2 +- app/db/seed/factories/SQMatchFactory.ts | 2 +- app/db/seed/factories/TeamFactory.ts | 2 +- app/db/seed/factories/TournamentFactory.ts | 2 +- .../TournamentOrganizationFactory.ts | 2 +- .../factories/TournamentStreamerFactory.ts | 2 +- .../seed/factories/TournamentTeamFactory.ts | 2 +- app/db/seed/factories/UserFactory.ts | 2 +- .../seed/factories/XRankPlacementFactory.ts | 2 +- app/features/admin/AdminRepository.server.ts | 2 +- app/features/admin/core/plus-tier.server.ts | 2 +- app/features/art/art-image.server.ts | 2 +- .../articles/loaders/a.$slug.server.ts | 2 +- app/features/articles/routes/a.$slug.tsx | 2 +- .../availability/core/Availability.ts | 2 +- .../routes/t.$customUrl.schedule.tsx | 2 +- app/features/badges/BadgeRepository.server.ts | 2 +- .../build-analyzer/core/ability-points.ts | 2 +- app/features/build-analyzer/core/stats.ts | 2 +- app/features/build-analyzer/core/utils.ts | 2 +- .../build-analyzer/routes/analyzer.tsx | 4 ++-- app/features/build-stats/build-stats-utils.ts | 2 +- app/features/builds/BuildRepository.server.ts | 2 +- .../calendar/CalendarRepository.server.ts | 2 +- .../actions/calendar.new.server.test.ts | 2 +- .../chat/ChatRepository.server.test.ts | 2 +- .../chat/ChatRoomResolver.server.test.ts | 2 +- app/features/chat/ChatSystemMessage.server.ts | 2 +- .../routes/api.chat.rooms.$id.messages.ts | 2 +- .../events/routes/sse.$connectionId.topics.ts | 2 +- app/features/img-upload/image-bytes.server.ts | 2 +- app/features/img-upload/image-field.server.ts | 2 +- .../leaderboards/components/TopTenPlayer.tsx | 2 +- .../map-list-generator/core/MapList.ts | 2 +- .../core/map-pool-serializer/serializer.ts | 2 +- .../map-list-generator/routes/maps.tsx | 2 +- .../map-planner/components/Planner.tsx | 2 +- app/features/map-planner/routes/plans.tsx | 6 ++++- app/features/mmr/mmr-utils.server.ts | 2 +- app/features/mmr/mmr-utils.ts | 2 +- .../notifications/core/notify.server.test.ts | 2 +- .../notifications/core/notify.server.ts | 2 +- .../notifications/core/webPush.server.ts | 2 +- .../core/objectDamage.ts | 2 +- .../core/objectHitPoints.ts | 2 +- .../actions/plus.suggestions.server.ts | 2 +- .../PlusVotingRepository.server.ts | 2 +- .../plus-voting/actions/plus.voting.server.ts | 2 +- .../plus-voting/core/usePlusVoting.ts | 2 +- .../loaders/plus.voting.results.server.ts | 2 +- app/features/scanner-ingest/tests/harness.ts | 2 +- .../scanner/tests/ability-harvest.test.ts | 2 +- app/features/scanner/tests/banner.test.ts | 2 +- .../scanner/tests/logic/dedupe-events.test.ts | 2 +- .../scanner/tests/logic/frame-queue.test.ts | 2 +- .../scanner/tests/logic/match-builder.test.ts | 2 +- .../scanner/tests/logic/match-sets.test.ts | 2 +- .../scanner/tests/logic/scheduler.test.ts | 2 +- app/features/scanner/tests/map-start.test.ts | 2 +- app/features/scanner/tests/minimap.test.ts | 2 +- .../scanner/tests/node-test-compat.ts | 2 +- app/features/scanner/tests/objective.test.ts | 2 +- .../scanner/tests/opencv-smoke.test.ts | 2 +- .../scanner/tests/player-status.test.ts | 2 +- .../scanner/tests/replay-time.test.ts | 2 +- .../tests/scoreboard-battle-log.test.ts | 2 +- .../scanner/tests/scoreboard-own.test.ts | 2 +- app/features/scanner/tests/scoreboard.test.ts | 2 +- .../scanner/tests/sendou-upload.test.ts | 2 +- .../scanner/tests/strip-weapons.test.ts | 2 +- app/features/scanner/tests/suites/death.ts | 2 +- .../suites/scoreboard-battle-log-replay.ts | 2 +- app/features/scanner/tests/timeline.test.ts | 2 +- .../scrims/ScrimPostRepository.server.ts | 2 +- .../scrims/actions/scrims.new.server.ts | 2 +- app/features/scrims/components/ScrimCard.tsx | 2 +- .../SQMatchRepository.server.test.ts | 2 +- .../sendouq-match/SQMatchRepository.server.ts | 2 +- .../components/SendouQMatchBanner.tsx | 2 +- .../core/discord-webhook.server.ts | 2 +- .../sendouq/SQGroupRepository.server.test.ts | 2 +- .../sendouq/core/SendouQ.server.test.ts | 2 +- app/features/sendouq/core/groups.server.ts | 2 +- .../sendouq/core/ready-check.server.test.ts | 2 +- app/features/sendouq/routes/q.looking.test.ts | 2 +- app/features/sendouq/routes/q.ready.test.ts | 2 +- app/features/sendouq/tests/season-clock.ts | 2 +- app/features/team/TeamRepository.server.ts | 2 +- .../actions/t.$customUrl.edit.server.test.ts | 2 +- .../team/components/TeamGoBackButton.tsx | 2 +- .../team/routes/t.$customUrl.index.tsx | 2 +- .../actions/to.$id.admin.index.server.ts | 2 +- .../to.$id.admin.registration.server.ts | 2 +- .../routes/to.$id.admin.brackets.tsx | 2 +- .../routes/to.$id.admin.seeds.tsx | 2 +- .../BracketRepository.server.test.ts | 2 +- .../to.$id.brackets.finalize.server.ts | 2 +- .../actions/to.$id.brackets.server.test.ts | 2 +- .../actions/to.$id.brackets.server.ts | 2 +- .../components/Bracket/PlacementsTable.tsx | 2 +- .../components/BracketMapListDialog.tsx | 2 +- .../tournament-bracket/core/Bracket.test.ts | 2 +- .../core/Bracket/Bracket.ts | 2 +- .../core/Bracket/DoubleEliminationBracket.ts | 2 +- .../core/Bracket/RoundRobinBracket.ts | 2 +- .../core/Bracket/SingleEliminationBracket.ts | 2 +- .../core/Bracket/SwissBracket.ts | 2 +- .../tournament-bracket/core/PickBan.ts | 2 +- .../tournament-bracket/core/PreparedMaps.ts | 2 +- .../tournament-bracket/core/Progression.ts | 2 +- .../tournament-bracket/core/Swiss.test.ts | 2 +- .../tournament-bracket/core/Tournament.ts | 2 +- .../core/engine/create/seeding.ts | 2 +- .../core/engine/create/swiss.ts | 2 +- .../core/engine/propagation/report-result.ts | 2 +- .../core/engine/propagation/set.ts | 2 +- .../core/engine/swiss/pairing.ts | 2 +- .../core/finalizeTournament.server.ts | 2 +- .../core/summarizer.server.ts | 2 +- .../core/summarizer.test.ts | 2 +- .../to.$id.brackets.finalize.server.ts | 2 +- .../routes/to.$id.brackets.finalize.tsx | 2 +- .../TournamentLFGRepository.server.ts | 2 +- .../TournamentMatchRepository.server.ts | 2 +- .../actions/to.$id.matches.$mid.server.ts | 2 +- .../core/executeRoll.server.ts | 2 +- .../core/reportScore.server.ts | 2 +- .../TournamentRepository.permissions.test.ts | 2 +- .../tournament/TournamentRepository.server.ts | 2 +- .../TournamentTeamRepository.server.ts | 2 +- .../tournament/actions/to.$id.join.server.ts | 2 +- .../components/TournamentHeader.tsx | 2 +- .../tournament/core/Standings.test.ts | 2 +- app/features/tournament/core/Standings.ts | 2 +- .../loaders/to.$id.teams.$tid.server.ts | 2 +- .../tournament/routes/to.$id.join.tsx | 2 +- .../loaders/user-card.edit.server.ts | 2 +- .../user-page/UserRepository.server.ts | 2 +- .../user-page/routes/u.$identifier.admin.tsx | 2 +- .../user-page/routes/u.$identifier.art.tsx | 2 +- .../routes/u.$identifier.builds.new.tsx | 2 +- .../routes/u.$identifier.edit-widgets.tsx | 2 +- .../user-page/routes/u.$identifier.edit.tsx | 2 +- .../user-page/routes/u.$identifier.index.tsx | 2 +- .../routes/u.$identifier.results.tsx | 2 +- .../routes/u.$identifier.seasons.index.tsx | 2 +- .../routes/u.$identifier.seasons.stats.tsx | 2 +- .../routes/u.$identifier.seasons.tsx | 4 ++-- .../user-page/routes/u.$identifier.vods.tsx | 2 +- app/features/vods/VodRepository.server.ts | 2 +- app/modules/i18n/i18next.server.ts | 2 +- .../responsive-masonry/components/Masonry.tsx | 4 +--- .../components/ResponsiveMasonry.tsx | 2 +- .../balanced-map-list.ts | 2 +- .../tournament-map-list-generator/source.ts | 2 +- app/modules/twitch/utils.server.ts | 2 +- app/routines/closeExpiredChatRooms.test.ts | 2 +- app/utils/invariant.ts | 5 +---- biome.json | 22 +++++++++++++++++++ e2e/chat.spec.ts | 2 +- e2e/helpers/sidebar.ts | 2 +- e2e/helpers/tournament.ts | 2 +- e2e/pages/associations/associations-page.ts | 2 +- e2e/pages/builds/user-builds-page.ts | 2 +- e2e/pages/sendouq/sendouq-preparing-page.ts | 2 +- .../tier-list-maker/tier-list-maker-page.ts | 2 +- scripts/add-badge-winners.ts | 2 +- scripts/add-badge.ts | 2 +- .../add-leaderboard-teams-to-tournament.ts | 2 +- scripts/check-season-status.ts | 2 +- scripts/create-analyzer-json.ts | 2 +- scripts/create-gear-json.ts | 2 +- scripts/create-misc-json.ts | 2 +- scripts/delete-badge.ts | 2 +- scripts/delete-skill.ts | 2 +- scripts/delete-user.ts | 2 +- scripts/mass-add-tournaments-to-org.ts | 2 +- scripts/nuke-reported-weapons.ts | 2 +- scripts/placements/index.ts | 2 +- scripts/rename-badge.ts | 2 +- scripts/replace-img-names.ts | 2 +- scripts/season-initial-powers.ts | 2 +- scripts/send-test-notification.ts | 2 +- scripts/skip-plus.ts | 2 +- scripts/swap-users.ts | 2 +- scripts/unskip-plus.ts | 2 +- 198 files changed, 225 insertions(+), 204 deletions(-) diff --git a/app/components/AbilitiesSelector.tsx b/app/components/AbilitiesSelector.tsx index 7105ea58f..ac49bbf61 100644 --- a/app/components/AbilitiesSelector.tsx +++ b/app/components/AbilitiesSelector.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import * as React from "react"; import { abilities } from "~/modules/in-game-lists/abilities"; import type { BuildAbilitiesTupleWithUnknown } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { abilityImageUrl } from "~/utils/urls"; import styles from "./AbilitiesSelector.module.css"; import { Ability } from "./Ability"; diff --git a/app/components/Chart.tsx b/app/components/Chart.tsx index 634a83977..2d2325447 100644 --- a/app/components/Chart.tsx +++ b/app/components/Chart.tsx @@ -24,7 +24,7 @@ ChartJS.register( Tooltip, ); -export default function Chart({ +export function Chart({ options, containerClassName, headerSuffix, diff --git a/app/components/FormWithConfirm.tsx b/app/components/FormWithConfirm.tsx index d03d1e9b1..4f959abd0 100644 --- a/app/components/FormWithConfirm.tsx +++ b/app/components/FormWithConfirm.tsx @@ -8,7 +8,7 @@ import { } from "~/components/elements/Button"; import { SendouDialog } from "~/components/elements/Dialog"; import { useHydrated } from "~/hooks/useHydrated"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { FormMessage } from "./FormMessage"; import { SubmitButton } from "./SubmitButton"; diff --git a/app/components/TimePopover.tsx b/app/components/TimePopover.tsx index 468b4c113..b1fd8bc57 100644 --- a/app/components/TimePopover.tsx +++ b/app/components/TimePopover.tsx @@ -8,7 +8,7 @@ import { SendouAnchoredPopover } from "./elements/Popover"; import { LocaleTime } from "./LocaleTime"; import styles from "./TimePopover.module.css"; -export default function TimePopover({ +export function TimePopover({ date, options = { minute: "numeric", diff --git a/app/components/elements/useCloseOnScrollClip.browser.test.tsx b/app/components/elements/useCloseOnScrollClip.browser.test.tsx index 80f08faf4..142c8ee7f 100644 --- a/app/components/elements/useCloseOnScrollClip.browser.test.tsx +++ b/app/components/elements/useCloseOnScrollClip.browser.test.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { afterEach, describe, expect, test, vi } from "vitest"; import { render } from "vitest-browser-react"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { useCloseOnScrollClip } from "./useCloseOnScrollClip"; const PAGE_HEIGHT = 5000; diff --git a/app/components/match-page/MatchBannerScheduledTime.tsx b/app/components/match-page/MatchBannerScheduledTime.tsx index 4f9f6e7fe..4f37fc1ed 100644 --- a/app/components/match-page/MatchBannerScheduledTime.tsx +++ b/app/components/match-page/MatchBannerScheduledTime.tsx @@ -1,4 +1,4 @@ -import TimePopover from "~/components/TimePopover"; +import { TimePopover } from "~/components/TimePopover"; interface MatchBannerScheduledTimeProps { time: Date; diff --git a/app/components/match-page/MatchRosterTab.tsx b/app/components/match-page/MatchRosterTab.tsx index fe34911ba..351db1a57 100644 --- a/app/components/match-page/MatchRosterTab.tsx +++ b/app/components/match-page/MatchRosterTab.tsx @@ -14,7 +14,7 @@ import { useUserCardData, } from "~/features/user-card/components/UserCard"; import type { MainWeaponId } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { CommonUser } from "~/utils/kysely.server"; import { tierImageUrl } from "~/utils/urls"; import { SendouTabPanel } from "../elements/Tabs"; diff --git a/app/components/match-page/MatchTabs.tsx b/app/components/match-page/MatchTabs.tsx index e5bae9786..2aedcee06 100644 --- a/app/components/match-page/MatchTabs.tsx +++ b/app/components/match-page/MatchTabs.tsx @@ -2,7 +2,7 @@ import { BarChart3, Key, ScrollText, Tally5, Users } from "lucide-react"; import type * as React from "react"; import { useTranslation } from "react-i18next"; import { useSearchParam } from "~/modules/search-params/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { SendouTab, SendouTabList, SendouTabs } from "../elements/Tabs"; import styles from "./MatchTabs.module.css"; import { matchPageSearchParams } from "./match-page-search-params"; diff --git a/app/db/seed/core/SplatoonFaker.ts b/app/db/seed/core/SplatoonFaker.ts index b7ba9b759..e6d061bc7 100644 --- a/app/db/seed/core/SplatoonFaker.ts +++ b/app/db/seed/core/SplatoonFaker.ts @@ -20,7 +20,7 @@ import { canonicalWeaponSplId, mainWeaponIds, } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { faker } from "./faker"; const STACKABLE_ABILITIES = abilities diff --git a/app/db/seed/dev/calendar.ts b/app/db/seed/dev/calendar.ts index 4d0eba767..9391f62a7 100644 --- a/app/db/seed/dev/calendar.ts +++ b/app/db/seed/dev/calendar.ts @@ -1,5 +1,5 @@ import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { faker } from "../core/faker"; import * as showcaseNames from "../core/showcaseNames"; import * as CalendarEventFactory from "../factories/CalendarEventFactory"; diff --git a/app/db/seed/dev/sendouq.ts b/app/db/seed/dev/sendouq.ts index 8bdb59168..e8ee5a749 100644 --- a/app/db/seed/dev/sendouq.ts +++ b/app/db/seed/dev/sendouq.ts @@ -1,6 +1,6 @@ import { sub } from "date-fns"; import { FULL_GROUP_SIZE, SENDOUQ } from "~/features/sendouq/q-constants"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { faker } from "../core/faker"; import * as SQGroupFactory from "../factories/SQGroupFactory"; import * as SQMatchFactory from "../factories/SQMatchFactory"; diff --git a/app/db/seed/factories/PlusSuggestionFactory.ts b/app/db/seed/factories/PlusSuggestionFactory.ts index 703197ef2..aa287a087 100644 --- a/app/db/seed/factories/PlusSuggestionFactory.ts +++ b/app/db/seed/factories/PlusSuggestionFactory.ts @@ -3,7 +3,7 @@ import { nextNonCompletedVoting, rangeToMonthYear, } from "~/features/plus-voting/core"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; import { faker } from "../core/faker"; diff --git a/app/db/seed/factories/SQGroupFactory.ts b/app/db/seed/factories/SQGroupFactory.ts index c364630ca..68d23d9e1 100644 --- a/app/db/seed/factories/SQGroupFactory.ts +++ b/app/db/seed/factories/SQGroupFactory.ts @@ -1,6 +1,6 @@ import { db } from "~/db/sql"; import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; type InsertArgs = Omit< diff --git a/app/db/seed/factories/SQMatchFactory.ts b/app/db/seed/factories/SQMatchFactory.ts index d4be90c62..d49942dc6 100644 --- a/app/db/seed/factories/SQMatchFactory.ts +++ b/app/db/seed/factories/SQMatchFactory.ts @@ -1,7 +1,7 @@ import { db } from "~/db/sql"; import { SENDOUQ_BEST_OF } from "~/features/sendouq/q-constants"; import * as SQMatchRepository from "~/features/sendouq-match/SQMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { actAs } from "../core/actAs"; import { backdate } from "../core/backdate"; import { defineFactory } from "../core/defineFactory"; diff --git a/app/db/seed/factories/TeamFactory.ts b/app/db/seed/factories/TeamFactory.ts index 039e64174..64d46cd47 100644 --- a/app/db/seed/factories/TeamFactory.ts +++ b/app/db/seed/factories/TeamFactory.ts @@ -1,7 +1,7 @@ import type { UserMapModePreferences } from "~/db/tables-json"; import * as TeamRepository from "~/features/team/TeamRepository.server"; import { type MemberRole, TEAM } from "~/features/team/team-constants"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { actAs } from "../core/actAs"; import { defineFactory } from "../core/defineFactory"; import * as ImageFactory from "./ImageFactory"; diff --git a/app/db/seed/factories/TournamentFactory.ts b/app/db/seed/factories/TournamentFactory.ts index 48cbff734..7d0550a6e 100644 --- a/app/db/seed/factories/TournamentFactory.ts +++ b/app/db/seed/factories/TournamentFactory.ts @@ -17,7 +17,7 @@ import { import { resolveMatchMapList } from "~/features/tournament-match/core/mapList.server"; import { reportScore } from "~/features/tournament-match/core/reportScore.server"; import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; import { eventDefaults } from "./CalendarEventFactory"; import * as TournamentTeamFactory from "./TournamentTeamFactory"; diff --git a/app/db/seed/factories/TournamentOrganizationFactory.ts b/app/db/seed/factories/TournamentOrganizationFactory.ts index 35011db98..3ef71be75 100644 --- a/app/db/seed/factories/TournamentOrganizationFactory.ts +++ b/app/db/seed/factories/TournamentOrganizationFactory.ts @@ -1,6 +1,6 @@ import type { Tables } from "~/db/tables"; import * as TournamentOrganizationRepository from "~/features/tournament-organization/TournamentOrganizationRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; import * as ImageFactory from "./ImageFactory"; diff --git a/app/db/seed/factories/TournamentStreamerFactory.ts b/app/db/seed/factories/TournamentStreamerFactory.ts index c77dff9da..ef3b7150e 100644 --- a/app/db/seed/factories/TournamentStreamerFactory.ts +++ b/app/db/seed/factories/TournamentStreamerFactory.ts @@ -1,5 +1,5 @@ import * as LiveStreamRepository from "~/features/live-streams/LiveStreamRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; type InsertArgs = Parameters< diff --git a/app/db/seed/factories/TournamentTeamFactory.ts b/app/db/seed/factories/TournamentTeamFactory.ts index ad6ae0717..6e32952f2 100644 --- a/app/db/seed/factories/TournamentTeamFactory.ts +++ b/app/db/seed/factories/TournamentTeamFactory.ts @@ -2,7 +2,7 @@ import { addDays } from "date-fns"; import type { MapPool } from "~/features/map-list-generator/core/map-pool"; import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server"; import * as TournamentLFGRepository from "~/features/tournament-lfg/TournamentLFGRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { actAs } from "../core/actAs"; import { backdate } from "../core/backdate"; import { defineFactory } from "../core/defineFactory"; diff --git a/app/db/seed/factories/UserFactory.ts b/app/db/seed/factories/UserFactory.ts index 2d8ff2de1..cdf887d16 100644 --- a/app/db/seed/factories/UserFactory.ts +++ b/app/db/seed/factories/UserFactory.ts @@ -7,7 +7,7 @@ import { ADMIN_ID } from "~/features/admin/admin-constants"; import * as MatchProfileRepository from "~/features/match-profile/MatchProfileRepository.server"; import * as UserCardRepository from "~/features/user-card/UserCardRepository.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { ORG_ADMIN_TEST_ID, REGULAR_USER_TEST_ID, diff --git a/app/db/seed/factories/XRankPlacementFactory.ts b/app/db/seed/factories/XRankPlacementFactory.ts index cd8070cf5..0e1030b1d 100644 --- a/app/db/seed/factories/XRankPlacementFactory.ts +++ b/app/db/seed/factories/XRankPlacementFactory.ts @@ -1,5 +1,5 @@ import * as XRankPlacementRepository from "~/features/top-search/XRankPlacementRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { defineFactory } from "../core/defineFactory"; import { faker } from "../core/faker"; import * as SplatoonFaker from "../core/SplatoonFaker"; diff --git a/app/features/admin/AdminRepository.server.ts b/app/features/admin/AdminRepository.server.ts index 3d07f2461..adb89b184 100644 --- a/app/features/admin/AdminRepository.server.ts +++ b/app/features/admin/AdminRepository.server.ts @@ -7,7 +7,7 @@ import * as BuildRepository from "~/features/builds/BuildRepository.server"; import * as XRankPlacementRepository from "~/features/top-search/XRankPlacementRepository.server"; import * as TrophyRepository from "~/features/trophies/TrophyRepository.server"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; /** * For a user switching Discord accounts: moves the new account's data onto the old user and deletes diff --git a/app/features/admin/core/plus-tier.server.ts b/app/features/admin/core/plus-tier.server.ts index a67bb4eb2..e868f6405 100644 --- a/app/features/admin/core/plus-tier.server.ts +++ b/app/features/admin/core/plus-tier.server.ts @@ -3,7 +3,7 @@ import * as LeaderboardRepository from "~/features/leaderboards/LeaderboardRepos import * as Seasons from "~/features/mmr/core/Seasons"; import { seasonToVotingRange } from "~/features/plus-voting/core/voting-time"; import * as PlusVotingRepository from "~/features/plus-voting/PlusVotingRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { userIsBanned } from "../../ban/core/banned.server"; export async function plusTiersFromVotingAndLeaderboard() { diff --git a/app/features/art/art-image.server.ts b/app/features/art/art-image.server.ts index 61badc70e..fab3485dc 100644 --- a/app/features/art/art-image.server.ts +++ b/app/features/art/art-image.server.ts @@ -3,7 +3,7 @@ import { Readable } from "node:stream"; import { dataUrlToImageBuffer } from "~/features/img-upload/image-bytes.server"; import { uploadStreamToS3 } from "~/features/img-upload/s3.server"; import { shortNanoid } from "~/utils/id"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { previewUrl } from "./art-utils"; const ALLOWED_ART_IMAGE_EXTENSIONS = ["png", "jpeg", "webp"] as const; diff --git a/app/features/articles/loaders/a.$slug.server.ts b/app/features/articles/loaders/a.$slug.server.ts index 0f1640f7e..d7666feb2 100644 --- a/app/features/articles/loaders/a.$slug.server.ts +++ b/app/features/articles/loaders/a.$slug.server.ts @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "react-router"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { notFoundIfNullish } from "~/utils/remix.server"; import { articleBySlug } from "../core/bySlug.server"; diff --git a/app/features/articles/routes/a.$slug.tsx b/app/features/articles/routes/a.$slug.tsx index cf4a52987..5159b22ad 100644 --- a/app/features/articles/routes/a.$slug.tsx +++ b/app/features/articles/routes/a.$slug.tsx @@ -4,7 +4,7 @@ import { Link, useLoaderData } from "react-router"; import { LocaleTime } from "~/components/LocaleTime"; import { Main } from "~/components/Main"; import { Markdown } from "~/components/Markdown"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { ARTICLES_MAIN_PAGE, diff --git a/app/features/availability/core/Availability.ts b/app/features/availability/core/Availability.ts index ef5f2c61c..4632b8980 100644 --- a/app/features/availability/core/Availability.ts +++ b/app/features/availability/core/Availability.ts @@ -14,7 +14,7 @@ import { databaseTimestampToJavascriptTimestamp, dateToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { AVAILABILITY } from "../availability-constants"; import type { BusyBlock, diff --git a/app/features/availability/routes/t.$customUrl.schedule.tsx b/app/features/availability/routes/t.$customUrl.schedule.tsx index 2c9b292b5..415645137 100644 --- a/app/features/availability/routes/t.$customUrl.schedule.tsx +++ b/app/features/availability/routes/t.$customUrl.schedule.tsx @@ -36,7 +36,7 @@ import { useDateTimeFormat } from "~/hooks/intl/useDateTimeFormat"; import { useHasPermission } from "~/modules/permissions/hooks"; import { useSearchParamsTyped } from "~/modules/search-params/hooks"; import { databaseTimestampToDate } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { EVENTS_PAGE } from "~/utils/urls"; import { action } from "../actions/t.$customUrl.schedule.server"; diff --git a/app/features/badges/BadgeRepository.server.ts b/app/features/badges/BadgeRepository.server.ts index 3d7e6ee2c..f63b76d0f 100644 --- a/app/features/badges/BadgeRepository.server.ts +++ b/app/features/badges/BadgeRepository.server.ts @@ -2,7 +2,7 @@ import type { ExpressionBuilder, NotNull } from "kysely"; import { db } from "~/db/sql"; import type { DB, TablesInsertable } from "~/db/tables"; import { sortBadgesByFavorites } from "~/features/user-page/core/badge-sorting.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, jsonArrayFrom, diff --git a/app/features/build-analyzer/core/ability-points.ts b/app/features/build-analyzer/core/ability-points.ts index 3d69f3543..69792228d 100644 --- a/app/features/build-analyzer/core/ability-points.ts +++ b/app/features/build-analyzer/core/ability-points.ts @@ -4,7 +4,7 @@ import type { AbilityWithUnknown, BuildAbilitiesTupleWithUnknown, } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { MAIN_SLOT_AP, SUB_SLOT_AP } from "../analyzer-constants"; import type { AbilityPoints } from "../analyzer-types"; diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index 89e4e4416..aa202ad8f 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -22,7 +22,7 @@ import { TORPEDO_ID, ZIPCASTER_ID, } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { cutToNDecimalPlaces, roundToNDecimalPlaces } from "~/utils/number"; import { assertUnreachable } from "~/utils/types"; import { diff --git a/app/features/build-analyzer/core/utils.ts b/app/features/build-analyzer/core/utils.ts index 747bfd8be..148340fa9 100644 --- a/app/features/build-analyzer/core/utils.ts +++ b/app/features/build-analyzer/core/utils.ts @@ -5,7 +5,7 @@ import type { SpecialWeaponId, } from "~/modules/in-game-lists/types"; import { weaponIdToBaseWeaponId } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Unpacked } from "~/utils/types"; import type { AbilityPoints, diff --git a/app/features/build-analyzer/routes/analyzer.tsx b/app/features/build-analyzer/routes/analyzer.tsx index ec0449553..68191debb 100644 --- a/app/features/build-analyzer/routes/analyzer.tsx +++ b/app/features/build-analyzer/routes/analyzer.tsx @@ -7,7 +7,7 @@ import { Link } from "react-router"; import * as R from "remeda"; import { AbilitiesSelector } from "~/components/AbilitiesSelector"; import { Ability } from "~/components/Ability"; -import Chart from "~/components/Chart"; +import { Chart } from "~/components/Chart"; import { SendouSwitch } from "~/components/elements/Switch"; import { SendouTab, @@ -45,7 +45,7 @@ import { TOXIC_MIST_ID, } from "~/modules/in-game-lists/weapon-ids"; import { nullFilledArray } from "~/utils/arrays"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { diff --git a/app/features/build-stats/build-stats-utils.ts b/app/features/build-stats/build-stats-utils.ts index 270762349..ea4124439 100644 --- a/app/features/build-stats/build-stats-utils.ts +++ b/app/features/build-stats/build-stats-utils.ts @@ -1,6 +1,6 @@ import { abilities } from "~/modules/in-game-lists/abilities"; import type { Ability } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { roundToNDecimalPlaces } from "~/utils/number"; import { MAX_AP } from "../build-analyzer/analyzer-constants"; import { isStackableAbility } from "../build-analyzer/core/ability-points"; diff --git a/app/features/builds/BuildRepository.server.ts b/app/features/builds/BuildRepository.server.ts index ef37aa191..286e18ea9 100644 --- a/app/features/builds/BuildRepository.server.ts +++ b/app/features/builds/BuildRepository.server.ts @@ -11,7 +11,7 @@ import type { import { canonicalWeaponSplId } from "~/modules/in-game-lists/weapon-ids"; import { dateToDatabaseTimestamp } from "~/utils/dates"; import { LimitReachedError } from "~/utils/errors"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserJsonObject, jsonArrayFrom } from "~/utils/kysely.server"; import { MAIN_SLOT_AP } from "../build-analyzer/analyzer-constants"; import { diff --git a/app/features/calendar/CalendarRepository.server.ts b/app/features/calendar/CalendarRepository.server.ts index 1926e14e9..acfabd56d 100644 --- a/app/features/calendar/CalendarRepository.server.ts +++ b/app/features/calendar/CalendarRepository.server.ts @@ -22,7 +22,7 @@ import { databaseTimestampToJavascriptTimestamp, dateToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, concatUserSubmittedImagePrefix, diff --git a/app/features/calendar/actions/calendar.new.server.test.ts b/app/features/calendar/actions/calendar.new.server.test.ts index d7e02349d..08c4b4ec1 100644 --- a/app/features/calendar/actions/calendar.new.server.test.ts +++ b/app/features/calendar/actions/calendar.new.server.test.ts @@ -5,7 +5,7 @@ import * as TournamentFactory from "~/db/seed/factories/TournamentFactory"; import * as TournamentOrganizationFactory from "~/db/seed/factories/TournamentOrganizationFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import * as CalendarRepository from "~/features/calendar/CalendarRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { wrappedAction } from "~/utils/Test"; import type { calendarNewSchemaServer } from "../calendar-new-schemas.server"; import { defaultBracketsFormValues } from "../calendar-progression-form"; diff --git a/app/features/chat/ChatRepository.server.test.ts b/app/features/chat/ChatRepository.server.test.ts index e27b39b2e..595b2c24f 100644 --- a/app/features/chat/ChatRepository.server.test.ts +++ b/app/features/chat/ChatRepository.server.test.ts @@ -5,7 +5,7 @@ import * as ChatRoomFactory from "~/db/seed/factories/ChatRoomFactory"; import * as SQGroupFactory from "~/db/seed/factories/SQGroupFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as ChatRepository from "./ChatRepository.server"; const users = UserFactory.pool(); diff --git a/app/features/chat/ChatRoomResolver.server.test.ts b/app/features/chat/ChatRoomResolver.server.test.ts index 2a5e55d07..565c8fc3b 100644 --- a/app/features/chat/ChatRoomResolver.server.test.ts +++ b/app/features/chat/ChatRoomResolver.server.test.ts @@ -12,7 +12,7 @@ import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server" import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; import { hasPermission } from "~/modules/permissions/utils"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as ChatRepository from "./ChatRepository.server"; import * as ChatRoomResolver from "./ChatRoomResolver.server"; import { setupSqMatch } from "./tests/fixtures"; diff --git a/app/features/chat/ChatSystemMessage.server.ts b/app/features/chat/ChatSystemMessage.server.ts index 5a49249aa..ac5edb40c 100644 --- a/app/features/chat/ChatSystemMessage.server.ts +++ b/app/features/chat/ChatSystemMessage.server.ts @@ -2,7 +2,7 @@ import * as R from "remeda"; import { actorIdOrNullSafe } from "~/features/auth/core/user.server"; import * as EventBus from "~/features/events/core/EventBus.server"; import { chatRoomChannel, userChannel } from "~/features/events/events-types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import * as ChatRepository from "./ChatRepository.server"; import * as ChatRoomResolver from "./ChatRoomResolver.server"; diff --git a/app/features/chat/routes/api.chat.rooms.$id.messages.ts b/app/features/chat/routes/api.chat.rooms.$id.messages.ts index 792c64173..768cb07c8 100644 --- a/app/features/chat/routes/api.chat.rooms.$id.messages.ts +++ b/app/features/chat/routes/api.chat.rooms.$id.messages.ts @@ -3,7 +3,7 @@ import { requireUser } from "~/features/auth/core/user.server"; import * as EventBus from "~/features/events/core/EventBus.server"; import { chatRoomChannel, userChannel } from "~/features/events/events-types"; import { parseFormData } from "~/form/parse.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { badRequestIfFalsy, parseParams } from "~/utils/remix.server"; import { idObject } from "~/utils/schema"; import * as ChatRepository from "../ChatRepository.server"; diff --git a/app/features/events/routes/sse.$connectionId.topics.ts b/app/features/events/routes/sse.$connectionId.topics.ts index c70ccf1eb..3300eb3ee 100644 --- a/app/features/events/routes/sse.$connectionId.topics.ts +++ b/app/features/events/routes/sse.$connectionId.topics.ts @@ -1,7 +1,7 @@ import type { ActionFunctionArgs } from "react-router"; import * as v from "valibot"; import { requireUser } from "~/features/auth/core/user.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { parseRequestPayload } from "~/utils/remix.server"; import * as SseConnections from "../core/SseConnections.server"; import * as TopicAccess from "../core/TopicAccess.server"; diff --git a/app/features/img-upload/image-bytes.server.ts b/app/features/img-upload/image-bytes.server.ts index 9be02c18c..735e394f2 100644 --- a/app/features/img-upload/image-bytes.server.ts +++ b/app/features/img-upload/image-bytes.server.ts @@ -1,4 +1,4 @@ -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; export type ImageExtension = "webp" | "png" | "jpeg"; diff --git a/app/features/img-upload/image-field.server.ts b/app/features/img-upload/image-field.server.ts index 7db1874f8..8ad619be9 100644 --- a/app/features/img-upload/image-field.server.ts +++ b/app/features/img-upload/image-field.server.ts @@ -4,7 +4,7 @@ import type { AuthenticatedUser } from "~/features/auth/core/user.server"; import type { ImageFieldValue } from "~/form/image-field"; import { dateToDatabaseTimestamp } from "~/utils/dates"; import { shortNanoid } from "~/utils/id"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { errorToastIfFalsy } from "~/utils/remix.server"; import * as ImageRepository from "./ImageRepository.server"; import { dataUrlToImageBuffer } from "./image-bytes.server"; diff --git a/app/features/leaderboards/components/TopTenPlayer.tsx b/app/features/leaderboards/components/TopTenPlayer.tsx index bee3653b1..7187a8033 100644 --- a/app/features/leaderboards/components/TopTenPlayer.tsx +++ b/app/features/leaderboards/components/TopTenPlayer.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import { Flag } from "~/components/Flag"; import { Image } from "~/components/Image"; import { Placement } from "~/components/Placement"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { winnersImageUrl } from "~/utils/urls"; import playerData from "../top-ten.json"; import styles from "./TopTenPlayer.module.css"; diff --git a/app/features/map-list-generator/core/MapList.ts b/app/features/map-list-generator/core/MapList.ts index 74cf85c82..2bedbcc08 100644 --- a/app/features/map-list-generator/core/MapList.ts +++ b/app/features/map-list-generator/core/MapList.ts @@ -5,7 +5,7 @@ import type { ModeWithStage, StageId, } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { err, ok, unwrapOr } from "~/utils/result"; import type { MapPool } from "./map-pool"; import type { ReadonlyMapPoolObject } from "./map-pool-serializer/types"; diff --git a/app/features/map-list-generator/core/map-pool-serializer/serializer.ts b/app/features/map-list-generator/core/map-pool-serializer/serializer.ts index 5c475f71e..55b8cc6d9 100644 --- a/app/features/map-list-generator/core/map-pool-serializer/serializer.ts +++ b/app/features/map-list-generator/core/map-pool-serializer/serializer.ts @@ -1,4 +1,4 @@ -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { modesShort } from "../../../../modules/in-game-lists/modes"; import { stageIds } from "../../../../modules/in-game-lists/stage-ids"; import type { StageId } from "../../../../modules/in-game-lists/types"; diff --git a/app/features/map-list-generator/routes/maps.tsx b/app/features/map-list-generator/routes/maps.tsx index 72708d26c..bef327b35 100644 --- a/app/features/map-list-generator/routes/maps.tsx +++ b/app/features/map-list-generator/routes/maps.tsx @@ -12,7 +12,7 @@ import { useCopyToClipboard } from "~/hooks/useCopyToClipboard"; import { stageIds } from "~/modules/in-game-lists/stage-ids"; import type { ModeWithStage } from "~/modules/in-game-lists/types"; import { useSearchParamsTyped } from "~/modules/search-params/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { metaTags, ogPageImage } from "~/utils/remix"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { ipLabsMaps, MAPS_URL, navIconUrl } from "~/utils/urls"; diff --git a/app/features/map-planner/components/Planner.tsx b/app/features/map-planner/components/Planner.tsx index 36391a743..fc6ccd668 100644 --- a/app/features/map-planner/components/Planner.tsx +++ b/app/features/map-planner/components/Planner.tsx @@ -91,7 +91,7 @@ const TLDRAW_OPTIONS: Partial = { const MAIN_WEAPON_URL_PATTERN = /main-weapons-outlined\/(\d+)/; const SPECIAL_WEAPON_URL_PATTERN = /special-weapons\/(\d+)/; -export default function Planner() { +export function Planner() { const { t, i18n } = useTranslation(["common"]); const { htmlThemeClass } = useTheme(); diff --git a/app/features/map-planner/routes/plans.tsx b/app/features/map-planner/routes/plans.tsx index 8d362abbe..a05a887e2 100644 --- a/app/features/map-planner/routes/plans.tsx +++ b/app/features/map-planner/routes/plans.tsx @@ -28,7 +28,11 @@ export const handle: SendouRouteHandle = { }), }; -const Planner = lazy(() => import("~/features/map-planner/components/Planner")); +const Planner = lazy(() => + import("~/features/map-planner/components/Planner").then((module) => ({ + default: module.Planner, + })), +); export default function MapPlannerPage() { const isHydrated = useHydrated(); diff --git a/app/features/mmr/mmr-utils.server.ts b/app/features/mmr/mmr-utils.server.ts index 376b6326d..f33bf18b1 100644 --- a/app/features/mmr/mmr-utils.server.ts +++ b/app/features/mmr/mmr-utils.server.ts @@ -1,6 +1,6 @@ import { rating } from "openskill"; import type { Tables } from "~/db/tables"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { identifierToUserIds, type SkillTeamIdentifier } from "./mmr-utils"; import * as SkillRepository from "./SkillRepository.server"; diff --git a/app/features/mmr/mmr-utils.ts b/app/features/mmr/mmr-utils.ts index c470491b9..5741c00bf 100644 --- a/app/features/mmr/mmr-utils.ts +++ b/app/features/mmr/mmr-utils.ts @@ -5,7 +5,7 @@ import { rating, type Team, } from "openskill"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { TierName } from "./mmr-constants"; import { SP_BASE, SP_PER_ORDINAL, TIERS } from "./mmr-constants"; diff --git a/app/features/notifications/core/notify.server.test.ts b/app/features/notifications/core/notify.server.test.ts index d91f115b0..8fa41a216 100644 --- a/app/features/notifications/core/notify.server.test.ts +++ b/app/features/notifications/core/notify.server.test.ts @@ -22,7 +22,7 @@ vi.mock("./webPush.server", () => ({ get webPushEnabled() { return mockWebPushEnabled.value; }, - default: { + webPush: { sendNotification: mockSendNotification, }, })); diff --git a/app/features/notifications/core/notify.server.ts b/app/features/notifications/core/notify.server.ts index 65cfc4b22..7df7bfb0c 100644 --- a/app/features/notifications/core/notify.server.ts +++ b/app/features/notifications/core/notify.server.ts @@ -10,7 +10,7 @@ import { logger } from "../../../utils/logger"; import * as NotificationRepository from "../NotificationRepository.server"; import type { Notification } from "../notifications-types"; import { notificationLink, notificationMeta } from "../notifications-utils"; -import webPush, { webPushEnabled } from "./webPush.server"; +import { webPush, webPushEnabled } from "./webPush.server"; const NOTIFICATION_URGENCY: Record = { SQ_ADDED_TO_GROUP: "high", diff --git a/app/features/notifications/core/webPush.server.ts b/app/features/notifications/core/webPush.server.ts index 095a4856d..400ab6275 100644 --- a/app/features/notifications/core/webPush.server.ts +++ b/app/features/notifications/core/webPush.server.ts @@ -20,4 +20,4 @@ if ( logger.info("VAPID env vars not set, push notifications will not work"); } -export default webPush; +export { webPush }; diff --git a/app/features/object-damage-calculator/core/objectDamage.ts b/app/features/object-damage-calculator/core/objectDamage.ts index 3cb853cf3..09c2b1f1f 100644 --- a/app/features/object-damage-calculator/core/objectDamage.ts +++ b/app/features/object-damage-calculator/core/objectDamage.ts @@ -12,7 +12,7 @@ import type { SubWeaponId, } from "~/modules/in-game-lists/types"; import { weaponIdToBaseWeaponId } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { roundToNDecimalPlaces } from "~/utils/number"; import { DAMAGE_RECEIVERS, diff --git a/app/features/object-damage-calculator/core/objectHitPoints.ts b/app/features/object-damage-calculator/core/objectHitPoints.ts index d533d5e02..488fb5c1e 100644 --- a/app/features/object-damage-calculator/core/objectHitPoints.ts +++ b/app/features/object-damage-calculator/core/objectHitPoints.ts @@ -18,7 +18,7 @@ import { CRAB_TANK_ID, SPLASH_WALL_ID, } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { HitPoints } from "../calculator-types"; const WAVE_BREAKER_HP = 480; diff --git a/app/features/plus-suggestions/actions/plus.suggestions.server.ts b/app/features/plus-suggestions/actions/plus.suggestions.server.ts index 9bafdef4f..64b99ed2b 100644 --- a/app/features/plus-suggestions/actions/plus.suggestions.server.ts +++ b/app/features/plus-suggestions/actions/plus.suggestions.server.ts @@ -9,7 +9,7 @@ import { } from "~/features/plus-voting/core"; import { parseFormData } from "~/form/parse.server"; import { requirePermission } from "~/modules/permissions/guards.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { badRequestIfFalsy } from "~/utils/remix.server"; import { assertUnreachable } from "~/utils/types"; import { suggestionActionSchema } from "../plus-suggestions-schemas"; diff --git a/app/features/plus-voting/PlusVotingRepository.server.ts b/app/features/plus-voting/PlusVotingRepository.server.ts index b44e1541a..8689cc22d 100644 --- a/app/features/plus-voting/PlusVotingRepository.server.ts +++ b/app/features/plus-voting/PlusVotingRepository.server.ts @@ -8,7 +8,7 @@ import { nextNonCompletedVoting, rangeToMonthYear, } from "~/features/plus-voting/core"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect } from "~/utils/kysely.server"; import type { Unwrapped } from "~/utils/types"; import * as PlusVoting from "./core/PlusVoting"; diff --git a/app/features/plus-voting/actions/plus.voting.server.ts b/app/features/plus-voting/actions/plus.voting.server.ts index 917c75645..3801f5fb1 100644 --- a/app/features/plus-voting/actions/plus.voting.server.ts +++ b/app/features/plus-voting/actions/plus.voting.server.ts @@ -9,7 +9,7 @@ import { import { isVotingOpen } from "~/features/plus-voting/core/voting-time"; import * as PlusVotingRepository from "~/features/plus-voting/PlusVotingRepository.server"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { badRequestIfFalsy, parseRequestPayload } from "~/utils/remix.server"; import { PLUS_UPVOTE } from "../plus-voting-constants"; import { votingActionSchema } from "../plus-voting-schemas"; diff --git a/app/features/plus-voting/core/usePlusVoting.ts b/app/features/plus-voting/core/usePlusVoting.ts index 10c54fa95..ba4dc288e 100644 --- a/app/features/plus-voting/core/usePlusVoting.ts +++ b/app/features/plus-voting/core/usePlusVoting.ts @@ -2,7 +2,7 @@ import * as React from "react"; import type { Tables } from "~/db/tables"; import type * as PlusVotingRepository from "~/features/plus-voting/PlusVotingRepository.server"; import { useHydrated } from "~/hooks/useHydrated"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { PLUS_DOWNVOTE, PLUS_UPVOTE } from "../plus-voting-constants"; import type { PlusVoteFromFE } from "./types"; diff --git a/app/features/plus-voting/loaders/plus.voting.results.server.ts b/app/features/plus-voting/loaders/plus.voting.results.server.ts index 3ba4eca6e..9bce0e91c 100644 --- a/app/features/plus-voting/loaders/plus.voting.results.server.ts +++ b/app/features/plus-voting/loaders/plus.voting.results.server.ts @@ -2,7 +2,7 @@ import { getUser } from "~/features/auth/core/user.server"; import { lastCompletedVoting } from "~/features/plus-voting/core"; import * as PlusVotingRepository from "~/features/plus-voting/PlusVotingRepository.server"; import { isSupporter } from "~/modules/permissions/utils"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { UserWithPlusTier } from "~/utils/kysely.server"; import { roundToNDecimalPlaces } from "~/utils/number"; diff --git a/app/features/scanner-ingest/tests/harness.ts b/app/features/scanner-ingest/tests/harness.ts index 521713471..f1fc3b3ae 100644 --- a/app/features/scanner-ingest/tests/harness.ts +++ b/app/features/scanner-ingest/tests/harness.ts @@ -26,7 +26,7 @@ import type { StageId, } from "~/modules/in-game-lists/types"; import { databaseTimestampToJavascriptTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { wrappedAction, wrappedLoader } from "~/utils/Test"; import { action } from "../actions/scanner-ingest.server"; import type { diff --git a/app/features/scanner/tests/ability-harvest.test.ts b/app/features/scanner/tests/ability-harvest.test.ts index 48d6b9b7b..4b84a6312 100644 --- a/app/features/scanner/tests/ability-harvest.test.ts +++ b/app/features/scanner/tests/ability-harvest.test.ts @@ -20,7 +20,7 @@ import { } from "../core/detectors/death/index"; import { SCOREBOARD_EVENT_TYPE } from "../core/detectors/scoreboard/index"; import type { DetectedEvent } from "../core/detectors/types"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; const GRID_A: AbilityWithUnknown[][] = [ ["ISM", "ISM", "ISM", "ISM"], diff --git a/app/features/scanner/tests/banner.test.ts b/app/features/scanner/tests/banner.test.ts index 83d78a97a..c1ae05e8c 100644 --- a/app/features/scanner/tests/banner.test.ts +++ b/app/features/scanner/tests/banner.test.ts @@ -5,7 +5,7 @@ import { type BannerScoreRead, resolveMatchScores, } from "../core/detectors/scoreboard/banner"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; function read(value: number | null, confidence = 0.9): BannerScoreRead { return { diff --git a/app/features/scanner/tests/logic/dedupe-events.test.ts b/app/features/scanner/tests/logic/dedupe-events.test.ts index 1bc72fddc..ce5d779d5 100644 --- a/app/features/scanner/tests/logic/dedupe-events.test.ts +++ b/app/features/scanner/tests/logic/dedupe-events.test.ts @@ -13,7 +13,7 @@ import type { } from "../../core/detectors/minimap/index"; import { SPECTATOR_SLOTS } from "../../core/detectors/minimap/rois"; import type { DetectedEvent } from "../../core/detectors/types"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; const ALPHA: MainWeaponId[] = [40, 1001, 2010, 3030]; const BRAVO: MainWeaponId[] = [50, 210, 4010, 8000]; diff --git a/app/features/scanner/tests/logic/frame-queue.test.ts b/app/features/scanner/tests/logic/frame-queue.test.ts index 57e4e9702..419186269 100644 --- a/app/features/scanner/tests/logic/frame-queue.test.ts +++ b/app/features/scanner/tests/logic/frame-queue.test.ts @@ -6,7 +6,7 @@ import assert from "node:assert/strict"; import { frameEvictionIndex } from "../../worker/frame-queue"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; test("evicts the oldest of a backlog too short to thin", () => { assert.equal(frameEvictionIndex([]), 0); diff --git a/app/features/scanner/tests/logic/match-builder.test.ts b/app/features/scanner/tests/logic/match-builder.test.ts index 2182fb6c0..8954438e3 100644 --- a/app/features/scanner/tests/logic/match-builder.test.ts +++ b/app/features/scanner/tests/logic/match-builder.test.ts @@ -25,7 +25,7 @@ import { invalidObjectiveEvents, } from "../../core/match-builder"; import type { ScannerLobby } from "../../scanner-types"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; const NAMES = ["w1", "w2", "w3", "w4", "l1", "l2", "l3", "l4"]; const ALPHA: MainWeaponId[] = [40, 1001, 2010, 3030]; diff --git a/app/features/scanner/tests/logic/match-sets.test.ts b/app/features/scanner/tests/logic/match-sets.test.ts index bdf1e1ed6..2ea04bc7c 100644 --- a/app/features/scanner/tests/logic/match-sets.test.ts +++ b/app/features/scanner/tests/logic/match-sets.test.ts @@ -4,7 +4,7 @@ import type { ScannerMatch, ScannerMatchPlayer, } from "../../core/scanner-match"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; const TEAM_A = ["Sendou", "Kiver", "Brian", "Zed"]; const TEAM_B = ["Gos", "Noah", "Alice", "Bob"]; diff --git a/app/features/scanner/tests/logic/scheduler.test.ts b/app/features/scanner/tests/logic/scheduler.test.ts index 6312cef3b..0b60d8bf2 100644 --- a/app/features/scanner/tests/logic/scheduler.test.ts +++ b/app/features/scanner/tests/logic/scheduler.test.ts @@ -8,7 +8,7 @@ import { DetectorScheduler, type SchedulingInfo, } from "../../core/detectors/scheduler"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; const OPTS = { refineIntervalS: 0.1, diff --git a/app/features/scanner/tests/map-start.test.ts b/app/features/scanner/tests/map-start.test.ts index 8978d0799..487ff5b9b 100644 --- a/app/features/scanner/tests/map-start.test.ts +++ b/app/features/scanner/tests/map-start.test.ts @@ -19,7 +19,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/minimap.test.ts b/app/features/scanner/tests/minimap.test.ts index 89d1d4c14..08cbd8960 100644 --- a/app/features/scanner/tests/minimap.test.ts +++ b/app/features/scanner/tests/minimap.test.ts @@ -23,7 +23,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/node-test-compat.ts b/app/features/scanner/tests/node-test-compat.ts index 13079375d..2c0b7b7df 100644 --- a/app/features/scanner/tests/node-test-compat.ts +++ b/app/features/scanner/tests/node-test-compat.ts @@ -17,7 +17,7 @@ export interface CompatTestContext { ): Promise; } -export default function test( +export function test( name: string, fn: (t: CompatTestContext) => void | Promise, ): void { diff --git a/app/features/scanner/tests/objective.test.ts b/app/features/scanner/tests/objective.test.ts index 8d98d5f45..d4515869e 100644 --- a/app/features/scanner/tests/objective.test.ts +++ b/app/features/scanner/tests/objective.test.ts @@ -25,7 +25,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/opencv-smoke.test.ts b/app/features/scanner/tests/opencv-smoke.test.ts index 2c2308263..28793508d 100644 --- a/app/features/scanner/tests/opencv-smoke.test.ts +++ b/app/features/scanner/tests/opencv-smoke.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { loadOpenCV, minMaxLoc } from "../core/cv"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; test("opencv.js loads in Node and matchTemplate works", async () => { const cv = await loadOpenCV(); diff --git a/app/features/scanner/tests/player-status.test.ts b/app/features/scanner/tests/player-status.test.ts index e27649a25..215af7e39 100644 --- a/app/features/scanner/tests/player-status.test.ts +++ b/app/features/scanner/tests/player-status.test.ts @@ -27,7 +27,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/replay-time.test.ts b/app/features/scanner/tests/replay-time.test.ts index cc332094a..84e635412 100644 --- a/app/features/scanner/tests/replay-time.test.ts +++ b/app/features/scanner/tests/replay-time.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import { parseReplayTimestamp } from "../core/replay-time"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; /** Expected epoch for a local wall time — timezone-independent comparison. */ function local( diff --git a/app/features/scanner/tests/scoreboard-battle-log.test.ts b/app/features/scanner/tests/scoreboard-battle-log.test.ts index 96c621fda..8d214f16e 100644 --- a/app/features/scanner/tests/scoreboard-battle-log.test.ts +++ b/app/features/scanner/tests/scoreboard-battle-log.test.ts @@ -21,7 +21,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const detector = createScoreboardBattleLogDetector( diff --git a/app/features/scanner/tests/scoreboard-own.test.ts b/app/features/scanner/tests/scoreboard-own.test.ts index a55f000e5..354be51c3 100644 --- a/app/features/scanner/tests/scoreboard-own.test.ts +++ b/app/features/scanner/tests/scoreboard-own.test.ts @@ -21,7 +21,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/scoreboard.test.ts b/app/features/scanner/tests/scoreboard.test.ts index 4eceb8884..1fae3e6d1 100644 --- a/app/features/scanner/tests/scoreboard.test.ts +++ b/app/features/scanner/tests/scoreboard.test.ts @@ -18,7 +18,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const detector = createScoreboardDetector(await loadScoreboardResources()); diff --git a/app/features/scanner/tests/sendou-upload.test.ts b/app/features/scanner/tests/sendou-upload.test.ts index 4135fdb77..19dab721b 100644 --- a/app/features/scanner/tests/sendou-upload.test.ts +++ b/app/features/scanner/tests/sendou-upload.test.ts @@ -5,7 +5,7 @@ import { sendouUpload } from "../components/sendou-upload"; import type { MinimapData } from "../core/detectors/minimap/index"; import type { ScoreboardData } from "../core/detectors/scoreboard/index"; import type { DetectedEvent } from "../core/detectors/types"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; const ALPHA: MainWeaponId[] = [40, 1001, 2010, 3030]; const BRAVO: MainWeaponId[] = [50, 210, 4010, 8000]; diff --git a/app/features/scanner/tests/strip-weapons.test.ts b/app/features/scanner/tests/strip-weapons.test.ts index 6360cb624..21595cf7e 100644 --- a/app/features/scanner/tests/strip-weapons.test.ts +++ b/app/features/scanner/tests/strip-weapons.test.ts @@ -24,7 +24,7 @@ import { runDetectorOnFixture, } from "../node/fixtures"; import { loadScoreboardResources } from "../node/resources"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; await loadOpenCV(); const resources = await loadScoreboardResources(); diff --git a/app/features/scanner/tests/suites/death.ts b/app/features/scanner/tests/suites/death.ts index 34a525f2a..aecf17e26 100644 --- a/app/features/scanner/tests/suites/death.ts +++ b/app/features/scanner/tests/suites/death.ts @@ -21,7 +21,7 @@ import { runDetectorOnFixture, } from "../../node/fixtures"; import { loadScoreboardResources } from "../../node/resources"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; export async function runDeathSuite( shard: number, diff --git a/app/features/scanner/tests/suites/scoreboard-battle-log-replay.ts b/app/features/scanner/tests/suites/scoreboard-battle-log-replay.ts index 66aecbf47..0d2a24e58 100644 --- a/app/features/scanner/tests/suites/scoreboard-battle-log-replay.ts +++ b/app/features/scanner/tests/suites/scoreboard-battle-log-replay.ts @@ -21,7 +21,7 @@ import { runDetectorOnFixture, } from "../../node/fixtures"; import { loadScoreboardResources } from "../../node/resources"; -import test from "../node-test-compat"; +import { test } from "../node-test-compat"; export async function runScoreboardBattleLogReplaySuite( shard: number, diff --git a/app/features/scanner/tests/timeline.test.ts b/app/features/scanner/tests/timeline.test.ts index e1ae4da0f..0d7460aa2 100644 --- a/app/features/scanner/tests/timeline.test.ts +++ b/app/features/scanner/tests/timeline.test.ts @@ -2,7 +2,7 @@ import assert from "node:assert/strict"; import type { ScoreboardData } from "../core/detectors/scoreboard/index"; import type { DetectedEvent } from "../core/detectors/types"; import { TimelineBuilder } from "../core/timeline/index"; -import test from "./node-test-compat"; +import { test } from "./node-test-compat"; function event( t: number, diff --git a/app/features/scrims/ScrimPostRepository.server.ts b/app/features/scrims/ScrimPostRepository.server.ts index 7a530392a..f3bdbb02b 100644 --- a/app/features/scrims/ScrimPostRepository.server.ts +++ b/app/features/scrims/ScrimPostRepository.server.ts @@ -21,7 +21,7 @@ import { tournamentLogoWithDefault, } from "~/utils/kysely.server"; import { db } from "../../db/sql"; -import invariant from "../../utils/invariant"; +import { invariant } from "../../utils/invariant"; import type { Unwrapped } from "../../utils/types"; import type { AssociationVisibility } from "../associations/associations-types"; import * as Scrim from "./core/Scrim"; diff --git a/app/features/scrims/actions/scrims.new.server.ts b/app/features/scrims/actions/scrims.new.server.ts index 3fcf454e0..f16c0bbfc 100644 --- a/app/features/scrims/actions/scrims.new.server.ts +++ b/app/features/scrims/actions/scrims.new.server.ts @@ -6,7 +6,7 @@ import { userIsBanned } from "~/features/ban/core/banned.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; import { parseFormData } from "~/form/parse.server"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { errorToast, errorToastIfFalsy } from "~/utils/remix.server"; import { toDBBoolean } from "~/utils/sql"; import { scrimsPage } from "~/utils/urls"; diff --git a/app/features/scrims/components/ScrimCard.tsx b/app/features/scrims/components/ScrimCard.tsx index f53c71bfd..07bf26a3e 100644 --- a/app/features/scrims/components/ScrimCard.tsx +++ b/app/features/scrims/components/ScrimCard.tsx @@ -22,7 +22,7 @@ import { FormWithConfirm } from "~/components/FormWithConfirm"; import { ModeImage } from "~/components/Image"; import { LocaleTime } from "~/components/LocaleTime"; import { NoteAvatar } from "~/components/NoteAvatar"; -import TimePopover from "~/components/TimePopover"; +import { TimePopover } from "~/components/TimePopover"; import { useUser } from "~/features/auth/core/user"; import { UserCard, diff --git a/app/features/sendouq-match/SQMatchRepository.server.test.ts b/app/features/sendouq-match/SQMatchRepository.server.test.ts index 8404d3882..78e326934 100644 --- a/app/features/sendouq-match/SQMatchRepository.server.test.ts +++ b/app/features/sendouq-match/SQMatchRepository.server.test.ts @@ -15,7 +15,7 @@ import { import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server"; import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; import type { TournamentSummary } from "~/features/tournament-bracket/core/summarizer.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { withUserId } from "~/utils/Test"; import * as SQMatchRepository from "./SQMatchRepository.server"; diff --git a/app/features/sendouq-match/SQMatchRepository.server.ts b/app/features/sendouq-match/SQMatchRepository.server.ts index 65660a584..f70c49ddc 100644 --- a/app/features/sendouq-match/SQMatchRepository.server.ts +++ b/app/features/sendouq-match/SQMatchRepository.server.ts @@ -27,7 +27,7 @@ import { databaseTimestampToDate, dateToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, concatUserSubmittedImagePrefix, diff --git a/app/features/sendouq-match/components/SendouQMatchBanner.tsx b/app/features/sendouq-match/components/SendouQMatchBanner.tsx index ccd7f4b49..6958c4b33 100644 --- a/app/features/sendouq-match/components/SendouQMatchBanner.tsx +++ b/app/features/sendouq-match/components/SendouQMatchBanner.tsx @@ -19,7 +19,7 @@ import { useUser } from "~/features/auth/core/user"; import { SENDOUQ_BEST_OF } from "~/features/sendouq/q-constants"; import { useAutoRerender } from "~/hooks/useAutoRerender"; import { databaseTimestampToDate } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { resolveGroupNames } from "../core/match-timeline"; import * as SendouQMatch from "../core/SendouQMatch"; import type { SendouQMatchLoaderData } from "../loaders/q.match.$id.server"; diff --git a/app/features/sendouq-match/core/discord-webhook.server.ts b/app/features/sendouq-match/core/discord-webhook.server.ts index df58fe41d..1559f6ea5 100644 --- a/app/features/sendouq-match/core/discord-webhook.server.ts +++ b/app/features/sendouq-match/core/discord-webhook.server.ts @@ -5,7 +5,7 @@ import { userPageLink, type WebhookUser, } from "~/modules/discord-webhook.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { SENDOU_INK_BASE_URL, sendouQMatchPage } from "~/utils/urls"; type MatchMember = WebhookUser & { id: number }; diff --git a/app/features/sendouq/SQGroupRepository.server.test.ts b/app/features/sendouq/SQGroupRepository.server.test.ts index 1ba26cf0c..3afe2c3d7 100644 --- a/app/features/sendouq/SQGroupRepository.server.test.ts +++ b/app/features/sendouq/SQGroupRepository.server.test.ts @@ -10,7 +10,7 @@ import * as TeamFactory from "~/db/seed/factories/TeamFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import { db } from "~/db/sql"; import * as GroupMatchContinueVoteRepository from "~/features/sendouq-match/GroupMatchContinueVoteRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { FULL_GROUP_SIZE } from "./q-constants"; import * as SQGroupRepository from "./SQGroupRepository.server"; diff --git a/app/features/sendouq/core/SendouQ.server.test.ts b/app/features/sendouq/core/SendouQ.server.test.ts index 3cb152d0f..695d780ba 100644 --- a/app/features/sendouq/core/SendouQ.server.test.ts +++ b/app/features/sendouq/core/SendouQ.server.test.ts @@ -14,7 +14,7 @@ import { } from "~/features/mmr/tiered.server"; import * as SQMatchRepository from "~/features/sendouq-match/SQMatchRepository.server"; import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as SQGroupRepository from "../SQGroupRepository.server"; import { refreshSendouQInstance, SendouQ } from "./SendouQ.server"; diff --git a/app/features/sendouq/core/groups.server.ts b/app/features/sendouq/core/groups.server.ts index a1d8fa520..9f062fe9d 100644 --- a/app/features/sendouq/core/groups.server.ts +++ b/app/features/sendouq/core/groups.server.ts @@ -1,6 +1,6 @@ import { TIERS } from "~/features/mmr/mmr-constants"; import type { TieredSkill } from "~/features/mmr/tiered.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { TierDifference } from "../q-types"; const allTiersOrdered = TIERS.flatMap((tier) => [ diff --git a/app/features/sendouq/core/ready-check.server.test.ts b/app/features/sendouq/core/ready-check.server.test.ts index 4a98999fc..2c53b410f 100644 --- a/app/features/sendouq/core/ready-check.server.test.ts +++ b/app/features/sendouq/core/ready-check.server.test.ts @@ -12,7 +12,7 @@ import * as UserFactory from "~/db/seed/factories/UserFactory"; import { db } from "~/db/sql"; import * as ChatSystemMessage from "~/features/chat/ChatSystemMessage.server"; import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { FULL_GROUP_SIZE, SENDOUQ, diff --git a/app/features/sendouq/routes/q.looking.test.ts b/app/features/sendouq/routes/q.looking.test.ts index a84957044..489431019 100644 --- a/app/features/sendouq/routes/q.looking.test.ts +++ b/app/features/sendouq/routes/q.looking.test.ts @@ -13,7 +13,7 @@ import * as Seasons from "~/features/mmr/core/Seasons"; import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server"; import { stageIds } from "~/modules/in-game-lists/stage-ids"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { wrappedAction } from "~/utils/Test"; import * as ReadyCheck from "../core/ready-check.server"; import { refreshSendouQInstance } from "../core/SendouQ.server"; diff --git a/app/features/sendouq/routes/q.ready.test.ts b/app/features/sendouq/routes/q.ready.test.ts index 43fbe4474..e3f3d5da3 100644 --- a/app/features/sendouq/routes/q.ready.test.ts +++ b/app/features/sendouq/routes/q.ready.test.ts @@ -11,7 +11,7 @@ import * as SQGroupFactory from "~/db/seed/factories/SQGroupFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import * as Seasons from "~/features/mmr/core/Seasons"; import * as SQGroupRepository from "~/features/sendouq/SQGroupRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { wrappedAction, wrappedLoader } from "~/utils/Test"; import { SENDOUQ_LOOKING_PAGE } from "~/utils/urls"; import * as ReadyCheck from "../core/ready-check.server"; diff --git a/app/features/sendouq/tests/season-clock.ts b/app/features/sendouq/tests/season-clock.ts index ae4976242..fcc527044 100644 --- a/app/features/sendouq/tests/season-clock.ts +++ b/app/features/sendouq/tests/season-clock.ts @@ -1,6 +1,6 @@ import { afterAll, beforeAll, vi } from "vitest"; import * as Seasons from "~/features/mmr/core/Seasons"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; const startedSeasons = Seasons.list.filter( (season) => season.starts.getTime() <= Date.now(), diff --git a/app/features/team/TeamRepository.server.ts b/app/features/team/TeamRepository.server.ts index 2d1235d56..e0a13fa1e 100644 --- a/app/features/team/TeamRepository.server.ts +++ b/app/features/team/TeamRepository.server.ts @@ -9,7 +9,7 @@ import { NON_PLAYER_TEAM_ROLES } from "~/features/team/team-constants"; import { subsOfResult } from "~/features/team/team-utils"; import { databaseTimestampNow } from "~/utils/dates"; import { shortNanoid } from "~/utils/id"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, concatUserSubmittedImagePrefix, diff --git a/app/features/team/actions/t.$customUrl.edit.server.test.ts b/app/features/team/actions/t.$customUrl.edit.server.test.ts index c01f73342..39d6a015a 100644 --- a/app/features/team/actions/t.$customUrl.edit.server.test.ts +++ b/app/features/team/actions/t.$customUrl.edit.server.test.ts @@ -4,7 +4,7 @@ import * as TeamFactory from "~/db/seed/factories/TeamFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import * as ImageRepository from "~/features/img-upload/ImageRepository.server"; import * as TeamRepository from "~/features/team/TeamRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { clampThemeToGamut } from "~/utils/oklch-gamut"; import { wrappedAction } from "~/utils/Test"; import type { editTeamActionSchema } from "../team-schemas"; diff --git a/app/features/team/components/TeamGoBackButton.tsx b/app/features/team/components/TeamGoBackButton.tsx index 654f97d88..499c30eb2 100644 --- a/app/features/team/components/TeamGoBackButton.tsx +++ b/app/features/team/components/TeamGoBackButton.tsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { useMatches } from "react-router"; import { LinkButton } from "~/components/elements/Button"; import type { TeamLoaderData } from "~/features/team/loaders/t.$customUrl.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { teamPage } from "~/utils/urls"; export function TeamGoBackButton() { diff --git a/app/features/team/routes/t.$customUrl.index.tsx b/app/features/team/routes/t.$customUrl.index.tsx index 2ad74a0a5..ffb485151 100644 --- a/app/features/team/routes/t.$customUrl.index.tsx +++ b/app/features/team/routes/t.$customUrl.index.tsx @@ -29,7 +29,7 @@ import { useUser } from "~/features/auth/core/user"; import type { TeamLoaderData } from "~/features/team/loaders/t.$customUrl.server"; import { useActionSubmit } from "~/hooks/useActionSubmit"; import { useHasPermission } from "~/modules/permissions/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { editTeamPage, manageTeamRosterPage, userPage } from "~/utils/urls"; import { action } from "../actions/t.$customUrl.index.server"; import type * as TeamRepository from "../TeamRepository.server"; diff --git a/app/features/tournament-admin/actions/to.$id.admin.index.server.ts b/app/features/tournament-admin/actions/to.$id.admin.index.server.ts index e0c7b4f10..9bd870a40 100644 --- a/app/features/tournament-admin/actions/to.$id.admin.index.server.ts +++ b/app/features/tournament-admin/actions/to.$id.admin.index.server.ts @@ -15,7 +15,7 @@ import { } from "~/features/tournament-bracket/core/Tournament.server"; import { tournamentChannel } from "~/features/tournament-bracket/tournament-bracket-utils"; import { tournamentMatchChannel } from "~/features/tournament-match/tournament-match-utils"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { errorToastIfFalsy, parseRequestPayload } from "~/utils/remix.server"; import { assertUnreachable } from "~/utils/types"; diff --git a/app/features/tournament-admin/actions/to.$id.admin.registration.server.ts b/app/features/tournament-admin/actions/to.$id.admin.registration.server.ts index 4e54f0ca8..e7b98f88d 100644 --- a/app/features/tournament-admin/actions/to.$id.admin.registration.server.ts +++ b/app/features/tournament-admin/actions/to.$id.admin.registration.server.ts @@ -16,7 +16,7 @@ import { } from "~/features/tournament-bracket/core/Tournament.server"; import * as TournamentLFGRepository from "~/features/tournament-lfg/TournamentLFGRepository.server"; import { parseFormDataWithImages } from "~/form/parse.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { errorToastIfFalsy } from "~/utils/remix.server"; import { tournamentAdminPage } from "~/utils/urls"; diff --git a/app/features/tournament-admin/routes/to.$id.admin.brackets.tsx b/app/features/tournament-admin/routes/to.$id.admin.brackets.tsx index 45b4c7f5c..a4b51c578 100644 --- a/app/features/tournament-admin/routes/to.$id.admin.brackets.tsx +++ b/app/features/tournament-admin/routes/to.$id.admin.brackets.tsx @@ -12,7 +12,7 @@ import { useTournament } from "~/features/tournament/tournament-context"; import * as Progression from "~/features/tournament-bracket/core/Progression"; import { SendouForm } from "~/form/SendouForm"; import { useActionSubmit } from "~/hooks/useActionSubmit"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { tournamentAdminPage } from "~/utils/urls"; import { bracketProgressionFormSchema, diff --git a/app/features/tournament-admin/routes/to.$id.admin.seeds.tsx b/app/features/tournament-admin/routes/to.$id.admin.seeds.tsx index 4b17d7bf6..d5d11a4f2 100644 --- a/app/features/tournament-admin/routes/to.$id.admin.seeds.tsx +++ b/app/features/tournament-admin/routes/to.$id.admin.seeds.tsx @@ -37,7 +37,7 @@ import * as AbDivisions from "~/features/tournament-bracket/core/AbDivisions"; import type { Tournament } from "~/features/tournament-bracket/core/Tournament"; import type { TournamentTeamFull } from "~/features/tournament-bracket/core/Tournament.server"; import { UserCard } from "~/features/user-card/components/UserCard"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { ordinalToRoundedSp } from "../../mmr/mmr-utils"; import { adminSeedsActionSchema } from "../tournament-admin-schemas"; diff --git a/app/features/tournament-bracket/BracketRepository.server.test.ts b/app/features/tournament-bracket/BracketRepository.server.test.ts index 92ba6cc63..4a1cd6aa3 100644 --- a/app/features/tournament-bracket/BracketRepository.server.test.ts +++ b/app/features/tournament-bracket/BracketRepository.server.test.ts @@ -11,7 +11,7 @@ import { import { resolveMatchMapList } from "~/features/tournament-match/core/mapList.server"; import { reportScore } from "~/features/tournament-match/core/reportScore.server"; import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as Engine from "./core/engine"; import { executeBracketOperation } from "./core/executeBracketOperation.server"; import { diff --git a/app/features/tournament-bracket/actions/to.$id.brackets.finalize.server.ts b/app/features/tournament-bracket/actions/to.$id.brackets.finalize.server.ts index 7e3a28db2..cac752bdf 100644 --- a/app/features/tournament-bracket/actions/to.$id.brackets.finalize.server.ts +++ b/app/features/tournament-bracket/actions/to.$id.brackets.finalize.server.ts @@ -19,7 +19,7 @@ import { validateBadgeReceivers, validateTrophyReceiver, } from "~/features/tournament-bracket/tournament-bracket-utils"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { errorToast, diff --git a/app/features/tournament-bracket/actions/to.$id.brackets.server.test.ts b/app/features/tournament-bracket/actions/to.$id.brackets.server.test.ts index 68c6901ca..50a0ced4c 100644 --- a/app/features/tournament-bracket/actions/to.$id.brackets.server.test.ts +++ b/app/features/tournament-bracket/actions/to.$id.brackets.server.test.ts @@ -12,7 +12,7 @@ import * as UserFactory from "~/db/seed/factories/UserFactory"; import type { TournamentSettings } from "~/db/tables-json"; import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; import type { bracketSchema } from "~/features/tournament-bracket/tournament-bracket-schemas"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { wrappedAction } from "~/utils/Test"; import { action } from "./to.$id.brackets.server"; diff --git a/app/features/tournament-bracket/actions/to.$id.brackets.server.ts b/app/features/tournament-bracket/actions/to.$id.brackets.server.ts index 6c416f7d3..e19bc3fc7 100644 --- a/app/features/tournament-bracket/actions/to.$id.brackets.server.ts +++ b/app/features/tournament-bracket/actions/to.$id.brackets.server.ts @@ -10,7 +10,7 @@ import { import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server"; import * as Progression from "~/features/tournament-bracket/core/Progression"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { errorToastIfErr, diff --git a/app/features/tournament-bracket/components/Bracket/PlacementsTable.tsx b/app/features/tournament-bracket/components/Bracket/PlacementsTable.tsx index f111a03ae..514f2d39d 100644 --- a/app/features/tournament-bracket/components/Bracket/PlacementsTable.tsx +++ b/app/features/tournament-bracket/components/Bracket/PlacementsTable.tsx @@ -4,7 +4,7 @@ import * as React from "react"; import { Link } from "react-router"; import { tournamentBracketsPage } from "~/features/tournament-bracket/tournament-bracket-urls"; import { useActionSubmit } from "~/hooks/useActionSubmit"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { SendouButton } from "../../../../components/elements/Button"; import { logger } from "../../../../utils/logger"; import { tournamentTeamPage } from "../../../../utils/urls"; diff --git a/app/features/tournament-bracket/components/BracketMapListDialog.tsx b/app/features/tournament-bracket/components/BracketMapListDialog.tsx index 85e9ec231..9e3f9be83 100644 --- a/app/features/tournament-bracket/components/BracketMapListDialog.tsx +++ b/app/features/tournament-bracket/components/BracketMapListDialog.tsx @@ -33,7 +33,7 @@ import * as PickBan from "~/features/tournament-bracket/core/PickBan"; import { modesShort } from "~/modules/in-game-lists/modes"; import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; import { nullFilledArray } from "~/utils/arrays"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { assertUnreachable } from "~/utils/types"; import { SendouButton } from "../../../components/elements/Button"; import { logger } from "../../../utils/logger"; diff --git a/app/features/tournament-bracket/core/Bracket.test.ts b/app/features/tournament-bracket/core/Bracket.test.ts index 081a72c14..13cc9e9d8 100644 --- a/app/features/tournament-bracket/core/Bracket.test.ts +++ b/app/features/tournament-bracket/core/Bracket.test.ts @@ -1,6 +1,6 @@ import * as R from "remeda"; import { describe, expect, test } from "vitest"; -import invariant from "../../../utils/invariant"; +import { invariant } from "../../../utils/invariant"; import * as Engine from "./engine"; import { createResolved } from "./engine/create"; import type { BracketData, MatchData } from "./engine/types"; diff --git a/app/features/tournament-bracket/core/Bracket/Bracket.ts b/app/features/tournament-bracket/core/Bracket/Bracket.ts index bf2bfaa5f..fc23b9c12 100644 --- a/app/features/tournament-bracket/core/Bracket/Bracket.ts +++ b/app/features/tournament-bracket/core/Bracket/Bracket.ts @@ -6,7 +6,7 @@ import type { BracketData, RoundData, } from "~/features/tournament-bracket/core/engine/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import * as AbDivisions from "../AbDivisions"; import * as Engine from "../engine"; diff --git a/app/features/tournament-bracket/core/Bracket/DoubleEliminationBracket.ts b/app/features/tournament-bracket/core/Bracket/DoubleEliminationBracket.ts index 54ca5e9fb..2f9903228 100644 --- a/app/features/tournament-bracket/core/Bracket/DoubleEliminationBracket.ts +++ b/app/features/tournament-bracket/core/Bracket/DoubleEliminationBracket.ts @@ -4,7 +4,7 @@ import type { BracketData, RoundData, } from "~/features/tournament-bracket/core/engine/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { BracketMapCounts } from "../toMapList"; import { Bracket, type Standing } from "./Bracket"; import { cumulativeEliminationsByRound } from "./utils"; diff --git a/app/features/tournament-bracket/core/Bracket/RoundRobinBracket.ts b/app/features/tournament-bracket/core/Bracket/RoundRobinBracket.ts index 7443c8110..988a0f614 100644 --- a/app/features/tournament-bracket/core/Bracket/RoundRobinBracket.ts +++ b/app/features/tournament-bracket/core/Bracket/RoundRobinBracket.ts @@ -2,7 +2,7 @@ import * as R from "remeda"; import type { Tables } from "~/db/tables"; import * as Standings from "~/features/tournament/core/Standings"; import type { BracketData } from "~/features/tournament-bracket/core/engine/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { BracketMapCounts } from "../toMapList"; import { Bracket, type Standing } from "./Bracket"; diff --git a/app/features/tournament-bracket/core/Bracket/SingleEliminationBracket.ts b/app/features/tournament-bracket/core/Bracket/SingleEliminationBracket.ts index 2e629b9b7..c047f13df 100644 --- a/app/features/tournament-bracket/core/Bracket/SingleEliminationBracket.ts +++ b/app/features/tournament-bracket/core/Bracket/SingleEliminationBracket.ts @@ -5,7 +5,7 @@ import type { MatchData, RoundData, } from "~/features/tournament-bracket/core/engine/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { BracketMapCounts } from "../toMapList"; import { Bracket, type Standing } from "./Bracket"; import { cumulativeEliminationsByRound } from "./utils"; diff --git a/app/features/tournament-bracket/core/Bracket/SwissBracket.ts b/app/features/tournament-bracket/core/Bracket/SwissBracket.ts index 34c4715e9..d9aafbe0a 100644 --- a/app/features/tournament-bracket/core/Bracket/SwissBracket.ts +++ b/app/features/tournament-bracket/core/Bracket/SwissBracket.ts @@ -3,7 +3,7 @@ import type { Tables } from "~/db/tables"; import * as Standings from "~/features/tournament/core/Standings"; import * as Engine from "~/features/tournament-bracket/core/engine"; import type { BracketData } from "~/features/tournament-bracket/core/engine/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { cutToNDecimalPlaces } from "../../../../utils/number"; import { calculateTeamStatus } from "../engine/swiss/team-status"; diff --git a/app/features/tournament-bracket/core/PickBan.ts b/app/features/tournament-bracket/core/PickBan.ts index 1d399f134..f91265e0f 100644 --- a/app/features/tournament-bracket/core/PickBan.ts +++ b/app/features/tournament-bracket/core/PickBan.ts @@ -11,7 +11,7 @@ import type { StageId, } from "~/modules/in-game-lists/types"; import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { seededRandom } from "~/utils/random"; import { assertUnreachable } from "~/utils/types"; diff --git a/app/features/tournament-bracket/core/PreparedMaps.ts b/app/features/tournament-bracket/core/PreparedMaps.ts index 7f247a7af..69f3bbc2b 100644 --- a/app/features/tournament-bracket/core/PreparedMaps.ts +++ b/app/features/tournament-bracket/core/PreparedMaps.ts @@ -3,7 +3,7 @@ import * as R from "remeda"; import type { PreparedMaps } from "~/db/tables-json"; import { TOURNAMENT } from "~/features/tournament/tournament-constants"; import { nullFilledArray } from "~/utils/arrays"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Bracket } from "./Bracket"; import * as Engine from "./engine"; import type { BracketData } from "./engine/types"; diff --git a/app/features/tournament-bracket/core/Progression.ts b/app/features/tournament-bracket/core/Progression.ts index 22e80df13..a0ec3dd08 100644 --- a/app/features/tournament-bracket/core/Progression.ts +++ b/app/features/tournament-bracket/core/Progression.ts @@ -6,7 +6,7 @@ import { databaseTimestampToDate, dateToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "../../../utils/invariant"; +import { invariant } from "../../../utils/invariant"; export interface DBSource { bracketIdx: number; diff --git a/app/features/tournament-bracket/core/Swiss.test.ts b/app/features/tournament-bracket/core/Swiss.test.ts index 536a85751..7d63a95a2 100644 --- a/app/features/tournament-bracket/core/Swiss.test.ts +++ b/app/features/tournament-bracket/core/Swiss.test.ts @@ -7,7 +7,7 @@ import { RUSH_WEEKEND_3, } from "~/features/tournament-bracket/core/tests/mocks-swiss"; import { ZONES_WEEKLY_38 } from "~/features/tournament-bracket/core/tests/mocks-zones-weekly"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { unwrap } from "~/utils/result"; import * as Engine from "./engine"; import { pairUp } from "./engine/swiss/pairing"; diff --git a/app/features/tournament-bracket/core/Tournament.ts b/app/features/tournament-bracket/core/Tournament.ts index 75eb20731..e5a7c401f 100644 --- a/app/features/tournament-bracket/core/Tournament.ts +++ b/app/features/tournament-bracket/core/Tournament.ts @@ -16,7 +16,7 @@ import { databaseTimestampToDate, dateToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { assertUnreachable } from "~/utils/types"; import { groupNumberToLetters } from "../tournament-bracket-utils"; diff --git a/app/features/tournament-bracket/core/engine/create/seeding.ts b/app/features/tournament-bracket/core/engine/create/seeding.ts index 69f3827f3..ab1a44f03 100644 --- a/app/features/tournament-bracket/core/engine/create/seeding.ts +++ b/app/features/tournament-bracket/core/engine/create/seeding.ts @@ -1,6 +1,6 @@ // https://web.archive.org/web/20200601102344/https://tl.net/forum/sc2-tournaments/202139-superior-double-elimination-losers-bracket-seeding -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { OrderingMap, Seeding, SeedOrdering } from "../types"; export const ordering: OrderingMap = { diff --git a/app/features/tournament-bracket/core/engine/create/swiss.ts b/app/features/tournament-bracket/core/engine/create/swiss.ts index 2cb0e10aa..2352036f5 100644 --- a/app/features/tournament-bracket/core/engine/create/swiss.ts +++ b/app/features/tournament-bracket/core/engine/create/swiss.ts @@ -1,6 +1,6 @@ import { TOURNAMENT } from "~/features/tournament/tournament-constants"; import { nullFilledArray } from "~/utils/arrays"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { BracketData, MatchData, diff --git a/app/features/tournament-bracket/core/engine/propagation/report-result.ts b/app/features/tournament-bracket/core/engine/propagation/report-result.ts index c4fd29468..8a25b0b8e 100644 --- a/app/features/tournament-bracket/core/engine/propagation/report-result.ts +++ b/app/features/tournament-bracket/core/engine/propagation/report-result.ts @@ -1,4 +1,4 @@ -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { BracketData, EngineResult, ReportResultInput } from "../types"; import { Store } from "./store"; import { Propagator } from "./traversal"; diff --git a/app/features/tournament-bracket/core/engine/propagation/set.ts b/app/features/tournament-bracket/core/engine/propagation/set.ts index dbf067ebc..208688a79 100644 --- a/app/features/tournament-bracket/core/engine/propagation/set.ts +++ b/app/features/tournament-bracket/core/engine/propagation/set.ts @@ -1,4 +1,4 @@ -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { isSetOverByScore, matchEndedEarly } from "../status"; import type { BracketData, EngineResult, MatchData, Side } from "../types"; import { reportResult } from "./report-result"; diff --git a/app/features/tournament-bracket/core/engine/swiss/pairing.ts b/app/features/tournament-bracket/core/engine/swiss/pairing.ts index 657386f76..ba4498508 100644 --- a/app/features/tournament-bracket/core/engine/swiss/pairing.ts +++ b/app/features/tournament-bracket/core/engine/swiss/pairing.ts @@ -1,6 +1,6 @@ import blossom from "edmonds-blossom-fixed"; import * as R from "remeda"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { err, ok, type Result } from "~/utils/result"; import { swissRoundCount } from "../create/settings"; import type { diff --git a/app/features/tournament-bracket/core/finalizeTournament.server.ts b/app/features/tournament-bracket/core/finalizeTournament.server.ts index b7fab3899..799313c18 100644 --- a/app/features/tournament-bracket/core/finalizeTournament.server.ts +++ b/app/features/tournament-bracket/core/finalizeTournament.server.ts @@ -8,7 +8,7 @@ import * as TournamentRepository from "~/features/tournament/TournamentRepositor import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; import { refreshTentativeTiersCache } from "~/features/tournament-organization/core/tentativeTiers.server"; import * as TournamentOrganizationRepository from "~/features/tournament-organization/TournamentOrganizationRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import type { TournamentBadgeReceivers, diff --git a/app/features/tournament-bracket/core/summarizer.server.ts b/app/features/tournament-bracket/core/summarizer.server.ts index 6f68c6095..32c6f079c 100644 --- a/app/features/tournament-bracket/core/summarizer.server.ts +++ b/app/features/tournament-bracket/core/summarizer.server.ts @@ -9,7 +9,7 @@ import { } from "~/features/mmr/mmr-utils"; import { getBracketProgressionLabel } from "~/features/tournament/tournament-utils"; import type { AllMatchResult } from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Tables } from "../../../db/tables"; import { ensureOneStandingPerUser } from "../tournament-bracket-utils"; import type { Standing } from "./Bracket"; diff --git a/app/features/tournament-bracket/core/summarizer.test.ts b/app/features/tournament-bracket/core/summarizer.test.ts index 0187a60ba..ae2673257 100644 --- a/app/features/tournament-bracket/core/summarizer.test.ts +++ b/app/features/tournament-bracket/core/summarizer.test.ts @@ -1,7 +1,7 @@ import { ordinal, rating } from "openskill"; import { describe, expect, test } from "vitest"; import type { AllMatchResult } from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Tables } from "../../../db/tables"; import type * as Progression from "./Progression"; import { tournamentSummary } from "./summarizer.server"; diff --git a/app/features/tournament-bracket/loaders/to.$id.brackets.finalize.server.ts b/app/features/tournament-bracket/loaders/to.$id.brackets.finalize.server.ts index b55072b25..031963cd8 100644 --- a/app/features/tournament-bracket/loaders/to.$id.brackets.finalize.server.ts +++ b/app/features/tournament-bracket/loaders/to.$id.brackets.finalize.server.ts @@ -12,7 +12,7 @@ import type { Tournament } from "~/features/tournament-bracket/core/Tournament"; import { tournamentFromParams } from "~/features/tournament-bracket/core/Tournament.server"; import { tournamentBracketsPage } from "~/features/tournament-bracket/tournament-bracket-urls"; import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SerializeFrom } from "~/utils/remix"; export type FinalizeTournamentLoaderData = SerializeFrom; diff --git a/app/features/tournament-bracket/routes/to.$id.brackets.finalize.tsx b/app/features/tournament-bracket/routes/to.$id.brackets.finalize.tsx index 2b4a44d62..69258e6f9 100644 --- a/app/features/tournament-bracket/routes/to.$id.brackets.finalize.tsx +++ b/app/features/tournament-bracket/routes/to.$id.brackets.finalize.tsx @@ -21,7 +21,7 @@ import { } from "~/features/tournament-bracket/tournament-bracket-utils"; import { Trophy } from "~/features/trophies/components/Trophy"; import { ParticipationPill } from "~/features/user-page/components/ParticipationPill"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { action } from "../actions/to.$id.brackets.finalize.server"; import { type FinalizeTournamentLoaderData, diff --git a/app/features/tournament-lfg/TournamentLFGRepository.server.ts b/app/features/tournament-lfg/TournamentLFGRepository.server.ts index 7a803cf17..21be35e7d 100644 --- a/app/features/tournament-lfg/TournamentLFGRepository.server.ts +++ b/app/features/tournament-lfg/TournamentLFGRepository.server.ts @@ -5,7 +5,7 @@ import { actorId } from "~/features/auth/core/user.server"; import * as ChatRepository from "~/features/chat/ChatRepository.server"; import { databaseTimestampNow } from "~/utils/dates"; import { shortNanoid } from "~/utils/id"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserMembersAgg, concatUserSubmittedImagePrefix, diff --git a/app/features/tournament-match/TournamentMatchRepository.server.ts b/app/features/tournament-match/TournamentMatchRepository.server.ts index 0054cb663..0b4109424 100644 --- a/app/features/tournament-match/TournamentMatchRepository.server.ts +++ b/app/features/tournament-match/TournamentMatchRepository.server.ts @@ -4,7 +4,7 @@ import type { DB } from "~/db/tables"; import type { TournamentRoundMaps } from "~/db/tables-json"; import type { Side } from "~/features/tournament-bracket/core/engine/types"; import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, jsonArrayFrom, diff --git a/app/features/tournament-match/actions/to.$id.matches.$mid.server.ts b/app/features/tournament-match/actions/to.$id.matches.$mid.server.ts index 705b3774a..97453502a 100644 --- a/app/features/tournament-match/actions/to.$id.matches.$mid.server.ts +++ b/app/features/tournament-match/actions/to.$id.matches.$mid.server.ts @@ -26,7 +26,7 @@ import { } from "~/features/tournament-bracket/tournament-bracket-utils"; import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { errorToastIfFalsy, diff --git a/app/features/tournament-match/core/executeRoll.server.ts b/app/features/tournament-match/core/executeRoll.server.ts index ce33aa7e9..ea9e5e66a 100644 --- a/app/features/tournament-match/core/executeRoll.server.ts +++ b/app/features/tournament-match/core/executeRoll.server.ts @@ -2,7 +2,7 @@ import type { TournamentRoundMaps } from "~/db/tables-json"; import * as TournamentRepository from "~/features/tournament/TournamentRepository.server"; import * as PickBan from "~/features/tournament-bracket/core/PickBan"; import type { ModeWithStage } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { seededRandom } from "~/utils/random"; import { errorIsSqliteUniqueConstraintFailure } from "~/utils/sql"; import type { findResultsByMatchId } from "../TournamentMatchRepository.server"; diff --git a/app/features/tournament-match/core/reportScore.server.ts b/app/features/tournament-match/core/reportScore.server.ts index d6543aee2..0ef1b90a3 100644 --- a/app/features/tournament-match/core/reportScore.server.ts +++ b/app/features/tournament-match/core/reportScore.server.ts @@ -5,7 +5,7 @@ import type { Tournament } from "~/features/tournament-bracket/core/Tournament"; import { tournamentTeamToActiveRosterUserIds } from "~/features/tournament-bracket/tournament-bracket-utils"; import { serializeMaplistSource } from "~/modules/tournament-map-list-generator/source"; import type { TournamentMapListMap } from "~/modules/tournament-map-list-generator/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { errorToastIfFalsy } from "~/utils/remix.server"; import { errorIsSqliteUniqueConstraintFailure, toDBBoolean } from "~/utils/sql"; import type { FindMatchById } from "../TournamentMatchRepository.server"; diff --git a/app/features/tournament/TournamentRepository.permissions.test.ts b/app/features/tournament/TournamentRepository.permissions.test.ts index 6a4ba3675..3cb5a4249 100644 --- a/app/features/tournament/TournamentRepository.permissions.test.ts +++ b/app/features/tournament/TournamentRepository.permissions.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, test } from "vitest"; import * as TournamentFactory from "~/db/seed/factories/TournamentFactory"; import * as TournamentOrganizationFactory from "~/db/seed/factories/TournamentOrganizationFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as TournamentRepository from "./TournamentRepository.server"; const users = UserFactory.pool(); diff --git a/app/features/tournament/TournamentRepository.server.ts b/app/features/tournament/TournamentRepository.server.ts index 7249a92dd..3d83c3822 100644 --- a/app/features/tournament/TournamentRepository.server.ts +++ b/app/features/tournament/TournamentRepository.server.ts @@ -29,7 +29,7 @@ import { modesShort } from "~/modules/in-game-lists/modes"; import { isSupporter } from "~/modules/permissions/utils"; import { nullFilledArray, nullifyingAvg } from "~/utils/arrays"; import { databaseTimestampNow, dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { commonUserSelect, concatUserSubmittedImagePrefix, diff --git a/app/features/tournament/TournamentTeamRepository.server.ts b/app/features/tournament/TournamentTeamRepository.server.ts index c54f415df..1dcb649ef 100644 --- a/app/features/tournament/TournamentTeamRepository.server.ts +++ b/app/features/tournament/TournamentTeamRepository.server.ts @@ -9,7 +9,7 @@ import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; import { flatZip } from "~/utils/arrays"; import { databaseTimestampNow, dateToDatabaseTimestamp } from "~/utils/dates"; import { shortNanoid } from "~/utils/id"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { jsonArrayFrom, tournamentLogoWithDefault, diff --git a/app/features/tournament/actions/to.$id.join.server.ts b/app/features/tournament/actions/to.$id.join.server.ts index 7cb2c7050..267290fbc 100644 --- a/app/features/tournament/actions/to.$id.join.server.ts +++ b/app/features/tournament/actions/to.$id.join.server.ts @@ -9,7 +9,7 @@ import { } from "~/features/tournament-bracket/core/Tournament.server"; import * as TournamentLFGRepository from "~/features/tournament-lfg/TournamentLFGRepository.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { errorToastIfFalsy, notFoundIfNullish } from "~/utils/remix.server"; import { tournamentPage, tournamentRegisterPage } from "~/utils/urls"; import { tournamentJoinSearchParams } from "../tournament-search-params"; diff --git a/app/features/tournament/components/TournamentHeader.tsx b/app/features/tournament/components/TournamentHeader.tsx index 5c727ac25..cd184c68d 100644 --- a/app/features/tournament/components/TournamentHeader.tsx +++ b/app/features/tournament/components/TournamentHeader.tsx @@ -8,7 +8,7 @@ import { LinkButton } from "~/components/elements/Button"; import { DiscordIcon } from "~/components/icons/Discord"; import { LocaleTime } from "~/components/LocaleTime"; import { ShareUrlButton } from "~/components/ShareUrlButton"; -import TimePopover from "~/components/TimePopover"; +import { TimePopover } from "~/components/TimePopover"; import { UserLink } from "~/components/UserLink"; import { useUser } from "~/features/auth/core/user"; import type { Tournament } from "~/features/tournament-bracket/core/Tournament"; diff --git a/app/features/tournament/core/Standings.test.ts b/app/features/tournament/core/Standings.test.ts index 898cb40d7..ff0e02913 100644 --- a/app/features/tournament/core/Standings.test.ts +++ b/app/features/tournament/core/Standings.test.ts @@ -9,7 +9,7 @@ import { testTournament, tournamentCtxTeam, } from "~/features/tournament-bracket/core/tests/test-utils"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { matchesPlayedByTeamId, reNumberPlacements, diff --git a/app/features/tournament/core/Standings.ts b/app/features/tournament/core/Standings.ts index 0db55cd0b..4858d14dd 100644 --- a/app/features/tournament/core/Standings.ts +++ b/app/features/tournament/core/Standings.ts @@ -2,7 +2,7 @@ import * as R from "remeda"; import type { Standing } from "~/features/tournament-bracket/core/Bracket"; import * as Progression from "~/features/tournament-bracket/core/Progression"; import type { Tournament } from "~/features/tournament-bracket/core/Tournament"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { getBracketProgressionLabel } from "../tournament-utils"; const MATCH_SIDES = ["opponent1", "opponent2"] as const; diff --git a/app/features/tournament/loaders/to.$id.teams.$tid.server.ts b/app/features/tournament/loaders/to.$id.teams.$tid.server.ts index 4e87803b1..52734abb0 100644 --- a/app/features/tournament/loaders/to.$id.teams.$tid.server.ts +++ b/app/features/tournament/loaders/to.$id.teams.$tid.server.ts @@ -6,7 +6,7 @@ import { } from "~/features/tournament-bracket/core/Tournament.server"; import { tournamentTeamPageParamsSchema } from "~/features/tournament-bracket/tournament-bracket-schemas"; import * as TournamentMatchRepository from "~/features/tournament-match/TournamentMatchRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SerializeFrom } from "~/utils/remix"; import { parseParams } from "~/utils/remix.server"; import * as Standings from "../core/Standings"; diff --git a/app/features/tournament/routes/to.$id.join.tsx b/app/features/tournament/routes/to.$id.join.tsx index 695b0d99f..f608f1242 100644 --- a/app/features/tournament/routes/to.$id.join.tsx +++ b/app/features/tournament/routes/to.$id.join.tsx @@ -7,7 +7,7 @@ import { FriendCodeInput } from "~/components/FriendCodeInput"; import { SubmitButton } from "~/components/SubmitButton"; import { useUser } from "~/features/auth/core/user"; import { useTournament } from "~/features/tournament/tournament-context"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { assertUnreachable } from "~/utils/types"; import { tournamentRegisterPage, diff --git a/app/features/user-card/loaders/user-card.edit.server.ts b/app/features/user-card/loaders/user-card.edit.server.ts index ef7aae871..bfb39ce14 100644 --- a/app/features/user-card/loaders/user-card.edit.server.ts +++ b/app/features/user-card/loaders/user-card.edit.server.ts @@ -1,6 +1,6 @@ import { requireUser } from "~/features/auth/core/user.server"; import * as XRankPlacementRepository from "~/features/top-search/XRankPlacementRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import * as UserCardRepository from "../UserCardRepository.server"; export const loader = async () => { diff --git a/app/features/user-page/UserRepository.server.ts b/app/features/user-page/UserRepository.server.ts index 2251b1e3e..f332b9f66 100644 --- a/app/features/user-page/UserRepository.server.ts +++ b/app/features/user-page/UserRepository.server.ts @@ -22,7 +22,7 @@ import { dateToDatabaseTimestamp, dateToYYYYMMDD, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { asJson, commonUserSelect, diff --git a/app/features/user-page/routes/u.$identifier.admin.tsx b/app/features/user-page/routes/u.$identifier.admin.tsx index a3a7be78f..17467e7e1 100644 --- a/app/features/user-page/routes/u.$identifier.admin.tsx +++ b/app/features/user-page/routes/u.$identifier.admin.tsx @@ -11,7 +11,7 @@ import { ReportsBarChart } from "~/features/user-report/components/ReportsBarCha import { USER_REPORT_CATEGORY_LABELS } from "~/features/user-report/user-report-constants"; import { SendouForm } from "~/form"; import { useFormatDistanceToNow } from "~/hooks/intl/useFormatDistanceToNow"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { sendouQMatchPage, userPage } from "~/utils/urls"; import { action } from "../actions/u.$identifier.admin.server"; import { SubPageHeader } from "../components/SubPageHeader"; diff --git a/app/features/user-page/routes/u.$identifier.art.tsx b/app/features/user-page/routes/u.$identifier.art.tsx index a26f15f3d..a923f3db8 100644 --- a/app/features/user-page/routes/u.$identifier.art.tsx +++ b/app/features/user-page/routes/u.$identifier.art.tsx @@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next"; import { useLoaderData, useMatches } from "react-router"; import { ArtGrid } from "~/features/art/components/ArtGrid"; import { useSearchParam } from "~/modules/search-params/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { userPage } from "~/utils/urls"; import { action } from "../actions/u.$identifier.art.server"; diff --git a/app/features/user-page/routes/u.$identifier.builds.new.tsx b/app/features/user-page/routes/u.$identifier.builds.new.tsx index 2b78917de..66a80e4f5 100644 --- a/app/features/user-page/routes/u.$identifier.builds.new.tsx +++ b/app/features/user-page/routes/u.$identifier.builds.new.tsx @@ -3,7 +3,7 @@ import { useLoaderData, useMatches } from "react-router"; import { Alert } from "~/components/Alert"; import { Main } from "~/components/Main"; import { BUILD } from "~/features/builds/builds-constants"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { action } from "../actions/u.$identifier.builds.new.server"; import { NewBuildForm } from "../components/NewBuildForm"; diff --git a/app/features/user-page/routes/u.$identifier.edit-widgets.tsx b/app/features/user-page/routes/u.$identifier.edit-widgets.tsx index 7255dc762..fd27e535d 100644 --- a/app/features/user-page/routes/u.$identifier.edit-widgets.tsx +++ b/app/features/user-page/routes/u.$identifier.edit-widgets.tsx @@ -41,7 +41,7 @@ import { USER } from "~/features/user-page/user-page-constants"; import { useUnsavedChangesChecker } from "~/form/UnsavedChangesGuard"; import { useHydrated } from "~/hooks/useHydrated"; import { useHasRole } from "~/modules/permissions/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { navIconUrl, SUPPORT_PAGE, userPage } from "~/utils/urls"; import { action } from "../actions/u.$identifier.edit-widgets.server"; import { SubPageHeader } from "../components/SubPageHeader"; diff --git a/app/features/user-page/routes/u.$identifier.edit.tsx b/app/features/user-page/routes/u.$identifier.edit.tsx index 439d1aea7..409839278 100644 --- a/app/features/user-page/routes/u.$identifier.edit.tsx +++ b/app/features/user-page/routes/u.$identifier.edit.tsx @@ -8,7 +8,7 @@ import { SendouForm } from "~/form/SendouForm"; import { useHydrated } from "~/hooks/useHydrated"; import { useHasRole } from "~/modules/permissions/hooks"; import { countryCodeToTranslatedName } from "~/utils/i18n"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { FAQ_PAGE, userPage } from "~/utils/urls"; import { action } from "../actions/u.$identifier.edit.server"; diff --git a/app/features/user-page/routes/u.$identifier.index.tsx b/app/features/user-page/routes/u.$identifier.index.tsx index 281b20d2c..a1ff8fe4b 100644 --- a/app/features/user-page/routes/u.$identifier.index.tsx +++ b/app/features/user-page/routes/u.$identifier.index.tsx @@ -13,7 +13,7 @@ import { Flag } from "~/components/Flag"; import { useUser } from "~/features/auth/core/user"; import { UserCard } from "~/features/user-card/components/UserCard"; import { countryCodeToTranslatedName } from "~/utils/i18n"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { MutualFriends } from "../components/MutualFriends"; import type { UserPageNavItem } from "../components/UserPageIconNav"; diff --git a/app/features/user-page/routes/u.$identifier.results.tsx b/app/features/user-page/routes/u.$identifier.results.tsx index e92b74f80..5f25fef1a 100644 --- a/app/features/user-page/routes/u.$identifier.results.tsx +++ b/app/features/user-page/routes/u.$identifier.results.tsx @@ -5,7 +5,7 @@ import { Pagination } from "~/components/Pagination"; import { useUser } from "~/features/auth/core/user"; import { UserResultsTable } from "~/features/user-page/components/UserResultsTable"; import { useSearchParamPagination } from "~/hooks/useSearchParamPagination"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { userPage, userResultsEditHighlightsPage } from "~/utils/urls"; import { ResultsFiltersBar } from "../components/ResultsFiltersBar"; import { SubPageHeader } from "../components/SubPageHeader"; diff --git a/app/features/user-page/routes/u.$identifier.seasons.index.tsx b/app/features/user-page/routes/u.$identifier.seasons.index.tsx index 174364444..56c564919 100644 --- a/app/features/user-page/routes/u.$identifier.seasons.index.tsx +++ b/app/features/user-page/routes/u.$identifier.seasons.index.tsx @@ -15,7 +15,7 @@ import type { } from "~/features/sendouq-match/SQMatchRepository.server"; import { useSearchParamPagination } from "~/hooks/useSearchParamPagination"; import { databaseTimestampToDate } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { roundToNDecimalPlaces } from "~/utils/number"; import { sendouQMatchPage, tournamentTeamPage } from "~/utils/urls"; import { diff --git a/app/features/user-page/routes/u.$identifier.seasons.stats.tsx b/app/features/user-page/routes/u.$identifier.seasons.stats.tsx index 6badeddc3..77bf94eda 100644 --- a/app/features/user-page/routes/u.$identifier.seasons.stats.tsx +++ b/app/features/user-page/routes/u.$identifier.seasons.stats.tsx @@ -17,7 +17,7 @@ import { useWeaponUsage } from "~/hooks/swr"; import { modesShort } from "~/modules/in-game-lists/modes"; import { stageIds } from "~/modules/in-game-lists/stage-ids"; import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { cutToNDecimalPlaces, winPercentage } from "~/utils/number"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { diff --git a/app/features/user-page/routes/u.$identifier.seasons.tsx b/app/features/user-page/routes/u.$identifier.seasons.tsx index 074fecfb5..b3821110f 100644 --- a/app/features/user-page/routes/u.$identifier.seasons.tsx +++ b/app/features/user-page/routes/u.$identifier.seasons.tsx @@ -10,7 +10,7 @@ import { useLocation, useMatches, } from "react-router"; -import Chart from "~/components/Chart"; +import { Chart } from "~/components/Chart"; import { EmptyState } from "~/components/EmptyState"; import { SendouButton } from "~/components/elements/Button"; import { SendouDialog } from "~/components/elements/Dialog"; @@ -39,7 +39,7 @@ import { userSeasonsStatsPage, } from "~/features/user-page/user-page-urls"; import { useSearchParam } from "~/modules/search-params/hooks"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { resolveAvatarUrl, diff --git a/app/features/user-page/routes/u.$identifier.vods.tsx b/app/features/user-page/routes/u.$identifier.vods.tsx index 18a5ecbcc..d88c11803 100644 --- a/app/features/user-page/routes/u.$identifier.vods.tsx +++ b/app/features/user-page/routes/u.$identifier.vods.tsx @@ -6,7 +6,7 @@ import { } from "~/features/vods/components/VodListing"; import { userVodsSearchParams } from "~/features/vods/vods-search-params"; import { useSearchParamPagination } from "~/hooks/useSearchParamPagination"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { SendouRouteHandle } from "~/utils/remix.server"; import { userPage } from "~/utils/urls"; import { SubPageHeader } from "../components/SubPageHeader"; diff --git a/app/features/vods/VodRepository.server.ts b/app/features/vods/VodRepository.server.ts index acb05a5ef..ec30a64e3 100644 --- a/app/features/vods/VodRepository.server.ts +++ b/app/features/vods/VodRepository.server.ts @@ -12,7 +12,7 @@ import { dateToDatabaseTimestamp, dayMonthYearToDatabaseTimestamp, } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { type CommonUser, commonUserJsonObject, diff --git a/app/modules/i18n/i18next.server.ts b/app/modules/i18n/i18next.server.ts index 3204f5cd6..28ba63c6b 100644 --- a/app/modules/i18n/i18next.server.ts +++ b/app/modules/i18n/i18next.server.ts @@ -14,7 +14,7 @@ import { type RouterContextProvider, } from "react-router"; import { createI18nextMiddleware } from "remix-i18next"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { config } from "./config"; import { resources } from "./resources.server"; diff --git a/app/modules/responsive-masonry/components/Masonry.tsx b/app/modules/responsive-masonry/components/Masonry.tsx index d8453a92c..898f8ad6a 100644 --- a/app/modules/responsive-masonry/components/Masonry.tsx +++ b/app/modules/responsive-masonry/components/Masonry.tsx @@ -19,7 +19,7 @@ interface MasonryState { children?: React.ReactNode | React.ReactNode[]; } -class Masonry extends React.Component { +export class Masonry extends React.Component { static defaultProps: Partial = { columnsCount: 3, gutter: "0", @@ -166,5 +166,3 @@ class Masonry extends React.Component { ); } } - -export default Masonry; diff --git a/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx b/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx index 013a7a45c..eec04bf8a 100644 --- a/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx +++ b/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useMediaQuery } from "~/hooks/useMediaQuery"; -import Masonry from "./Masonry"; +import { Masonry } from "./Masonry"; const THREE_COLUMNS_QUERY = "(width >= 900px)"; const TWO_COLUMNS_QUERY = "(width >= 750px)"; diff --git a/app/modules/tournament-map-list-generator/balanced-map-list.ts b/app/modules/tournament-map-list-generator/balanced-map-list.ts index d09bc1e11..87d752413 100644 --- a/app/modules/tournament-map-list-generator/balanced-map-list.ts +++ b/app/modules/tournament-map-list-generator/balanced-map-list.ts @@ -1,5 +1,5 @@ import { stageIds } from "~/modules/in-game-lists/stage-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { seededRandom } from "~/utils/random"; import { err, ok, type Result } from "~/utils/result"; diff --git a/app/modules/tournament-map-list-generator/source.ts b/app/modules/tournament-map-list-generator/source.ts index 40b8cbf7c..1ddb90139 100644 --- a/app/modules/tournament-map-list-generator/source.ts +++ b/app/modules/tournament-map-list-generator/source.ts @@ -1,4 +1,4 @@ -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { sourceTypes } from "./constants"; import type { DBTournamentMaplistSource, diff --git a/app/modules/twitch/utils.server.ts b/app/modules/twitch/utils.server.ts index 317e71bcf..5dea448e4 100644 --- a/app/modules/twitch/utils.server.ts +++ b/app/modules/twitch/utils.server.ts @@ -1,5 +1,5 @@ import { ServerConfig } from "~/config.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; export const hasTwitchEnvVars = () => Boolean(ServerConfig.twitch.clientId && ServerConfig.twitch.clientSecret); diff --git a/app/routines/closeExpiredChatRooms.test.ts b/app/routines/closeExpiredChatRooms.test.ts index 3b084c7b0..3b59755fd 100644 --- a/app/routines/closeExpiredChatRooms.test.ts +++ b/app/routines/closeExpiredChatRooms.test.ts @@ -4,7 +4,7 @@ import * as ChatRoomFactory from "~/db/seed/factories/ChatRoomFactory"; import * as SQGroupFactory from "~/db/seed/factories/SQGroupFactory"; import * as UserFactory from "~/db/seed/factories/UserFactory"; import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { CloseExpiredChatRoomsRoutine } from "./closeExpiredChatRooms"; const users = UserFactory.pool(); diff --git a/app/utils/invariant.ts b/app/utils/invariant.ts index f321a91b7..b18c639e7 100644 --- a/app/utils/invariant.ts +++ b/app/utils/invariant.ts @@ -1,9 +1,6 @@ // adapted from https://github.com/alexreardon/tiny-invariant, changed to show errors in production as well -export default function invariant( - condition: any, - message?: string, -): asserts condition { +export function invariant(condition: any, message?: string): asserts condition { if (condition) return; const addition = message ? `: ${message}` : ""; diff --git a/biome.json b/biome.json index f8c0e0c7b..1162309bd 100644 --- a/biome.json +++ b/biome.json @@ -122,6 +122,7 @@ "useErrorCause": "error", "useThrowOnlyError": "error", "noNamespace": "error", + "noDefaultExport": "error", "useFilenamingConvention": { "level": "error", "options": { @@ -202,6 +203,27 @@ } } }, + { + "includes": [ + "app/features/*/routes/**", + "app/modules/*/routes/**", + "app/root.tsx", + "app/routes.ts", + "app/entry.server.tsx", + "*.config.ts", + "knip.ts", + "e2e/global-setup.ts", + "e2e/global-teardown.ts", + "scripts/**" + ], + "linter": { + "rules": { + "style": { + "noDefaultExport": "off" + } + } + } + }, { "includes": ["app/**", "!app/modules/search-params/**"], "plugins": ["./biome-plugins/no-raw-search-params.grit"] diff --git a/e2e/chat.spec.ts b/e2e/chat.spec.ts index 830f93aea..3641636db 100644 --- a/e2e/chat.spec.ts +++ b/e2e/chat.spec.ts @@ -1,7 +1,7 @@ import { sub } from "date-fns"; import { NZAP_TEST_ID } from "~/db/seed/constants"; import { FULL_GROUP_SIZE } from "~/features/sendouq/q-constants"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { sendouQMatchPage } from "~/utils/urls"; import { chatHistoryStatus, diff --git a/e2e/helpers/sidebar.ts b/e2e/helpers/sidebar.ts index 309e6ef6d..1ddc12fac 100644 --- a/e2e/helpers/sidebar.ts +++ b/e2e/helpers/sidebar.ts @@ -2,7 +2,7 @@ import type { Locator } from "@playwright/test"; import { addDays, addHours } from "date-fns"; import { NZAP_TEST_ID } from "~/db/seed/constants"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Factories } from "./factories"; import { expect } from "./playwright"; diff --git a/e2e/helpers/tournament.ts b/e2e/helpers/tournament.ts index f1144bf09..4bb91ec78 100644 --- a/e2e/helpers/tournament.ts +++ b/e2e/helpers/tournament.ts @@ -4,7 +4,7 @@ import { ADMIN_ID } from "~/features/admin/admin-constants"; import type { TournamentTierNumber } from "~/features/tournament/core/tiering"; import type { ModeShort, StageId } from "~/modules/in-game-lists/types"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import type { Factories } from "./factories"; export const ROSTER_SIZE = 4; diff --git a/e2e/pages/associations/associations-page.ts b/e2e/pages/associations/associations-page.ts index 9186c5ad6..912d2a7c7 100644 --- a/e2e/pages/associations/associations-page.ts +++ b/e2e/pages/associations/associations-page.ts @@ -1,6 +1,6 @@ import type { Page } from "@playwright/test"; import { associationsPage } from "~/features/associations/associations-urls"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { modalClickConfirmButton, navigate, diff --git a/e2e/pages/builds/user-builds-page.ts b/e2e/pages/builds/user-builds-page.ts index d59010243..96a425f63 100644 --- a/e2e/pages/builds/user-builds-page.ts +++ b/e2e/pages/builds/user-builds-page.ts @@ -3,7 +3,7 @@ import { type BuildSort, DEFAULT_BUILD_SORT, } from "~/features/user-page/user-page-constants"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { userBuildsPage } from "~/utils/urls"; import { modalClickConfirmButton, diff --git a/e2e/pages/sendouq/sendouq-preparing-page.ts b/e2e/pages/sendouq/sendouq-preparing-page.ts index d5f3edb6d..e1d540fee 100644 --- a/e2e/pages/sendouq/sendouq-preparing-page.ts +++ b/e2e/pages/sendouq/sendouq-preparing-page.ts @@ -1,6 +1,6 @@ import type { Page } from "@playwright/test"; import { qSearchParams } from "~/features/sendouq/q-search-params"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { SENDOUQ_PREPARING_PAGE } from "~/utils/urls"; import { expect, navigate } from "../../helpers/playwright"; import { GroupCard } from "./group-card"; diff --git a/e2e/pages/tier-list-maker/tier-list-maker-page.ts b/e2e/pages/tier-list-maker/tier-list-maker-page.ts index b7491630f..a1687b5ec 100644 --- a/e2e/pages/tier-list-maker/tier-list-maker-page.ts +++ b/e2e/pages/tier-list-maker/tier-list-maker-page.ts @@ -1,5 +1,5 @@ import type { Page } from "@playwright/test"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { TIER_LIST_MAKER_URL } from "~/utils/urls"; import { expect, diff --git a/scripts/add-badge-winners.ts b/scripts/add-badge-winners.ts index b7e3fedc9..1141a2969 100644 --- a/scripts/add-badge-winners.ts +++ b/scripts/add-badge-winners.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const badgeId = process.argv[2]?.trim(); diff --git a/scripts/add-badge.ts b/scripts/add-badge.ts index 55ae49314..233ad18d8 100644 --- a/scripts/add-badge.ts +++ b/scripts/add-badge.ts @@ -1,5 +1,5 @@ import * as BadgeRepository from "~/features/badges/BadgeRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const code = process.argv[2]?.trim(); diff --git a/scripts/add-leaderboard-teams-to-tournament.ts b/scripts/add-leaderboard-teams-to-tournament.ts index 0f44a3725..c6c83cc27 100644 --- a/scripts/add-leaderboard-teams-to-tournament.ts +++ b/scripts/add-leaderboard-teams-to-tournament.ts @@ -6,7 +6,7 @@ import * as Seasons from "~/features/mmr/core/Seasons"; import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server"; import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; import * as UserRepository from "~/features/user-page/UserRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const tournamentIdArg = process.argv[2]?.trim(); diff --git a/scripts/check-season-status.ts b/scripts/check-season-status.ts index 00fca38ae..c1b78bb57 100644 --- a/scripts/check-season-status.ts +++ b/scripts/check-season-status.ts @@ -1,6 +1,6 @@ import { db } from "~/db/sql"; import * as Seasons from "~/features/mmr/core/Seasons"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const rawNth = process.argv[2]?.trim(); diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index daad64186..c4e875fa4 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -21,7 +21,7 @@ import { subWeaponIds, weaponIdToBaseWeaponId, } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { LANG_JSONS_TO_CREATE, diff --git a/scripts/create-gear-json.ts b/scripts/create-gear-json.ts index da69b3e28..20f7d40d0 100644 --- a/scripts/create-gear-json.ts +++ b/scripts/create-gear-json.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; import { brandIds } from "~/modules/in-game-lists/brand-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { LANG_JSONS_TO_CREATE, loadGearInfoClothes, diff --git a/scripts/create-misc-json.ts b/scripts/create-misc-json.ts index f181852d9..46f0092d4 100644 --- a/scripts/create-misc-json.ts +++ b/scripts/create-misc-json.ts @@ -3,7 +3,7 @@ import path from "node:path"; import { fileURLToPath } from "node:url"; import { abilitiesShort } from "~/modules/in-game-lists/abilities"; import { brandIds } from "~/modules/in-game-lists/brand-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { LANG_JSONS_TO_CREATE, loadLangDicts, diff --git a/scripts/delete-badge.ts b/scripts/delete-badge.ts index c01a53bba..72b18da87 100644 --- a/scripts/delete-badge.ts +++ b/scripts/delete-badge.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const rawId = process.argv[2]?.trim(); diff --git a/scripts/delete-skill.ts b/scripts/delete-skill.ts index 64ceeef96..4d3c45a5a 100644 --- a/scripts/delete-skill.ts +++ b/scripts/delete-skill.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const discordId = process.argv[2]?.trim(); diff --git a/scripts/delete-user.ts b/scripts/delete-user.ts index 92ab78a8c..c50610ff4 100644 --- a/scripts/delete-user.ts +++ b/scripts/delete-user.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const discordId = process.argv[2]?.trim(); diff --git a/scripts/mass-add-tournaments-to-org.ts b/scripts/mass-add-tournaments-to-org.ts index a6d5f653b..32b0fa8a1 100644 --- a/scripts/mass-add-tournaments-to-org.ts +++ b/scripts/mass-add-tournaments-to-org.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; async function main() { diff --git a/scripts/nuke-reported-weapons.ts b/scripts/nuke-reported-weapons.ts index e6afe427b..614ab04e7 100644 --- a/scripts/nuke-reported-weapons.ts +++ b/scripts/nuke-reported-weapons.ts @@ -1,7 +1,7 @@ import { db } from "~/db/sql"; import * as Seasons from "~/features/mmr/core/Seasons"; import { dateToDatabaseTimestamp } from "~/utils/dates"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const discordId = process.argv[2]?.trim(); diff --git a/scripts/placements/index.ts b/scripts/placements/index.ts index 679cbe875..a9b5ea408 100644 --- a/scripts/placements/index.ts +++ b/scripts/placements/index.ts @@ -4,7 +4,7 @@ import * as BuildRepository from "~/features/builds/BuildRepository.server"; import * as XRankPlacementRepository from "~/features/top-search/XRankPlacementRepository.server"; import type { MainWeaponId } from "~/modules/in-game-lists/types"; import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; import { xRankSchema } from "./schemas"; diff --git a/scripts/rename-badge.ts b/scripts/rename-badge.ts index d1645cd9f..4ee91b05c 100644 --- a/scripts/rename-badge.ts +++ b/scripts/rename-badge.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const id = process.argv[2]?.trim(); diff --git a/scripts/replace-img-names.ts b/scripts/replace-img-names.ts index 5220ce827..533667764 100644 --- a/scripts/replace-img-names.ts +++ b/scripts/replace-img-names.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const __filename = fileURLToPath(import.meta.url); diff --git a/scripts/season-initial-powers.ts b/scripts/season-initial-powers.ts index 816ea66af..1f84e52e6 100644 --- a/scripts/season-initial-powers.ts +++ b/scripts/season-initial-powers.ts @@ -4,7 +4,7 @@ import type { Tables } from "~/db/tables"; import { TIERS, type TierName } from "~/features/mmr/mmr-constants"; import * as SkillRepository from "~/features/mmr/SkillRepository.server"; import { freshUserSkills } from "~/features/mmr/tiered.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const rawNth = process.argv[2]?.trim(); diff --git a/scripts/send-test-notification.ts b/scripts/send-test-notification.ts index 5a9718358..8ab72752e 100644 --- a/scripts/send-test-notification.ts +++ b/scripts/send-test-notification.ts @@ -2,7 +2,7 @@ import { db } from "~/db/sql"; import { notify } from "~/features/notifications/core/notify.server"; import { webPushEnabled } from "~/features/notifications/core/webPush.server"; import * as NotificationRepository from "~/features/notifications/NotificationRepository.server"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const username = process.argv[2]?.trim() ?? "Sendou"; diff --git a/scripts/skip-plus.ts b/scripts/skip-plus.ts index 4d0869740..294efada5 100644 --- a/scripts/skip-plus.ts +++ b/scripts/skip-plus.ts @@ -1,6 +1,6 @@ import { db } from "~/db/sql"; import * as Seasons from "~/features/mmr/core/Seasons"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const discordId = process.argv[2]?.trim(); diff --git a/scripts/swap-users.ts b/scripts/swap-users.ts index e5d62b780..47a50f171 100644 --- a/scripts/swap-users.ts +++ b/scripts/swap-users.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; const discordId = process.argv[2]?.trim(); const discordId2 = process.argv[3]?.trim(); diff --git a/scripts/unskip-plus.ts b/scripts/unskip-plus.ts index 75df4b78c..3c6c47aab 100644 --- a/scripts/unskip-plus.ts +++ b/scripts/unskip-plus.ts @@ -1,5 +1,5 @@ import { db } from "~/db/sql"; -import invariant from "~/utils/invariant"; +import { invariant } from "~/utils/invariant"; import { logger } from "~/utils/logger"; const discordId = process.argv[2]?.trim();