mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 12:57:47 +00:00
[next] Re-enable shared lambdas by default (#4757)
This re-enables the shared lambdas optimization by default and also adds additional tests to ensure that when a `now.json` or `vercel.json` contains either `routes` or `functions` configs the shared lambda optimization is disabled. Additional test deployments done: - minimal `now.json` with `builds` config [deploy](https://shared-lambdas-tests-d646fsqju.vercel.app) - `now.json` with `functions` config [deploy](https://shared-lambdas-tests-ahnuosp4s.vercel.app) - `now.json` with `routes` config [deploy](https://shared-lambdas-tests-gulam3jda.vercel.app) - minimal `vercel.json` with `builds` config [deploy](https://shared-lambdas-tests-7ic7wzirs.vercel.app) - `vercel.json` with `functions` config [deploy](https://shared-lambdas-tests-7ic7wzirs.vercel.app) - `vercel.json` with `routes` config [deploy](https://shared-lambdas-tests-rja2391tq.vercel.app)
This commit is contained in:
@@ -5,9 +5,11 @@ const _fetch = require('node-fetch');
|
||||
const fetch = require('./fetch-retry.js');
|
||||
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
async function nowDeploy(bodies, randomness) {
|
||||
async function nowDeploy(bodies, randomness, uploadNowJson) {
|
||||
const files = Object.keys(bodies)
|
||||
.filter(n => n !== 'vercel.json' && n !== 'now.json')
|
||||
.filter(n =>
|
||||
uploadNowJson ? true : n !== 'vercel.json' && n !== 'now.json'
|
||||
)
|
||||
.map(n => ({
|
||||
sha: digestOfFile(bodies[n]),
|
||||
size: bodies[n].length,
|
||||
|
||||
Reference in New Issue
Block a user