amqplib 0.10.7 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,7 @@ jobs:
48
48
  runs-on: ubuntu-latest
49
49
  steps:
50
50
  - uses: actions/checkout@v3
51
- - uses: actions/setup-node@v3
51
+ - uses: actions/setup-node@v4
52
52
  with:
53
53
  node-version: '20.x'
54
54
  cache: "npm"
@@ -24,9 +24,9 @@ jobs:
24
24
  # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
25
25
 
26
26
  steps:
27
- - uses: actions/checkout@v2
27
+ - uses: actions/checkout@v3
28
28
  - name: Use Node.js ${{ matrix.node-version }}
29
- uses: actions/setup-node@v2
29
+ uses: actions/setup-node@v4
30
30
  with:
31
31
  node-version: ${{ matrix.node-version }}
32
32
  cache: "npm"
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change log for amqplib
2
2
 
3
- ## Unreleased
3
+ ## v0.10.9
4
+ - Add support for IPv6 urls
5
+
6
+ ## v0.10.8
7
+ - Updated README
8
+
9
+ ## v0.10.7
4
10
  - Remove bitsyntax dependency - See https://github.com/amqp-node/amqplib/pull/785. Thanks @ikenfin
5
11
  - Stop checking if frame max is exceeded when parsing frames - See https://github.com/amqp-node/amqplib/pull/784. Thanks @ohroy
6
12
 
package/README.md CHANGED
@@ -5,21 +5,27 @@
5
5
  [![Node.js CI](https://github.com/amqp-node/amqplib/workflows/Node.js%20CI/badge.svg)](https://github.com/amqp-node/amqplib/actions?query=workflow%3A%22Node.js+CI%22)
6
6
  [![amqplib](https://snyk.io/advisor/npm-package/amqplib/badge.svg)](https://snyk.io/advisor/npm-package/amqplib)
7
7
 
8
+ A library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1 client for Node.JS v10+. This library does not implement [AMQP1.0](https://github.com/amqp-node/amqplib/issues/63) or [AMQP0-10](https://github.com/amqp-node/amqplib/issues/94).
9
+
8
10
  npm install amqplib
9
11
 
12
+ ## ❤️ Help Support Jack
13
+ One of my close friends, Jack, was recently diagnosed with terminal brain cancer (grade 4 astrocytoma). He’s a young father facing an unimaginably tough road with remarkable courage. Thanks to chemotherapy, radiotherapy, and your support, two of his tumours have stopped showing activity. Donations help Jack continue accessing promising complementary therapies, attend hospital appointments, and spend meaningful time with his children.
14
+
15
+ If you’ve benefited from amqplib, please consider supporting Jack’s journey through his [J Crushing Cancer](https://www.gofundme.com/f/j-crushing-cancer) gofundme page. Thank you - @cressie176
16
+
17
+ ## RabbitMQ Compatibility
18
+
19
+ Only `0.10.7` and later versions of this library are compatible with RabbitMQ 4.1.0 (and later releases).
20
+
21
+ ## Links
10
22
  * [Change log][changelog]
11
23
  * [GitHub pages][gh-pages]
12
24
  * [API reference][gh-pages-apiref]
13
25
  * [Troubleshooting][gh-pages-trouble]
14
26
  * [Examples from RabbitMQ tutorials][tutes]
15
27
 
16
- A library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1 client for Node.JS v10+.
17
-
18
- This library does not implement [AMQP
19
- 1.0](https://github.com/amqp-node/amqplib/issues/63) or [AMQP
20
- 0-10](https://github.com/amqp-node/amqplib/issues/94).
21
-
22
- Project status:
28
+ ## Project status
23
29
 
24
30
  - Expected to work
25
31
  - Complete high-level and low-level APIs (i.e., all bits of the protocol)
package/lib/connect.js CHANGED
@@ -129,9 +129,10 @@ function connect(url, socketOptions, openCallback) {
129
129
  fields = openFrames(url.vhost, config, sockopts.credentials || credentials.plain(user, pass), extraClientProperties);
130
130
  } else {
131
131
  var parts = URL(url, true); // yes, parse the query string
132
+ var host = parts.hostname.replace(/^\[|\]$/g, '');
132
133
  protocol = parts.protocol;
133
- sockopts.host = parts.hostname;
134
- sockopts.servername = sockopts.servername || parts.hostname;
134
+ sockopts.host = host;
135
+ sockopts.servername = sockopts.servername || host;
135
136
  sockopts.port = parseInt(parts.port) || ((protocol === 'amqp:') ? 5672 : 5671);
136
137
  var vhost = parts.pathname ? parts.pathname.substr(1) : null;
137
138
  fields = openFrames(vhost, parts.query, sockopts.credentials || credentialsFromUrl(parts), extraClientProperties);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "amqplib",
3
3
  "homepage": "http://amqp-node.github.io/amqplib/",
4
4
  "main": "./channel_api.js",
5
- "version": "0.10.7",
5
+ "version": "0.10.9",
6
6
  "description": "An AMQP 0-9-1 (e.g., RabbitMQ) library and client.",
7
7
  "repository": {
8
8
  "type": "git",
package/test/connect.js CHANGED
@@ -130,6 +130,13 @@ suite("Connect API", function() {
130
130
  kCallback(succeed(done), fail(done)));
131
131
  });
132
132
 
133
+ test("ipv6", function(done) {
134
+ connect('amqp://[::1]', {}, function(err, connection) {
135
+ if (err) { return done(err); }
136
+ done();
137
+ });
138
+ });
139
+
133
140
  test("using unsupported mechanism", function(done) {
134
141
  var creds = {
135
142
  mechanism: 'UNSUPPORTED',