mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
Merge branch 'main' into next
This commit is contained in:
commit
d37390ea13
3 changed files with 30 additions and 2 deletions
20
.changeset/weak-dancers-beam.md
Normal file
20
.changeset/weak-dancers-beam.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
'@astrojs/vercel': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Deprecates the `functionPerRoute` option
|
||||||
|
|
||||||
|
This option is now deprecated, and will be removed entirely in Astro v5.0. We suggest removing this option from your configuration as soon as you are able to:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
import { defineConfig } from 'astro/config';
|
||||||
|
import vercel from '@astrojs/vercel/serverless';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
// ...
|
||||||
|
output: 'server',
|
||||||
|
adapter: vercel({
|
||||||
|
- functionPerRoute: true,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
```
|
|
@ -30,7 +30,7 @@
|
||||||
"test:smoke:example": "turbo run build --concurrency=100% --filter=\"@example/*\"",
|
"test:smoke:example": "turbo run build --concurrency=100% --filter=\"@example/*\"",
|
||||||
"test:smoke:docs": "turbo run build --filter=docs",
|
"test:smoke:docs": "turbo run build --filter=docs",
|
||||||
"test:check-examples": "node ./scripts/smoke/check.js",
|
"test:check-examples": "node ./scripts/smoke/check.js",
|
||||||
"test:vite-ci": "turbo run test --filter=astro",
|
"test:vite-ci": "cd packages/astro && pnpm run test:node",
|
||||||
"test:e2e": "cd packages/astro && pnpm playwright install chromium firefox && pnpm run test:e2e",
|
"test:e2e": "cd packages/astro && pnpm playwright install chromium firefox && pnpm run test:e2e",
|
||||||
"test:e2e:match": "cd packages/astro && pnpm playwright install chromium firefox && pnpm run test:e2e:match",
|
"test:e2e:match": "cd packages/astro && pnpm playwright install chromium firefox && pnpm run test:e2e:match",
|
||||||
"test:e2e:hosts": "turbo run test:hosted",
|
"test:e2e:hosts": "turbo run test:hosted",
|
||||||
|
|
|
@ -134,7 +134,10 @@ export interface VercelServerlessConfig {
|
||||||
/** Whether to create the Vercel Edge middleware from an Astro middleware in your code base. */
|
/** Whether to create the Vercel Edge middleware from an Astro middleware in your code base. */
|
||||||
edgeMiddleware?: boolean;
|
edgeMiddleware?: boolean;
|
||||||
|
|
||||||
/** Whether to split builds into a separate function for each route. */
|
/**
|
||||||
|
* Whether to split builds into a separate function for each route.
|
||||||
|
* @deprecated `functionPerRoute` is deprecated and will be removed in the next major release of the adapter.
|
||||||
|
*/
|
||||||
functionPerRoute?: boolean;
|
functionPerRoute?: boolean;
|
||||||
|
|
||||||
/** The maximum duration (in seconds) that Serverless Functions can run before timing out. See the [Vercel documentation](https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration) for the default and maximum limit for your account plan. */
|
/** The maximum duration (in seconds) that Serverless Functions can run before timing out. See the [Vercel documentation](https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration) for the default and maximum limit for your account plan. */
|
||||||
|
@ -286,6 +289,11 @@ export default function vercelServerless({
|
||||||
`\tMake sure to check your plan carefully to avoid incurring additional costs.\n` +
|
`\tMake sure to check your plan carefully to avoid incurring additional costs.\n` +
|
||||||
`\tYou can set functionPerRoute: false to prevent surpassing the limit.\n`,
|
`\tYou can set functionPerRoute: false to prevent surpassing the limit.\n`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
logger.warn(
|
||||||
|
`\n` +
|
||||||
|
`\t\`functionPerRoute\` is deprecated and will be removed in a future version of the adapter.\n`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setAdapter(
|
setAdapter(
|
||||||
|
|
Loading…
Add table
Reference in a new issue