From b5722da157d35d9620a561002cc85d7f4f6bf39b Mon Sep 17 00:00:00 2001 From: Aditya kumar singh <143548997+Adityakk9031@users.noreply.github.com> Date: Thu, 10 Sep 2026 18:31:40 +0530 Subject: [PATCH] style: apply biome formatting and lint fixes for CI --- packages/tools/bin/supermemory-export.ts | 6 ++-- packages/tools/src/export-memories.test.ts | 33 +++++++++++++++----- packages/tools/src/index.ts | 1 - packages/tools/src/shared/export-memories.ts | 4 ++- packages/tools/src/shared/index.ts | 1 - 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/packages/tools/bin/supermemory-export.ts b/packages/tools/bin/supermemory-export.ts index 818a4dad..c0f149b8 100644 --- a/packages/tools/bin/supermemory-export.ts +++ b/packages/tools/bin/supermemory-export.ts @@ -110,9 +110,11 @@ async function main() { if (values.out) { await writeFile(values.out, output, "utf-8") - console.error(`✓ Successfully exported memories for '${tag}' to ${values.out}`) + console.error( + `✓ Successfully exported memories for '${tag}' to ${values.out}`, + ) } else { - process.stdout.write(output + "\n") + process.stdout.write(`${output}\n`) } } catch (err: unknown) { console.error( diff --git a/packages/tools/src/export-memories.test.ts b/packages/tools/src/export-memories.test.ts index 3fd20aa1..78d289d8 100644 --- a/packages/tools/src/export-memories.test.ts +++ b/packages/tools/src/export-memories.test.ts @@ -9,10 +9,18 @@ import { function createMockFetch(responses: MemoriesListResponse[]) { let callCount = 0 - const fetchMock = async (url: string | URL | Request, init?: RequestInit) => { + const fetchMock = async ( + _url: string | URL | Request, + _init?: RequestInit, + ) => { const pageResponse = responses[callCount] || { memoryEntries: [], - pagination: { currentPage: callCount + 1, limit: 10, totalItems: 0, totalPages: 1 }, + pagination: { + currentPage: callCount + 1, + limit: 10, + totalItems: 0, + totalPages: 1, + }, } callCount++ @@ -35,7 +43,10 @@ describe("listMemoriesRequest", () => { let capturedUrl = "" let capturedInit: RequestInit | undefined - const customFetch = async (url: string | URL | Request, init?: RequestInit) => { + const customFetch = async ( + url: string | URL | Request, + init?: RequestInit, + ) => { capturedUrl = String(url) capturedInit = init return { @@ -53,7 +64,12 @@ describe("listMemoriesRequest", () => { updatedAt: "2026-09-01T10:00:00.000Z", }, ], - pagination: { currentPage: 1, limit: 10, totalItems: 1, totalPages: 1 }, + pagination: { + currentPage: 1, + limit: 10, + totalItems: 1, + totalPages: 1, + }, }), } as Response } @@ -67,9 +83,9 @@ describe("listMemoriesRequest", () => { expect(capturedUrl).toBe("http://localhost:6767/v4/memories/list") expect(capturedInit?.method).toBe("POST") - expect((capturedInit?.headers as Record)?.Authorization).toBe( - "Bearer sm_test_key", - ) + expect( + (capturedInit?.headers as Record)?.Authorization, + ).toBe("Bearer sm_test_key") const parsedBody = JSON.parse(String(capturedInit?.body)) expect(parsedBody.containerTags).toEqual(["user_123"]) expect(parsedBody.page).toBe(1) @@ -83,7 +99,8 @@ describe("listMemoriesRequest", () => { ok: false, status: 400, statusText: "Bad Request", - text: async () => JSON.stringify({ error: "Container tag is required" }), + text: async () => + JSON.stringify({ error: "Container tag is required" }), }) as unknown as Response expect( diff --git a/packages/tools/src/index.ts b/packages/tools/src/index.ts index ba52db4c..f9c59897 100644 --- a/packages/tools/src/index.ts +++ b/packages/tools/src/index.ts @@ -24,4 +24,3 @@ export { type ExportMemoriesOptions, type MemoriesExportData, } from "./shared" - diff --git a/packages/tools/src/shared/export-memories.ts b/packages/tools/src/shared/export-memories.ts index 4a806373..f706c2cf 100644 --- a/packages/tools/src/shared/export-memories.ts +++ b/packages/tools/src/shared/export-memories.ts @@ -218,7 +218,9 @@ export async function exportMemoriesAsMarkdown( lines.push(`- **Created:** ${m.createdAt}`) lines.push(`- **Updated:** ${m.updatedAt}`) if (m.documentIds && m.documentIds.length > 0) { - lines.push(`- **Source Documents:** ${m.documentIds.map((d) => `\`${d}\``).join(", ")}`) + lines.push( + `- **Source Documents:** ${m.documentIds.map((d) => `\`${d}\``).join(", ")}`, + ) } if (m.history && m.history.length > 0) { lines.push(`- **Previous Revisions:** ${m.history.length}`) diff --git a/packages/tools/src/shared/index.ts b/packages/tools/src/shared/index.ts index 943e0c18..5df5c1a2 100644 --- a/packages/tools/src/shared/index.ts +++ b/packages/tools/src/shared/index.ts @@ -66,4 +66,3 @@ export { type ExportMemoriesOptions, type MemoriesExportData, } from "./export-memories" -