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

[fix] Replace deprecated Buffer usage #565

Merged
merged 1 commit into from
Nov 19, 2018
Merged

[fix] Replace deprecated Buffer usage #565

merged 1 commit into from
Nov 19, 2018

Conversation

oliversalzburg
Copy link
Contributor

@oliversalzburg oliversalzburg commented Nov 15, 2018

The Buffer constructor has been deprecated in favor of safer alternatives.
See https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

The Buffer constructor is used.

New behaviour

Buffer.from is used instead.

Other information (e.g. related issues)

The README has also been adjusted to not use the constructor in the example.

@oliversalzburg
Copy link
Contributor Author

Seems to me like the test failures were introduced by engine.io-client@3.3.0.

@oliversalzburg
Copy link
Contributor Author

I believe socketio/engine.io-client@99bcc62 introduced these failures, because window is not available. I left a comment on the relevant line

@darrachequesne
Copy link
Member

Thanks for the pull request, could you please review my comment? I'll try to fix the issue with json-polling.

The `Buffer` constructor has been deprecated in favor of safer alternatives.
See https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/
@oliversalzburg
Copy link
Contributor Author

@darrachequesne Should be good 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.

2 participants