refactor: use buffer.subarray instead of deprecated slice

This commit is contained in:
Zoltan Kochan
2025-03-14 19:11:42 +01:00
parent c1f09d48fa
commit 9f65fe533a

View File

@@ -24,7 +24,7 @@ export function addFilesFromTarball (
for (const [relativePath, { mode, offset, size }] of files) {
if (ignore(relativePath)) continue
const fileBuffer = tarContent.slice(offset, offset + size)
const fileBuffer = tarContent.subarray(offset, offset + size)
if (readManifest && relativePath === 'package.json') {
manifestBuffer = fileBuffer
}