Eliminate buffer deprecation warning

Summary: Fixed deprecated Buffer warning that is shown at startup

Reviewed By: passy

Differential Revision: D18272158

fbshipit-source-id: ca932b1ff76f15e5563e21de66463a47616600d9
This commit is contained in:
Michel Weststrate
2019-11-04 08:46:57 -08:00
committed by Facebook Github Bot
parent c1130a167b
commit b2cf34bc2f
4 changed files with 250 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/adbkit-logcat/lib/logcat/parser/binary.js b/node_modules/adbkit-logcat/lib/logcat/parser/binary.js
index 12fa8ec..e122933 100644
--- a/node_modules/adbkit-logcat/lib/logcat/parser/binary.js
+++ b/node_modules/adbkit-logcat/lib/logcat/parser/binary.js
@@ -10,7 +10,7 @@ const HEADER_SIZE_MAX = 100
class Binary extends EventEmitter {
constructor(options) {
super(options)
- this.buffer = new Buffer(0)
+ this.buffer = Buffer.alloc(0)
}
parse(chunk) {