mafintosh / tar-stream

tar-stream is a streaming tar parser and generator.
MIT License
406 stars 92 forks source link

Bump buffer-alloc to 1.2.0 and to-buffer to 1.1.1 #91

Closed jake-low closed 5 years ago

jake-low commented 5 years ago

I've been seeing warnings for a while when using the Yarn package manager about the Buffer constructor API being deprecated in favor of Buffer.from and Buffer.alloc.

Yarn depends on tar-stream, and two of tar-stream's dependencies use new Buffer, but happily newer versions of both those dependencies exist that check if the appropriate new API is available and use that instead.

I ran the tar-stream tests on my machine, and they passed. After that I used yarn link to pull my modified version of tar-stream into my local copy of Yarn, and found that this fixed the deprecation warnings. So once you merge this PR and release a new version of tar-stream, I'll make a PR to Yarn to bump the tar-stream version there, and that should make the message go away for Yarn users.

Cheers! -Jake

mafintosh commented 5 years ago

1.6.2