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

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR 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

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
Copy link

codecov-io 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
Copy link
Member

reconbot commented Mar 2, 2018

That's the only place? Perfect 👌

@ChALkeR
Copy link
Contributor Author

ChALkeR 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
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.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants