Skip to content

Commit f04ddbf

Browse files
committed
bump smqp@9
1 parent 3cfe251 commit f04ddbf

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# 3.2.0
4+
5+
- bump [smqp@9](https://github.com/paed01/smqp/blob/default/CHANGELOG.md)
6+
37
# 3.1.0
48

59
- use prettier for formatting rules since they are deprecated in eslint

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You might want to override `amqplib` with `@onify/fake-amqplib` in tests. This c
4242

4343
Example on how to mock amqplib when working with commonjs.
4444

45-
```javascript
45+
```js
4646
const amqplib = require('amqplib');
4747
const fakeAmqp = require('@onify/fake-amqplib');
4848

@@ -51,7 +51,7 @@ amqplib.connect = fakeAmqp.connect;
5151

5252
or:
5353

54-
```javascript
54+
```js
5555
const mock = require('mock-require');
5656
const fakeAmqp = require('@onify/fake-amqplib');
5757

@@ -60,7 +60,7 @@ mock('amqplib/callback_api', fakeAmqp);
6060

6161
or just mock the entire amqplib with:
6262

63-
```javascript
63+
```js
6464
const mock = require('mock-require');
6565
const fakeAmqp = require('@onify/fake-amqplib');
6666

@@ -77,14 +77,13 @@ Both amqplib and fake-amqplib have to be quibbled if reset mock is used during t
7777

7878
_test/setup.js_
7979

80-
```js
80+
```javascript
8181
import * as fakeAmqpLib from '@onify/fake-amqplib';
8282
import { connect as fakeConnect } from '@onify/fake-amqplib';
8383
import quibble from 'quibble';
8484

8585
(async () => {
8686
await quibble.esm('amqplib', { connect: fakeConnect });
87-
await quibble.esm('amqplib/callback_api', { connect: fakeConnect });
8887
await quibble.esm('@onify/fake-amqplib', { ...fakeAmqpLib });
8988
})();
9089
```
@@ -101,10 +100,10 @@ _.mocharc.json_ (true for node version < 20)
101100

102101
_test/amqplib-connection-test.js_
103102

104-
```js
103+
```javascript
105104
import assert from 'node:assert';
106105
import { connect } from 'amqplib';
107-
import { connect as connectCb } from 'amqplib/callback_api';
106+
import { connect as connectCb } from 'amqplib';
108107

109108
import { resetMock } from '@onify/fake-amqplib';
110109

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ function addConfirmCallback(broker, options, callback) {
717717
}
718718

719719
function confirmCallback() {
720-
broker.off('message.*', consumerTag);
720+
broker.off('message.*', { consumerTag });
721721
switch (undelivered) {
722722
case 'message.nack':
723723
return callback(new Error('message nacked'));

package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onify/fake-amqplib",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Fake amqplib",
55
"type": "module",
66
"exports": {
@@ -33,18 +33,21 @@
3333
},
3434
"license": "MIT",
3535
"dependencies": {
36-
"smqp": "^8.2.4"
36+
"smqp": "^9.0.1"
3737
},
3838
"devDependencies": {
39-
"@rollup/plugin-commonjs": "^25.0.5",
39+
"@rollup/plugin-commonjs": "^26.0.1",
4040
"@types/amqplib": "^0.10.2",
41+
"amqplib": "^0.10.4",
4142
"c8": "^9.1.0",
4243
"chai": "^5.1.0",
4344
"eslint": "^9.0.0",
4445
"globals": "^15.0.0",
4546
"mocha": "^10.2.0",
4647
"prettier": "^3.2.5",
47-
"rollup": "^4.0.2"
48+
"quibble": "^0.9.2",
49+
"rollup": "^4.0.2",
50+
"texample": "^0.0.5"
4851
},
4952
"keywords": [
5053
"fake",

0 commit comments

Comments
 (0)