Skip to content

Commit 78591a7

Browse files
committed
fmt
1 parent d960fd2 commit 78591a7

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

apps/api/src/gmail-imap.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ export function createGmailImapMailboxSyncClient(
135135
const messagesByIdentity = new Map<string, ImapMessage>();
136136
let fetchedMessageCount = 0;
137137

138-
for (const mailbox of mailboxes.filter(
139-
(candidate) =>
140-
requestedMailboxes.some((requestedMailbox) => requestedMailbox.id === candidate.path),
138+
for (const mailbox of mailboxes.filter((candidate) =>
139+
requestedMailboxes.some((requestedMailbox) => requestedMailbox.id === candidate.path),
141140
)) {
142141
if (isNonSelectableMailbox(mailbox)) {
143142
continue;
@@ -168,7 +167,8 @@ export function createGmailImapMailboxSyncClient(
168167
logInfo("gmail.messages.mailbox.fetch", {
169168
accountId: account.id,
170169
mailboxId: mailbox.path,
171-
range: typeof range === "string" ? range : `since:${requestedMailbox?.since?.toISOString()}`,
170+
range:
171+
typeof range === "string" ? range : `since:${requestedMailbox?.since?.toISOString()}`,
172172
messageCount,
173173
mode: incremental ? "incremental" : "backfill",
174174
});

apps/api/src/persistence.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,7 @@ export class MailDatabase {
406406
}
407407

408408
saveMessage(message: StoredMessage): { inserted: boolean } {
409-
const existing = this.database
410-
.prepare("SELECT 1 FROM messages WHERE id = ?")
411-
.get(message.id);
409+
const existing = this.database.prepare("SELECT 1 FROM messages WHERE id = ?").get(message.id);
412410

413411
this.database
414412
.prepare(`

tests/sync-jobs-ui.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ describe("Sync jobs UI", () => {
4444

4545
it("lets the App user schedule custom range Sync jobs from the account context menu", () => {
4646
expect(appVue).toContain("function accountContextMenuItems(account: MailAccountMailboxTree)");
47-
expect(appVue).toContain("<UContextMenu :items=\"accountContextMenuItems(account)\">");
47+
expect(appVue).toContain('<UContextMenu :items="accountContextMenuItems(account)">');
4848
expect(appVue).toContain("function submitCustomSync()");
49-
expect(appVue).toContain("syncJobMutation.mutate({ accountId: customSyncAccountId.value, days: customSyncDays.value })");
49+
expect(appVue).toContain(
50+
"syncJobMutation.mutate({ accountId: customSyncAccountId.value, days: customSyncDays.value })",
51+
);
5052
expect(appVue).toContain("<UModal");
5153
expect(appVue).toContain("<USelect");
5254
expect(appVue).toContain('@submit.prevent="submitCustomSync"');
@@ -57,7 +59,7 @@ describe("Sync jobs UI", () => {
5759

5860
it("formats message dates as local YYYY-MM-DD HH:mm", () => {
5961
expect(appVue).toContain("function formatDate(value: string): string");
60-
expect(appVue).toContain('return `${year}-${month}-${day} ${hour}:${minute}`;');
62+
expect(appVue).toContain("return `${year}-${month}-${day} ${hour}:${minute}`;");
6163
expect(appVue).not.toContain('month: "short"');
6264
});
6365

tests/web-api-pagination.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ describe("web message list API pagination", () => {
1616

1717
await fetchMessagesForMailbox("personal", "INBOX", { limit: 100, cursor: "cursor-1" }, fetcher);
1818
await fetchUnreadMessagesForAccount("personal", { limit: 100, cursor: "cursor-2" }, fetcher);
19-
await searchMessagesForAccount("personal", "hello world", { limit: 100, cursor: "cursor-3" }, fetcher);
19+
await searchMessagesForAccount(
20+
"personal",
21+
"hello world",
22+
{ limit: 100, cursor: "cursor-3" },
23+
fetcher,
24+
);
2025

2126
expect(paths).toEqual([
2227
"/api/mail-accounts/personal/mailboxes/INBOX/messages?limit=100&cursor=cursor-1",

0 commit comments

Comments
 (0)