Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using deprecated Buffer constructor #1510

Merged
merged 1 commit into from Mar 2, 2018

Conversation

3 participants
@ChALkeR
Copy link
Contributor

commented Mar 2, 2018

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

Avoid using deprecated Buffer constructor
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

This comment has been minimized.

Copy link

commented Mar 2, 2018

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

This comment has been minimized.

Copy link
Member

commented Mar 2, 2018

That's the only place? Perfect 👌

@reconbot reconbot merged commit 0c1533b into serialport:master Mar 2, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ChALkeR

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2018

@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

chore: Avoid using deprecated Buffer constructor (serialport#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

@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.
You can’t perform that action at this time.