chore: ⬆️ Upgrade to Biome 2.0

This commit is contained in:
Jesse Wierzbinski 2025-04-10 19:15:31 +02:00
parent e7aec8752c
commit 963173cdae
No known key found for this signature in database
174 changed files with 412 additions and 379 deletions

View file

@ -2,15 +2,15 @@ import type {
Application as ApplicationSchema,
CredentialApplication,
} from "@versia/client/schemas";
import { Token, db } from "@versia/kit/db";
import { db, Token } from "@versia/kit/db";
import { Applications } from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import { BaseInterface } from "./base.ts";

View file

@ -1,19 +1,19 @@
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
import type { CustomEmoji } from "@versia/client/schemas";
import { type Instance, Media, db } from "@versia/kit/db";
import { db, type Instance, Media } from "@versia/kit/db";
import { Emojis, type Instances, type Medias } from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
isNull,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import { emojiValidatorWithColons, emojiValidatorWithIdentifiers } from "@/api";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";
import type { ImageContentFormatSchema } from "~/packages/sdk/schemas/index.ts";
import { BaseInterface } from "./base.ts";

View file

@ -4,12 +4,12 @@ import { Instances } from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import chalk from "chalk";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import { config } from "~/config.ts";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";

View file

@ -6,13 +6,13 @@ import {
type Users,
} from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import { config } from "~/config.ts";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";

View file

@ -1,19 +1,19 @@
import { join } from "node:path";
import { mimeLookup } from "@/content_types.ts";
import type { Attachment as AttachmentSchema } from "@versia/client/schemas";
import { db } from "@versia/kit/db";
import { Medias } from "@versia/kit/tables";
import { S3Client, SHA256, randomUUIDv7, write } from "bun";
import { randomUUIDv7, S3Client, SHA256, write } from "bun";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import sharp from "sharp";
import type { z } from "zod";
import { mimeLookup } from "@/content_types.ts";
import { MediaBackendType } from "~/classes/config/schema.ts";
import { config } from "~/config.ts";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";

View file

@ -1,30 +1,30 @@
import { idValidator } from "@/api";
import { mergeAndDeduplicate } from "@/lib.ts";
import { sanitizedHtmlStrip } from "@/sanitization";
import type { Status } from "@versia/client/schemas";
import { Instance, db } from "@versia/kit/db";
import { db, Instance } from "@versia/kit/db";
import {
EmojiToNote,
MediasToNotes,
NoteToMentions,
Notes,
NoteToMentions,
Users,
} from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
isNotNull,
type SQL,
sql,
} from "drizzle-orm";
import { htmlToText } from "html-to-text";
import { createRegExp, exactly, global } from "magic-regexp";
import type { z } from "zod";
import { idValidator } from "@/api";
import { mergeAndDeduplicate } from "@/lib.ts";
import { sanitizedHtmlStrip } from "@/sanitization";
import { contentToHtml, findManyNotes } from "~/classes/functions/status";
import { config } from "~/config.ts";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";

View file

@ -1,13 +1,13 @@
import type { Notification as NotificationSchema } from "@versia/client/schemas";
import { Note, User, db } from "@versia/kit/db";
import { db, Note, User } from "@versia/kit/db";
import { Notifications } from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import {

View file

@ -1,13 +1,13 @@
import type { WebPushSubscription as WebPushSubscriptionSchema } from "@versia/client/schemas";
import { type Token, type User, db } from "@versia/kit/db";
import { db, type Token, type User } from "@versia/kit/db";
import { PushSubscriptions, Tokens } from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import { BaseInterface } from "./base.ts";

View file

@ -1,13 +1,13 @@
import { Emoji, Instance, type Note, User, db } from "@versia/kit/db";
import { db, Emoji, Instance, type Note, User } from "@versia/kit/db";
import { type Notes, Reactions, type Users } from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import { config } from "~/config.ts";
import * as VersiaEntities from "~/packages/sdk/entities/index.ts";

View file

@ -3,13 +3,13 @@ import { db } from "@versia/kit/db";
import { Relationships } from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import { z } from "zod";
import { BaseInterface } from "./base.ts";

View file

@ -1,20 +1,21 @@
import type { Role as RoleSchema } from "@versia/client/schemas";
import type { RolePermission } from "@versia/client/schemas";
import { db } from "@versia/kit/db";
import { RoleToUsers, Roles } from "@versia/kit/tables";
import { Roles, RoleToUsers } from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import { config } from "~/config.ts";
import { ProxiableUrl } from "../media/url.ts";
import { BaseInterface } from "./base.ts";
type RoleType = InferSelectModel<typeof Roles>;
export class Role extends BaseInterface<typeof Roles> {

View file

@ -1,5 +1,5 @@
import { Notes, Notifications, Users } from "@versia/kit/tables";
import { type SQL, gt } from "drizzle-orm";
import { gt, type SQL } from "drizzle-orm";
import { config } from "~/config.ts";
import { Note } from "./note.ts";
import { Notification } from "./notification.ts";

View file

@ -1,13 +1,13 @@
import type { Token as TokenSchema } from "@versia/client/schemas";
import { type Application, User, db } from "@versia/kit/db";
import { type Application, db, User } from "@versia/kit/db";
import { Tokens } from "@versia/kit/tables";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
desc,
eq,
type InferInsertModel,
type InferSelectModel,
inArray,
type SQL,
} from "drizzle-orm";
import type { z } from "zod";
import { BaseInterface } from "./base.ts";

View file

@ -1,7 +1,3 @@
import { idValidator } from "@/api";
import { getBestContentType } from "@/content_types";
import { randomString } from "@/math";
import { sentry } from "@/sentry";
import { getLogger } from "@logtape/logtape";
import type {
Account,
@ -9,35 +5,39 @@ import type {
Source,
} from "@versia/client/schemas";
import type { RolePermission } from "@versia/client/schemas";
import { Media, Notification, PushSubscription, db } from "@versia/kit/db";
import { db, Media, Notification, PushSubscription } from "@versia/kit/db";
import {
EmojiToUser,
Likes,
NoteToMentions,
Notes,
NoteToMentions,
Notifications,
UserToPinnedNotes,
Users,
UserToPinnedNotes,
} from "@versia/kit/tables";
import { randomUUIDv7 } from "bun";
import { password as bunPassword } from "bun";
import chalk from "chalk";
import {
type InferInsertModel,
type InferSelectModel,
type SQL,
and,
countDistinct,
desc,
eq,
gte,
type InferInsertModel,
type InferSelectModel,
inArray,
isNotNull,
isNull,
type SQL,
sql,
} from "drizzle-orm";
import { htmlToText } from "html-to-text";
import type { z } from "zod";
import { idValidator } from "@/api";
import { getBestContentType } from "@/content_types";
import { randomString } from "@/math";
import { sentry } from "@/sentry";
import { findManyUsers } from "~/classes/functions/user";
import { searchManager } from "~/classes/search/search-manager";
import { config } from "~/config.ts";