mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 13:02:03 -04:00
refactor: use buffer.subarray instead of deprecated slice
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user