Skip to content

[fix] Replace deprecated Buffer usage#565

Merged
darrachequesne merged 1 commit intosocketio:masterfrom
oliversalzburg:fix/deprecated-buffer
Nov 19, 2018
Merged

[fix] Replace deprecated Buffer usage#565
darrachequesne merged 1 commit intosocketio:masterfrom
oliversalzburg:fix/deprecated-buffer

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 [email protected].

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

@oliversalzburg
Copy link
Contributor Author

@darrachequesne Should be good now :)

@darrachequesne darrachequesne merged commit 8e38a3c into socketio:master Nov 19, 2018
@darrachequesne darrachequesne added this to the 3.3.1 milestone Nov 20, 2018
@oliversalzburg oliversalzburg deleted the fix/deprecated-buffer branch November 20, 2018 11:04
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