New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sqs-consumer

Package Overview
Dependencies
Maintainers
0
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqs-consumer - npm Package Compare versions

Comparing version 11.5.0 to 11.5.1-canary.1

7

CHANGELOG.md

@@ -1,6 +0,5 @@

## [11.5.0](https://github.com/bbc/sqs-consumer/compare/v11.4.0...v11.5.0) (2025-01-28)
## [11.5.1-canary.1](https://github.com/bbc/sqs-consumer/compare/v11.5.0...v11.5.1-canary.1) (2025-01-29)
### Features
### Chores
* append more context to errors from the consumer ([#559](https://github.com/bbc/sqs-consumer/issues/559)) ([7bc55fc](https://github.com/bbc/sqs-consumer/commit/7bc55fc4f78eec55b435dc3e59566544085eac5c))
* send the queueUrl alongside emitted events ([#560](https://github.com/bbc/sqs-consumer/issues/560)) ([3ca59bf](https://github.com/bbc/sqs-consumer/commit/3ca59bf618bca80cc82027036b9d09b7e6a15a53))
* add fifo queue warning ([2fc0039](https://github.com/bbc/sqs-consumer/commit/2fc0039045c992c56fdbb1ee86a06284755f7244))

@@ -10,2 +10,4 @@ import type { ConsumerOptions, StopOptions, UpdatableOptions } from "./types.js";

protected queueUrl: string;
private isFifoQueue;
private suppressFifoWarning;
private handleMessage;

@@ -12,0 +14,0 @@ private handleMessageBatch;

@@ -20,2 +20,4 @@ "use strict";

this.queueUrl = options.queueUrl;
this.isFifoQueue = this.queueUrl.endsWith(".fifo");
this.suppressFifoWarning = options.suppressFifoWarning ?? false;
this.handleMessage = options.handleMessage;

@@ -61,2 +63,5 @@ this.handleMessageBatch = options.handleMessageBatch;

if (this.stopped) {
if (this.isFifoQueue && !this.suppressFifoWarning) {
logger_js_1.logger.warn("WARNING: A FIFO queue was detected. SQS Consumer does not guarantee FIFO queues will work as expected. Set 'suppressFifoWarning: true' to disable this warning.");
}
// Create a new abort controller each time the consumer is started

@@ -63,0 +68,0 @@ this.abortController = new AbortController();

export declare const logger: {
debug: any;
warn: (message: string) => void;
};

@@ -8,2 +8,5 @@ "use strict";

debug,
warn: (message) => {
console.log(message);
},
};

@@ -156,2 +156,7 @@ import { SQSClient, Message, QueueAttributeName, MessageSystemAttributeName } from "@aws-sdk/client-sqs";

extendedAWSErrors?: boolean;
/**
* Set this to `true` if you want to suppress the warning about FIFO queues.
* @defaultvalue `false`
*/
suppressFifoWarning?: boolean;
}

@@ -158,0 +163,0 @@ /**

@@ -10,2 +10,4 @@ import type { ConsumerOptions, StopOptions, UpdatableOptions } from "./types.js";

protected queueUrl: string;
private isFifoQueue;
private suppressFifoWarning;
private handleMessage;

@@ -12,0 +14,0 @@ private handleMessageBatch;

@@ -17,2 +17,4 @@ import { SQSClient, ChangeMessageVisibilityCommand, ChangeMessageVisibilityBatchCommand, DeleteMessageCommand, DeleteMessageBatchCommand, ReceiveMessageCommand, } from "@aws-sdk/client-sqs";

this.queueUrl = options.queueUrl;
this.isFifoQueue = this.queueUrl.endsWith(".fifo");
this.suppressFifoWarning = options.suppressFifoWarning ?? false;
this.handleMessage = options.handleMessage;

@@ -58,2 +60,5 @@ this.handleMessageBatch = options.handleMessageBatch;

if (this.stopped) {
if (this.isFifoQueue && !this.suppressFifoWarning) {
logger.warn("WARNING: A FIFO queue was detected. SQS Consumer does not guarantee FIFO queues will work as expected. Set 'suppressFifoWarning: true' to disable this warning.");
}
// Create a new abort controller each time the consumer is started

@@ -60,0 +65,0 @@ this.abortController = new AbortController();

export declare const logger: {
debug: any;
warn: (message: string) => void;
};

@@ -5,2 +5,5 @@ import createDebug from "debug";

debug,
warn: (message) => {
console.log(message);
},
};

@@ -156,2 +156,7 @@ import { SQSClient, Message, QueueAttributeName, MessageSystemAttributeName } from "@aws-sdk/client-sqs";

extendedAWSErrors?: boolean;
/**
* Set this to `true` if you want to suppress the warning about FIFO queues.
* @defaultvalue `false`
*/
suppressFifoWarning?: boolean;
}

@@ -158,0 +163,0 @@ /**

{
"name": "sqs-consumer",
"version": "11.5.0",
"version": "11.5.1-canary.1",
"description": "Build SQS-based Node applications without the boilerplate",

@@ -5,0 +5,0 @@ "type": "module",

@@ -45,2 +45,4 @@ import {

protected queueUrl: string;
private isFifoQueue: boolean;
private suppressFifoWarning: boolean;
private handleMessage: (message: Message) => Promise<Message | void>;

@@ -77,2 +79,4 @@ private handleMessageBatch: (message: Message[]) => Promise<Message[] | void>;

this.queueUrl = options.queueUrl;
this.isFifoQueue = this.queueUrl.endsWith(".fifo");
this.suppressFifoWarning = options.suppressFifoWarning ?? false;
this.handleMessage = options.handleMessage;

@@ -120,2 +124,7 @@ this.handleMessageBatch = options.handleMessageBatch;

if (this.stopped) {
if (this.isFifoQueue && !this.suppressFifoWarning) {
logger.warn(
"WARNING: A FIFO queue was detected. SQS Consumer does not guarantee FIFO queues will work as expected. Set 'suppressFifoWarning: true' to disable this warning.",
);
}
// Create a new abort controller each time the consumer is started

@@ -122,0 +131,0 @@ this.abortController = new AbortController();

@@ -6,2 +6,5 @@ import createDebug from "debug";

debug,
warn: (message: string) => {
console.log(message);
},
};

@@ -165,2 +165,7 @@ import {

extendedAWSErrors?: boolean;
/**
* Set this to `true` if you want to suppress the warning about FIFO queues.
* @defaultvalue `false`
*/
suppressFifoWarning?: boolean;
}

@@ -167,0 +172,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc