-
Notifications
You must be signed in to change notification settings - Fork 476
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
expose serverProperties in the connection object #452
expose serverProperties in the connection object #452
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, this looks useful. Thanks!
test/connect.js
Outdated
var config = parts.query || {}; | ||
connect(config, {}, (err, connection) => { | ||
if (err) { return done(err); } | ||
console.dir(connection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this debug output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops, didn't notice there's a new-style function definition, which won't run in older Node.JS (with which this lib still claims compatibility).
test/connect.js
Outdated
var url = require('url'); | ||
var parts = url.parse(URL, true); | ||
var config = parts.query || {}; | ||
connect(config, {}, (err, connection) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah -- CI is failing because this won't parse in older versions of Node.JS.
@squaremo Speaking of compatibility - are there plans to ever drop support for at least the hopelessly old versions (< 4)? |
@kibertoad It is tempting, especially as it's getting difficult to keep Node v10 happy without breaking things for those older versions. https://nodejs.org/metrics/ seems to indicate that versions before v4 are still in wide use, however. |
@squaremo I would argue that these numbers are pretty skewed by many popular libraries (that run CI) still supporting older versions and running tests against them; when you factor in statistics that rely on people actually providing input, numbers are very different: https://nodejs.org/en/user-survey-report/#version |
19c3725
to
0f77300
Compare
Thank you, applied your feedback:
|
Re upgrading With the increased emphasis on security from GitHub and npm (via audit), it's becoming harder and harder to support older node versions. It only takes a single dependency to introduce a newer node feature, then require a security patch, to force your hand. |
I would suggest to continue discussion of whether or not it is preferrable to drop support for older Node.js versions here: #463 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and simple, I like. Thanks for adding a test too :-)
Sometimes is useful to check some properties of the broker.
amqplib for python has this:
https://stackoverflow.com/a/7599072