Bump buffer-alloc to 1.2.0 and to-buffer to 1.1.1 #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been seeing warnings for a while when using the Yarn package manager about the
Buffer
constructor API being deprecated in favor ofBuffer.from
andBuffer.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.Buffer.alloc
Buffer.from
and uses it if it's available. Also I just realized to-buffer is also your project so you knew that already 🙂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