Unverified Commit 0648a109 authored by Florentin / 珞辰's avatar Florentin / 珞辰 Committed by GitHub

add version to function config manifest (#52507)

Adds `version` to function config manifest as suggested in https://github.com/vercel/vercel/pull/10069#discussion_r1255021336
parent d175aea2
......@@ -1737,9 +1737,17 @@ export default async function build(
}
if (Object.keys(functionsConfigManifest).length > 0) {
const manifest: {
version: number
functions: Record<string, Record<string, string | number>>
} = {
version: 1,
functions: functionsConfigManifest,
}
await fs.writeFile(
path.join(distDir, SERVER_DIRECTORY, FUNCTIONS_CONFIG_MANIFEST),
JSON.stringify(functionsConfigManifest, null, 2)
JSON.stringify(manifest, null, 2)
)
}
......
......@@ -14,27 +14,30 @@ createNextDescribe(
expect(functionsConfigManifest).toMatchInlineSnapshot(`
Object {
"/api/page-route": Object {
"maxDuration": 1,
},
"/app-route": Object {
"maxDuration": 1,
},
"/app-route-edge": Object {
"maxDuration": 2,
},
"/app-ssr": Object {
"maxDuration": 3,
},
"/app-ssr-edge": Object {
"maxDuration": 4,
},
"/page": Object {
"maxDuration": 2,
},
"/page-ssr": Object {
"maxDuration": 3,
"functions": Object {
"/api/page-route": Object {
"maxDuration": 1,
},
"/app-route": Object {
"maxDuration": 1,
},
"/app-route-edge": Object {
"maxDuration": 2,
},
"/app-ssr": Object {
"maxDuration": 3,
},
"/app-ssr-edge": Object {
"maxDuration": 4,
},
"/page": Object {
"maxDuration": 2,
},
"/page-ssr": Object {
"maxDuration": 3,
},
},
"version": 1,
}
`)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment