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

Use Buffer.isBuffer instead of util.isBuffer. #1593

Merged
merged 2 commits into from Feb 9, 2018

Conversation

NatalieWolfe
Copy link
Contributor

Pre-Submission Checklist

  • Opened an issue discussing these changes before opening the PR
  • Ran the linter and tests via make prepush
  • Included comprehensive and convincing tests for changes

Issues

No issues opened for this.

Changes

Replaced util.isBuffer call with Buffer.isBuffer.

util.isBuffer was introduced in Node 0.11 and deprecated in Node 4. Buffer.isBuffer was introduced in Node 0.1 and has not been deprecated. Since Restify supports back to 0.10 according to the package.json engines field, util.isBuffer cannot be used.

@retrohacker
Copy link
Member

Awesome! Thank you for this!

Looks like the tests are failing lint, util is no longer used in that file.

Copy link
Member

@retrohacker retrohacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming removing util gets the tests to pass, I'm 👍 for merging this!

Thank you @NatalieWolfe! ❤️

@NatalieWolfe
Copy link
Contributor Author

@retrohacker Yup, forgot to commit that correction after running the tests! Original change was done via GitHub's web UI which doesn't run commit hooks.

NatalieWolfe added a commit to newrelic/node-newrelic that referenced this pull request Feb 1, 2018
@NatalieWolfe
Copy link
Contributor Author

@retrohacker The tests are passing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants