New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/build-utils

Package Overview
Dependencies
Maintainers
0
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/build-utils - npm Package Compare versions

Comparing version 8.6.0 to 8.7.0

6

CHANGELOG.md
# @vercel/build-utils
## 8.7.0
### Minor Changes
- Support splitting archive deployments in parts. ([#12671](https://github.com/vercel/vercel/pull/12671))
## 8.6.0

@@ -4,0 +10,0 @@

1

dist/fs/stream-to-buffer.d.ts
/// <reference types="node" />
export default function streamToBuffer(stream: NodeJS.ReadableStream): Promise<Buffer>;
export declare function streamToBufferChunks(stream: NodeJS.ReadableStream, chunkSize?: number): Promise<Buffer[]>;

@@ -31,3 +31,4 @@ "use strict";

__export(stream_to_buffer_exports, {
default: () => streamToBuffer
default: () => streamToBuffer,
streamToBufferChunks: () => streamToBufferChunks
});

@@ -58,1 +59,31 @@ module.exports = __toCommonJS(stream_to_buffer_exports);

}
const MB = 1024 * 1024;
async function streamToBufferChunks(stream, chunkSize = 100 * MB) {
const chunks = [];
let currentChunk = [];
let currentSize = 0;
for await (const chunk of stream) {
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
let offset = 0;
while (offset < buffer.length) {
const remainingSpace = chunkSize - currentSize;
const sliceSize = Math.min(remainingSpace, buffer.length - offset);
currentChunk.push(buffer.slice(offset, offset + sliceSize));
currentSize += sliceSize;
offset += sliceSize;
if (currentSize >= chunkSize) {
chunks.push(Buffer.concat(currentChunk));
currentChunk = [];
currentSize = 0;
}
}
}
if (currentChunk.length > 0) {
chunks.push(Buffer.concat(currentChunk));
}
return chunks;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
streamToBufferChunks
});

4

dist/index.d.ts

@@ -13,3 +13,3 @@ import FileBlob from './file-blob';

import { getLatestNodeVersion, getDiscontinuedNodeVersions, getSupportedNodeVersion } from './fs/node-version';
import streamToBuffer from './fs/stream-to-buffer';
import streamToBuffer, { streamToBufferChunks } from './fs/stream-to-buffer';
import debug from './debug';

@@ -22,3 +22,3 @@ import getIgnoreFilter from './get-ignore-filter';

import { validateNpmrc } from './validate-npmrc';
export { FileBlob, FileFsRef, FileRef, Lambda, NodejsLambda, createLambda, Prerender, download, downloadFile, DownloadedFiles, getWriteableDirectory, glob, GlobOptions, rename, spawnAsync, getScriptName, installDependencies, runPackageJsonScript, execCommand, spawnCommand, walkParentDirs, getNodeBinPath, getNodeBinPaths, getSupportedNodeVersion, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, getEnvForPackageManager, getNodeVersion, getPathForPackageManager, getLatestNodeVersion, getDiscontinuedNodeVersions, getSpawnOptions, getPlatformEnv, getPrefixedEnvVars, streamToBuffer, debug, isSymbolicLink, isDirectory, getLambdaOptionsFromFunction, scanParentDirs, getIgnoreFilter, cloneEnv, hardLinkDir, traverseUpDirectories, validateNpmrc, };
export { FileBlob, FileFsRef, FileRef, Lambda, NodejsLambda, createLambda, Prerender, download, downloadFile, DownloadedFiles, getWriteableDirectory, glob, GlobOptions, rename, spawnAsync, getScriptName, installDependencies, runPackageJsonScript, execCommand, spawnCommand, walkParentDirs, getNodeBinPath, getNodeBinPaths, getSupportedNodeVersion, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, getEnvForPackageManager, getNodeVersion, getPathForPackageManager, getLatestNodeVersion, getDiscontinuedNodeVersions, getSpawnOptions, getPlatformEnv, getPrefixedEnvVars, streamToBuffer, streamToBufferChunks, debug, isSymbolicLink, isDirectory, getLambdaOptionsFromFunction, scanParentDirs, getIgnoreFilter, cloneEnv, hardLinkDir, traverseUpDirectories, validateNpmrc, };
export { EdgeFunction } from './edge-function';

@@ -25,0 +25,0 @@ export { readConfigFile } from './fs/read-config-file';

{
"name": "@vercel/build-utils",
"version": "8.6.0",
"version": "8.7.0",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc