Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Ensure no variable redeclarations exist to prevent shadowing issues
- Replace global isFinite with Number.isFinite for safer numeric validation
- Enable useArrowFunction lint rule to prefer arrow functions for cleaner syntax
- Enable noUselessCatch lint rule to prevent useless catch blocks that only rethrow errors

## v0.10.9
- Add support for IPv6 urls
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"rules": {
"complexity": {
"noCommaOperator": "off",
"noUselessCatch": "off",
"noUselessCatch": "error",
"useArrowFunction": "error",
"useOptionalChain": "off",
"noArguments": "off",
Expand Down
22 changes: 9 additions & 13 deletions examples/receive_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@ co(function* () {
}
};
const conn = yield amqp.connect('amqp://localhost');
try {
// create a message to consume
const q = 'hello';
const msg = 'Hello World!';
const channel = yield conn.createChannel();
yield channel.assertQueue(q);
channel.sendToQueue(q, Buffer.from(msg));
console.log(" [x] Sent '%s'", msg);
// consume the message
yield channel.consume(q, myConsumer, {noAck: true});
} catch (e) {
throw e;
}
// create a message to consume
const q = 'hello';
const msg = 'Hello World!';
const channel = yield conn.createChannel();
yield channel.assertQueue(q);
channel.sendToQueue(q, Buffer.from(msg));
console.log(" [x] Sent '%s'", msg);
// consume the message
yield channel.consume(q, myConsumer, {noAck: true});
}).catch((err) => {
console.warn('Error:', err);
});
Expand Down
2 changes: 0 additions & 2 deletions examples/send_generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ co(function* () {
console.log(" [x] Sent '%s'", msg);

channel.close();
} catch (e) {
throw e;
} finally {
conn.close();
}
Expand Down