From a4e12f0d75eaabc108b1baeea84c3a69b9cae01b Mon Sep 17 00:00:00 2001 From: Hossein Shafagh Date: Wed, 3 Mar 2021 16:02:04 -0800 Subject: [PATCH] (node:73186) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. --- gulp/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp/build.js b/gulp/build.js index 405cacc8..13915051 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -40,7 +40,7 @@ function replaceAll(string, find, replace) { function stringSrc(filename, string) { let src = require('stream').Readable({objectMode: true}); src._read = function () { - this.push(new gutil.File({cwd: '', base: '', path: filename, contents: new Buffer(string)})); + this.push(new gutil.File({cwd: '', base: '', path: filename, contents: Buffer.from(string)})); this.push(null); }; return src;