Skip to content

Commit 5aca695

Browse files
authored
Merge pull request #1836
build(deps): bump socket.io from 2.1.1 to 2.4.0 in /packages/browser-sync
2 parents 4acc350 + 8ee49b1 commit 5aca695

5 files changed

Lines changed: 189 additions & 86 deletions

File tree

packages/browser-sync-ui/lib/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function insertPageMarkupFromHooks(app, pages, markup) {
9797
if (req.url === "/" || pages[req.url.slice(1)]) {
9898
res.writeHead(200, {"Content-Type": "text/html", "Content-Encoding": "gzip"});
9999
if (!cached) {
100-
var buf = new Buffer(markup, "utf-8");
100+
var buf = Buffer.from(markup, "utf-8");
101101
zlib.gzip(buf, function (_, result) {
102102
cached = result;
103103
res.end(result);
@@ -138,7 +138,7 @@ function serveFile(path, type, string) {
138138
if (gzipCache[path]) {
139139
return res.end(gzipCache[path]);
140140
}
141-
var buf = new Buffer(string, "utf-8");
141+
var buf = Buffer.from(string, "utf-8");
142142
zlib.gzip(buf, function (_, result) {
143143
gzipCache[path] = result;
144144
res.end(result);

0 commit comments

Comments
 (0)