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

Segment Emitter, remove unsafe Buffer method #147

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Segment Emitter, remove unsafe Buffer method #147

merged 1 commit into from
Aug 15, 2019

Conversation

thegareth
Copy link
Contributor

No Issue

the Segment_emitter used the deprecated New Buffer(data) constructor which caused warnings on newer Node runtimes, and is noise in CloudWatch Logs.

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

One buffer is used, and this has been replaced by the newer Buffer.from(data) construct.

This solution will not work for node version prior to 6: it's a simple replacement rather than a more complicated backwards compatible solution Detailed here.

Given that AWS only supports 8.10 or 10.x, I submit this anyway, and you can take a decision is compatibility is of concern.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@thegareth thegareth changed the title Segment Emit, remove unsafe Buffer method Segment Emitter, remove unsafe Buffer method Jun 28, 2019
@luluzhao luluzhao requested a review from haotianw465 July 11, 2019 20:35
@haotianw465
Copy link
Contributor

We do have a plan of releasing a new major version of the SDK. The proposed change set includes dropping support of Node4 and 6. There is an issue open for collecting feedback: #157. This change will go with the new major version. We don't have an ETA yet but will update progress on that issue.

@haotianw465 haotianw465 merged commit 4357337 into aws:master Aug 15, 2019
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.

2 participants