From 56f06fa115d6ad29ca74a8108da8f0e047ad5c6e Mon Sep 17 00:00:00 2001 From: Jonas Jesus Date: Fri, 5 Jun 2026 11:17:15 -0300 Subject: [PATCH] style: fix biome formatter errors in algolia and vtex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply biome auto-format fixes to resolve the 3 formatter errors reported by `npm run lint`. No behavior changes — line wrapping only. Co-Authored-By: Claude Opus 4.7 --- algolia/client.ts | 5 +++-- vtex/__tests__/client-set-cookie-forward.test.ts | 4 +--- vtex/utils/fetchCache.ts | 6 +----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/algolia/client.ts b/algolia/client.ts index 937494a..2453650 100644 --- a/algolia/client.ts +++ b/algolia/client.ts @@ -116,8 +116,9 @@ export async function initAlgoliaFromBlocks( const searchApiKey = typeof block.searchApiKey === "string" ? block.searchApiKey : ""; const adminApiKeyEnvName: string = - block.adminApiKey && typeof block.adminApiKey === "object" && - typeof (block.adminApiKey as { name?: unknown }).name === "string" + block.adminApiKey && + typeof block.adminApiKey === "object" && + typeof (block.adminApiKey as { name?: unknown }).name === "string" ? (block.adminApiKey as { name: string }).name : ""; const adminApiKey = (await resolveSecret(block.adminApiKey, adminApiKeyEnvName)) ?? ""; diff --git a/vtex/__tests__/client-set-cookie-forward.test.ts b/vtex/__tests__/client-set-cookie-forward.test.ts index 3c33bcc..1242e24 100644 --- a/vtex/__tests__/client-set-cookie-forward.test.ts +++ b/vtex/__tests__/client-set-cookie-forward.test.ts @@ -168,9 +168,7 @@ describe("vtexFetchWithCookies — inbound Set-Cookie capture", () => { setVtexFetch((() => Promise.resolve( mockResponse({ - setCookies: [ - "checkout.vtex.com=__ofid=abc; Domain=.vtexcommercestable.com.br; Path=/", - ], + setCookies: ["checkout.vtex.com=__ofid=abc; Domain=.vtexcommercestable.com.br; Path=/"], }), )) as typeof fetch); // No withRequest wrapper → RequestContext.current is null. diff --git a/vtex/utils/fetchCache.ts b/vtex/utils/fetchCache.ts index 93813fd..40ba52a 100644 --- a/vtex/utils/fetchCache.ts +++ b/vtex/utils/fetchCache.ts @@ -61,11 +61,7 @@ function isRetryable(response: Response): boolean { * without this, a never-settling Promise leaks the Map slot forever and * every subsequent request for the same key joins the zombie Promise. */ -function withTimeout( - work: Promise, - ms: number, - label: string, -): Promise { +function withTimeout(work: Promise, ms: number, label: string): Promise { let timer: ReturnType | undefined; const timeout = new Promise((_, reject) => { timer = setTimeout(() => {