Skip to content

Commit

Permalink
chore: ⬆️ Upgrade dependencies, fix new linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CPlusPatch committed Sep 16, 2024
1 parent 6c15ceb commit 23936d5
Show file tree
Hide file tree
Showing 40 changed files with 154 additions and 154 deletions.
29 changes: 13 additions & 16 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"organizeImports": {
"enabled": true,
"ignore": ["node_modules", "dist"]
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"correctness": {
"noNodejsModules": "off"
"noNodejsModules": "off",
"noUndeclaredDependencies": "off"
},
"complexity": {
"noExcessiveCognitiveComplexity": "off"
},
"suspicious": {
"noConsole": "off"
},
"style": {
"noDefaultExport": "off",
"noParameterProperties": "off",
Expand Down Expand Up @@ -67,25 +70,19 @@
}
},
"nursery": {
"noDuplicateElseIf": "warn",
"noDuplicateJsonKeys": "warn",
"noEvolvingTypes": "warn",
"noYodaExpression": "warn",
"useConsistentBuiltinInstantiation": "warn",
"useErrorMessage": "warn",
"useImportExtensions": "off",
"useThrowNewError": "warn"
"noDuplicateElseIf": "warn"
}
},
"ignore": ["node_modules", "dist"]
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4,
"ignore": ["node_modules", "dist"]
"indentWidth": 4
},
"javascript": {
"globals": ["Bun"]
},
"files": {
"ignore": ["node_modules", "dist"]
}
}
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions client/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Token } from "./types/token";
import { type Output, ResponseError } from "./versia/base";
import { Client } from "./versia/client";
import type { Token } from "./types/token.ts";
import { type Output, ResponseError } from "./versia/base.ts";
import { Client } from "./versia/client.ts";

export { Client, ResponseError, type Output, type Token };
76 changes: 38 additions & 38 deletions client/types.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
import type { Account } from "./types/account";
import type { Activity } from "./types/activity";
import type { Account } from "./types/account.ts";
import type { Activity } from "./types/activity.ts";
import type {
Announcement,
AnnouncementAccount,
AnnouncementReaction,
AnnouncementStatus,
} from "./types/announcement";
import type { Application, ApplicationData } from "./types/application";
import type { AsyncAttachment } from "./types/async_attachment";
import type { Attachment, Focus, Meta, Sub } from "./types/attachment";
import type { Card } from "./types/card";
import type { Context } from "./types/context";
import type { Conversation } from "./types/conversation";
import type { Emoji } from "./types/emoji";
import type { FeaturedTag } from "./types/featured_tag";
import type { Field } from "./types/field";
import type { Filter, FilterContext } from "./types/filter";
import type { FollowRequest } from "./types/follow_request";
import type { History } from "./types/history";
import type { IdentityProof } from "./types/identity_proof";
} from "./types/announcement.ts";
import type { Application, ApplicationData } from "./types/application.ts";
import type { AsyncAttachment } from "./types/async_attachment.ts";
import type { Attachment, Focus, Meta, Sub } from "./types/attachment.ts";
import type { Card } from "./types/card.ts";
import type { Context } from "./types/context.ts";
import type { Conversation } from "./types/conversation.ts";
import type { Emoji } from "./types/emoji.ts";
import type { FeaturedTag } from "./types/featured_tag.ts";
import type { Field } from "./types/field.ts";
import type { Filter, FilterContext } from "./types/filter.ts";
import type { FollowRequest } from "./types/follow_request.ts";
import type { History } from "./types/history.ts";
import type { IdentityProof } from "./types/identity_proof.ts";
import type {
ExtendedDescription,
Instance,
InstanceRule,
} from "./types/instance";
import type { List, RepliesPolicy } from "./types/list";
import type { Marker } from "./types/marker";
import type { Mention } from "./types/mention";
import type { Notification, NotificationType } from "./types/notification";
import type { Poll, PollOption } from "./types/poll";
import type { Preferences } from "./types/preferences";
import type { Alerts, PushSubscription } from "./types/push_subscription";
import type { Reaction } from "./types/reaction";
import type { Relationship } from "./types/relationship";
import type { Category, Report } from "./types/report";
import type { Results } from "./types/results";
import type { ScheduledStatus } from "./types/scheduled_status";
import type { Source } from "./types/source";
import type { Stats } from "./types/stats";
import type { Status, StatusTag, StatusVisibility } from "./types/status";
import type { StatusParams } from "./types/status_params";
import type { StatusSource } from "./types/status_source";
import type { Tag } from "./types/tag";
import type { Token } from "./types/token";
import type { URLs } from "./types/urls";
import { RolePermission, type VersiaRole } from "./types/versia";
} from "./types/instance.ts";
import type { List, RepliesPolicy } from "./types/list.ts";
import type { Marker } from "./types/marker.ts";
import type { Mention } from "./types/mention.ts";
import type { Notification, NotificationType } from "./types/notification.ts";
import type { Poll, PollOption } from "./types/poll.ts";
import type { Preferences } from "./types/preferences.ts";
import type { Alerts, PushSubscription } from "./types/push_subscription.ts";
import type { Reaction } from "./types/reaction.ts";
import type { Relationship } from "./types/relationship.ts";
import type { Category, Report } from "./types/report.ts";
import type { Results } from "./types/results.ts";
import type { ScheduledStatus } from "./types/scheduled_status.ts";
import type { Source } from "./types/source.ts";
import type { Stats } from "./types/stats.ts";
import type { Status, StatusTag, StatusVisibility } from "./types/status.ts";
import type { StatusParams } from "./types/status_params.ts";
import type { StatusSource } from "./types/status_source.ts";
import type { Tag } from "./types/tag.ts";
import type { Token } from "./types/token.ts";
import type { URLs } from "./types/urls.ts";
import { RolePermission, type VersiaRole } from "./types/versia.ts";

export type {
Account,
Expand Down
10 changes: 5 additions & 5 deletions client/types/account.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Emoji } from "./emoji";
import type { Field } from "./field";
import type { Role } from "./role";
import type { Source } from "./source";
import type { VersiaRole } from "./versia";
import type { Emoji } from "./emoji.ts";
import type { Field } from "./field.ts";
import type { Role } from "./role.ts";
import type { Source } from "./source.ts";
import type { VersiaRole } from "./versia.ts";

export type Account = {
id: string;
Expand Down
4 changes: 2 additions & 2 deletions client/types/announcement.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Emoji } from "./emoji";
import type { StatusTag } from "./status";
import type { Emoji } from "./emoji.ts";
import type { StatusTag } from "./status.ts";

export type Announcement = {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion client/types/async_attachment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta } from "./attachment";
import type { Meta } from "./attachment.ts";

export type AsyncAttachment = {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion client/types/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Status } from "./status";
import type { Status } from "./status.ts";

export type Context = {
ancestors: Status[];
Expand Down
4 changes: 2 additions & 2 deletions client/types/conversation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Account } from "./account";
import type { Status } from "./status";
import type { Account } from "./account.ts";
import type { Status } from "./status.ts";

export type Conversation = {
id: string;
Expand Down
4 changes: 2 additions & 2 deletions client/types/follow_request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Emoji } from "./emoji";
import type { Field } from "./field";
import type { Emoji } from "./emoji.ts";
import type { Field } from "./field.ts";

export type FollowRequest = {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion client/types/instance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Account } from "./account";
import type { Account } from "./account.ts";

export type Instance = {
domain: string;
Expand Down
6 changes: 3 additions & 3 deletions client/types/notification.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Account } from "./account";
import type { Reaction } from "./reaction";
import type { Status } from "./status";
import type { Account } from "./account.ts";
import type { Reaction } from "./reaction.ts";
import type { Status } from "./status.ts";

export type Notification = {
account: Account | null;
Expand Down
2 changes: 1 addition & 1 deletion client/types/preferences.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StatusVisibility } from "./status";
import type { StatusVisibility } from "./status.ts";

export type Preferences = {
"posting:default:visibility": StatusVisibility;
Expand Down
2 changes: 1 addition & 1 deletion client/types/reaction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Account } from "./account";
import type { Account } from "./account.ts";

export type Reaction = {
count: number;
Expand Down
2 changes: 1 addition & 1 deletion client/types/report.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Account } from "./account";
import type { Account } from "./account.ts";

export type Report = {
id: string;
Expand Down
6 changes: 3 additions & 3 deletions client/types/results.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Account } from "./account";
import type { Status } from "./status";
import type { Tag } from "./tag";
import type { Account } from "./account.ts";
import type { Status } from "./status.ts";
import type { Tag } from "./tag.ts";

export type Results = {
accounts: Account[];
Expand Down
4 changes: 2 additions & 2 deletions client/types/scheduled_status.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Attachment } from "./attachment";
import type { StatusParams } from "./status_params";
import type { Attachment } from "./attachment.ts";
import type { StatusParams } from "./status_params.ts";

export type ScheduledStatus = {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion client/types/source.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Field } from "./field";
import type { Field } from "./field.ts";

export type Source = {
privacy: string | null;
Expand Down
16 changes: 8 additions & 8 deletions client/types/status.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Account } from "./account";
import type { Application } from "./application";
import type { Attachment } from "./attachment";
import type { Card } from "./card";
import type { Emoji } from "./emoji";
import type { Mention } from "./mention";
import type { Poll } from "./poll";
import type { Reaction } from "./reaction";
import type { Account } from "./account.ts";
import type { Application } from "./application.ts";
import type { Attachment } from "./attachment.ts";
import type { Card } from "./card.ts";
import type { Emoji } from "./emoji.ts";
import type { Mention } from "./mention.ts";
import type { Poll } from "./poll.ts";
import type { Reaction } from "./reaction.ts";

export type Status = {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion client/types/status_params.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StatusVisibility } from "./status";
import type { StatusVisibility } from "./status.ts";

export type StatusParams = {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion client/types/tag.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { History } from "./history";
import type { History } from "./history.ts";

export type Tag = {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion client/versia/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEFAULT_UA } from "./constants";
import { DEFAULT_UA } from "./constants.ts";

type HttpVerb = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
type ConvertibleObject = {
Expand Down
6 changes: 3 additions & 3 deletions client/versia/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import type {
Tag,
Token,
VersiaRole,
} from "../types";
import { BaseClient, type Output } from "./base";
import { DEFAULT_SCOPE, NO_REDIRECT } from "./constants";
} from "../types.ts";
import { BaseClient, type Output } from "./base.ts";
import { DEFAULT_SCOPE, NO_REDIRECT } from "./constants.ts";

type StatusContentType =
| "text/plain"
Expand Down
2 changes: 1 addition & 1 deletion federation/cryptography/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeAll, beforeEach, describe, expect, test } from "bun:test";
import { SignatureConstructor, SignatureValidator } from "./index";
import { SignatureConstructor, SignatureValidator } from "./index.ts";

describe("SignatureValidator", () => {
let validator: SignatureValidator;
Expand Down
4 changes: 2 additions & 2 deletions federation/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import type {
ShareExtension,
Unfollow,
User,
} from "./types";
import type { EntityValidator } from "./validator";
} from "./types.ts";
import type { EntityValidator } from "./validator.ts";

type MaybePromise<T> = T | Promise<T>;

Expand Down
11 changes: 7 additions & 4 deletions federation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
*/

import type { ValidationError } from "zod-validation-error";
import { SignatureConstructor, SignatureValidator } from "./cryptography";
import { RequestParserHandler } from "./http";
import {
SignatureConstructor,
SignatureValidator,
} from "./cryptography/index.ts";
import { RequestParserHandler } from "./http.ts";
import {
FederationRequester,
type Output,
ResponseError,
} from "./requester/index";
import { EntityValidator } from "./validator";
} from "./requester/index.ts";
import { EntityValidator } from "./validator.ts";

export {
EntityValidator,
Expand Down
8 changes: 4 additions & 4 deletions federation/requester/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fromZodError } from "zod-validation-error";
import type { SignatureConstructor } from "../cryptography";
import { WebFingerSchema } from "../schemas/webfinger";
import type { User } from "../types";
import { DEFAULT_UA } from "./constants";
import type { SignatureConstructor } from "../cryptography/index.ts";
import { WebFingerSchema } from "../schemas/webfinger.ts";
import type { User } from "../types.ts";
import { DEFAULT_UA } from "./constants.ts";

type HttpVerb = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";

Expand Down
18 changes: 9 additions & 9 deletions federation/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import {
NoteSchema,
UnfollowSchema,
UserSchema,
} from "./schemas/base";
import { ContentFormatSchema } from "./schemas/content_format";
import { ExtensionPropertySchema } from "./schemas/extensions";
import { CustomEmojiExtensionSchema } from "./schemas/extensions/custom_emojis";
import { DislikeSchema, LikeSchema } from "./schemas/extensions/likes";
import { VoteSchema } from "./schemas/extensions/polls";
import { ReactionSchema } from "./schemas/extensions/reactions";
import { ShareSchema } from "./schemas/extensions/share";
import { VanityExtensionSchema } from "./schemas/extensions/vanity";
} from "./schemas/base.ts";
import { ContentFormatSchema } from "./schemas/content_format.ts";
import { ExtensionPropertySchema } from "./schemas/extensions.ts";
import { CustomEmojiExtensionSchema } from "./schemas/extensions/custom_emojis.ts";
import { DislikeSchema, LikeSchema } from "./schemas/extensions/likes.ts";
import { VoteSchema } from "./schemas/extensions/polls.ts";
import { ReactionSchema } from "./schemas/extensions/reactions.ts";
import { ShareSchema } from "./schemas/extensions/share.ts";
import { VanityExtensionSchema } from "./schemas/extensions/vanity.ts";

export {
NoteSchema as Note,
Expand Down
Loading

0 comments on commit 23936d5

Please sign in to comment.