Skip to content

Avoid using deprecated Buffer constructor#1510

Merged
reconbot merged 1 commit into
serialport:masterfrom
ChALkeR:patch-1
Mar 2, 2018
Merged

Avoid using deprecated Buffer constructor#1510
reconbot merged 1 commit into
serialport:masterfrom
ChALkeR:patch-1

Conversation

@ChALkeR

@ChALkeR ChALkeR commented Mar 2, 2018

Copy link
Copy Markdown
Contributor

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

Tracking: nodejs/node#19079

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
@codecov-io

codecov-io commented Mar 2, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1510 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1510   +/-   ##
=======================================
  Coverage   79.04%   79.04%           
=======================================
  Files          21       21           
  Lines         940      940           
  Branches      170      170           
=======================================
  Hits          743      743           
  Misses        197      197
Impacted Files Coverage Δ
lib/bindings/mock.js 95.79% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45b3a2f...1602ff1. Read the comment docs.

@reconbot

reconbot commented Mar 2, 2018

Copy link
Copy Markdown
Member

That's the only place? Perfect 👌

@ChALkeR

ChALkeR commented Mar 3, 2018

Copy link
Copy Markdown
Contributor Author

@reconbot Yes, this has been done before in 5f53a45 but slipped in again in e8d9d2b due to a linter issue. See mysticatea/eslint-plugin-node#110 for context.

oteku pushed a commit to Cutii/node-serialport that referenced this pull request Apr 9, 2018
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants