mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
[ci] format
This commit is contained in:
parent
a9a3694a98
commit
6599b93f0d
1 changed files with 11 additions and 8 deletions
|
@ -59,9 +59,12 @@ const ISR_PATH = `/_isr?${ASTRO_PATH_PARAM}=$0`;
|
||||||
// https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version
|
// https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version
|
||||||
const SUPPORTED_NODE_VERSIONS: Record<
|
const SUPPORTED_NODE_VERSIONS: Record<
|
||||||
string,
|
string,
|
||||||
{ status: 'default' } | { status: 'beta' } | { status: 'retiring'; removal: Date | string; warnDate: Date } | { status: 'deprecated'; removal: Date }
|
| { status: 'default' }
|
||||||
|
| { status: 'beta' }
|
||||||
|
| { status: 'retiring'; removal: Date | string; warnDate: Date }
|
||||||
|
| { status: 'deprecated'; removal: Date }
|
||||||
> = {
|
> = {
|
||||||
18: { status: 'retiring', removal: "Early 2025", warnDate: new Date('October 1 2024') },
|
18: { status: 'retiring', removal: 'Early 2025', warnDate: new Date('October 1 2024') },
|
||||||
20: { status: 'default' },
|
20: { status: 'default' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -525,12 +528,12 @@ function getRuntime(process: NodeJS.Process, logger: AstroIntegrationLogger): Ru
|
||||||
return `nodejs${major}.x`;
|
return `nodejs${major}.x`;
|
||||||
}
|
}
|
||||||
if (support.status === 'retiring') {
|
if (support.status === 'retiring') {
|
||||||
if (support.warnDate && new Date() >= support.warnDate) {
|
if (support.warnDate && new Date() >= support.warnDate) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.`
|
`Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return `nodejs${major}.x`;
|
return `nodejs${major}.x`;
|
||||||
}
|
}
|
||||||
if (support.status === 'beta') {
|
if (support.status === 'beta') {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|
Loading…
Reference in a new issue