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(() => {