From 0f4aa397ee572ffb5ce1ed0677c940e02a8f4bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sat, 3 Mar 2018 02:27:44 +0300 Subject: [PATCH] chore: Avoid using deprecated Buffer constructor (#1510) safe-buffer is already used and provides Buffer.alloc polyfill, so just use Buffer.alloc directly to avoid hitting deprecated API. Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor --- lib/bindings/mock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bindings/mock.js b/lib/bindings/mock.js index 32f943364..711acf0bf 100644 --- a/lib/bindings/mock.js +++ b/lib/bindings/mock.js @@ -17,7 +17,7 @@ class MockBinding extends BaseBinding { this.isOpen = false; this.port = null; this.lastWrite = null; - this.recording = new Buffer(0); + this.recording = Buffer.alloc(0); this.writeOperation = null; // in flight promise or null }