diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 36e6d7fe18..0be4c97029 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -17,7 +17,9 @@ "bugs": "https://github.com/withastro/astro/issues", "homepage": "https://docs.astro.build/en/guides/integrations-guide/vercel/", "exports": { - ".": { "types": "./types.d.ts" }, + ".": { + "types": "./types.d.ts" + }, "./serverless": "./dist/serverless/adapter.js", "./serverless/entrypoint": "./dist/serverless/entrypoint.js", "./static": "./dist/static/adapter.js", diff --git a/packages/integrations/vercel/src/serverless/middleware.ts b/packages/integrations/vercel/src/serverless/middleware.ts index 0518f6842d..f232b10602 100644 --- a/packages/integrations/vercel/src/serverless/middleware.ts +++ b/packages/integrations/vercel/src/serverless/middleware.ts @@ -1,13 +1,13 @@ import { existsSync } from 'node:fs'; import { builtinModules } from 'node:module'; import { fileURLToPath, pathToFileURL } from 'node:url'; +import type { AstroIntegrationLogger } from 'astro'; import { ASTRO_LOCALS_HEADER, ASTRO_MIDDLEWARE_SECRET_HEADER, ASTRO_PATH_HEADER, NODE_PATH, } from './adapter.js'; -import type { AstroIntegrationLogger } from 'astro'; /** * It generates the Vercel Edge Middleware file. @@ -77,7 +77,9 @@ function edgeMiddlewareTemplate( let handlerTemplateImport = ''; let handlerTemplateCall = '{}'; if (existsSync(filePathEdgeMiddleware + '.js') || existsSync(filePathEdgeMiddleware + '.ts')) { - logger.warn('Usage of `vercel-edge-middleware.js` is deprecated. You can now use the `waitUntil(promise)` function directly as `ctx.locals.waitUntil(promise)`.') + logger.warn( + 'Usage of `vercel-edge-middleware.js` is deprecated. You can now use the `waitUntil(promise)` function directly as `ctx.locals.waitUntil(promise)`.' + ); const stringified = JSON.stringify(filePathEdgeMiddleware.replace(/\\/g, '/')); handlerTemplateImport = `import handler from ${stringified}`; handlerTemplateCall = `await handler({ request, context })`; diff --git a/packages/integrations/vercel/types.d.ts b/packages/integrations/vercel/types.d.ts index bde81aa7a0..95719f5bc6 100644 --- a/packages/integrations/vercel/types.d.ts +++ b/packages/integrations/vercel/types.d.ts @@ -1,5 +1,5 @@ export interface EdgeLocals { - vercel: { - edge: import("@vercel/edge").RequestContext; - } + vercel: { + edge: import('@vercel/edge').RequestContext; + }; }