From eb8bffe67a1e17e30162dae84229ea2737b6c529 Mon Sep 17 00:00:00 2001 From: Arsh Date: Fri, 23 Feb 2024 15:27:44 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/request.ts | 2 +- packages/astro/src/vite-plugin-astro-server/route.ts | 2 +- .../astro/test/units/vite-plugin-astro-server/request.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/request.ts b/packages/astro/src/core/request.ts index dadd367cceb4..4f70c99dc14b 100644 --- a/packages/astro/src/core/request.ts +++ b/packages/astro/src/core/request.ts @@ -36,7 +36,7 @@ export function createRequest({ : new Headers(Object.entries(headers as Record)); if (typeof url === 'string') url = new URL(url); - + // HACK! astro:assets uses query params for the injected route in `dev` if (removeParams && url.pathname !== '/_image') { url.search = ''; diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index a6457e5a04b0..958fc48c5018 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -229,7 +229,7 @@ export async function handleRoute({ logger, ssr: buildingToSSR, clientAddress: buildingToSSR ? incomingRequest.socket.remoteAddress : undefined, - removeParams: buildingToSSR === false || route.prerender + removeParams: buildingToSSR === false || route.prerender, }); // Set user specified headers to response object. diff --git a/packages/astro/test/units/vite-plugin-astro-server/request.test.js b/packages/astro/test/units/vite-plugin-astro-server/request.test.js index 85513daae1ff..7ea587f97e2f 100644 --- a/packages/astro/test/units/vite-plugin-astro-server/request.test.js +++ b/packages/astro/test/units/vite-plugin-astro-server/request.test.js @@ -80,7 +80,7 @@ describe('vite-plugin-astro-server', () => { describe('url', () => { let container; let settings; - + before(async () => { const root = new URL('../../fixtures/api-routes/', import.meta.url); const fileSystem = {