Skip to content

Commit

Permalink
Update @vercel/nft from 0.10.0 to 0.19.1 (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofhouse authored May 30, 2022
1 parent e96ce9a commit 2a9243b
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 47 deletions.
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/semver": "6.0.0",
"@types/yazl": "2.4.1",
"@vercel/build-utils": "2.17.0",
"@vercel/nft": "0.10.0",
"@vercel/nft": "0.19.1",
"@vercel/routing-utils": "1.10.1",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",
Expand Down
10 changes: 5 additions & 5 deletions packages/runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1153,16 +1153,16 @@ export async function build({
debug(`node-file-trace result for pages: ${fileList}`);

const lstatSema = new Sema(25, {
capacity: fileList.length + apiFileList.length,
capacity: fileList.size + apiFileList.size,
});
const lstatResults: { [key: string]: ReturnType<typeof lstat> } = {};

const collectTracedFiles = (
reasons: NodeFileTraceReasons,
files: { [filePath: string]: FileFsRef }
) => async (file: string) => {
const reason = reasons[file];
if (reason && reason.type === 'initial') {
const reason = reasons.get(file);
if (reason && reason.type.indexOf( 'initial') !== -1) {
// Initial files are manually added to the lambda later
return;
}
Expand All @@ -1183,10 +1183,10 @@ export async function build({
};

await Promise.all(
fileList.map(collectTracedFiles(nonApiReasons, tracedFiles))
Array.from(fileList).map(collectTracedFiles(nonApiReasons, tracedFiles))
);
await Promise.all(
apiFileList.map(collectTracedFiles(apiReasons, apiTracedFiles))
Array.from(apiFileList).map(collectTracedFiles(apiReasons, apiTracedFiles))
);

if (hasLambdas) {
Expand Down
Loading

0 comments on commit 2a9243b

Please sign in to comment.