Skip to content

Conversation

@tim-lai
Copy link
Contributor

@tim-lai tim-lai commented May 29, 2020

Description

Replace new Buffer() with Buffer.from()

ref: https://nodejs.org/fa/docs/guides/buffer-constructor-deprecation/

Motivation and Context

PR #1500 introduced new tests that used new Buffer(), which was not captured in the review.

DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead

How Has This Been Tested?

deprecation warnings no longer present in test result

Screenshots (if appropriate):

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tim-lai tim-lai merged commit 0987f3f into swagger-api:master May 29, 2020
@tim-lai tim-lai deleted the fix/buffer-deprecation branch June 5, 2020 22:50
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.

1 participant