Skip to content

Commit

Permalink
Merge pull request #320 from github/simon-engledew/fix-DEP0005-buffer
Browse files Browse the repository at this point in the history
Fix deprecated method Buffer.new
  • Loading branch information
Simon Engledew authored and GitHub committed Nov 25, 2020
2 parents 27520b9 + 582f792 commit 378f1f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tracer-config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tracer-config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/tracer-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function concatTracerConfigs(
for (const e of Object.entries(env)) {
const key = e[0];
const value = e[1];
const lineBuffer = new Buffer(`${key}=${value}\0`, "utf8");
const lineBuffer = Buffer.from(`${key}=${value}\0`, "utf8");
const sizeBuffer = Buffer.alloc(4);
sizeBuffer.writeInt32LE(lineBuffer.length, 0);
buffer = Buffer.concat([buffer, sizeBuffer, lineBuffer]);
Expand Down

0 comments on commit 378f1f9

Please sign in to comment.