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 npm scripts instead of gulp #530

Merged
merged 3 commits into from
Sep 1, 2017

Conversation

darrachequesne
Copy link
Member

The kind of change this PR does introduce

  • other

@darrachequesne darrachequesne merged commit fd20b91 into socketio:master Sep 1, 2017
@darrachequesne darrachequesne deleted the chore/remove-gulp branch September 1, 2017 12:22
@darrachequesne darrachequesne added this to the 3.1.1 milestone Oct 11, 2017
@@ -136,7 +136,7 @@ Polling.prototype.onDataRequest = function (req, res) {
this.dataReq = req;
this.dataRes = res;

var chunks = isBinary ? new Buffer(0) : '';
var chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
Copy link

Choose a reason for hiding this comment

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

Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ChALkeR

> eslint lib/ test/ *.js

~/engine.io/lib/transports/polling.js
  165:27  error  'new Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead  node/no-deprecated-api

Choose a reason for hiding this comment

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

@darrachequesne I think the question is, why add the eslint-disable-line instead of going with the advice in the deprecation message and using Buffer.alloc(0)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Next question then 😄 : do you suggest adding yet another dependency (safe-buffer), or losing support for Node.js <4.5.0?

Copy link

Choose a reason for hiding this comment

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

@darrachequesne Any of those would be fine. Is there a reason for keeping support to Node.js versions <4.5.0? Those are obsolete and are not getting security updates. Even 4.x branch would be out of security support in a few months.

Also, you can use Buffer.concat([]) for this specific line (to construct an empty Buffer) to keep support for old Node.js versions and avoid hitting deprecated API. But I would recommend just to drop support for everything older than 4.5.0.

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.

3 participants