@adobe/spacecat-shared-utils 1.23.6 → 1.23.8

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +3 -3
  3. package/src/sqs.js +11 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-utils-v1.23.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.23.7...@adobe/spacecat-shared-utils-v1.23.8) (2024-12-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update external fixes ([#492](https://github.com/adobe/spacecat-shared/issues/492)) ([d4daba5](https://github.com/adobe/spacecat-shared/commit/d4daba5686c856f9f0029d805fb2b9f1b9baf777))
7
+
8
+ # [@adobe/spacecat-shared-utils-v1.23.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.23.6...@adobe/spacecat-shared-utils-v1.23.7) (2024-12-13)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **sqs:** Support both standard and FIFO SQS queues ([#490](https://github.com/adobe/spacecat-shared/issues/490)) ([4a975b0](https://github.com/adobe/spacecat-shared/commit/4a975b0994d2df9fc296cfe900b1500aeb34e44f)), closes [#489](https://github.com/adobe/spacecat-shared/issues/489)
14
+
1
15
  # [@adobe/spacecat-shared-utils-v1.23.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.23.5...@adobe/spacecat-shared-utils-v1.23.6) (2024-12-10)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.23.6",
3
+ "version": "1.23.8",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "engines": {
@@ -45,8 +45,8 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@adobe/fetch": "4.1.11",
48
- "@aws-sdk/client-s3": "3.705.0",
49
- "@aws-sdk/client-sqs": "3.699.0",
48
+ "@aws-sdk/client-s3": "3.712.0",
49
+ "@aws-sdk/client-sqs": "3.712.0",
50
50
  "@json2csv/plainjs": "7.0.6",
51
51
  "aws-xray-sdk": "3.10.2"
52
52
  }
package/src/sqs.js CHANGED
@@ -25,6 +25,15 @@ class SQS {
25
25
  this.log = log;
26
26
  }
27
27
 
28
+ /**
29
+ * Check if the queue is a FIFO queue by examining its URL.
30
+ * @param {string} queueUrl - the URL of the SQS queue
31
+ * @returns {boolean} true if the queue is a FIFO queue, false otherwise
32
+ */
33
+ static #isFifoQueue(queueUrl) {
34
+ return hasText(queueUrl) && queueUrl.toLowerCase().endsWith('.fifo');
35
+ }
36
+
28
37
  /**
29
38
  * Send a message to an SQS queue. For FIFO queues, messageGroupId is required.
30
39
  * @param {string} queueUrl - The URL of the SQS queue.
@@ -43,8 +52,8 @@ class SQS {
43
52
  QueueUrl: queueUrl,
44
53
  };
45
54
 
46
- if (hasText(messageGroupId)) {
47
- // MessageGroupId is required for FIFO queues
55
+ // Only include MessageGroupId if the queue is a FIFO queue
56
+ if (SQS.#isFifoQueue(queueUrl) && hasText(messageGroupId)) {
48
57
  params.MessageGroupId = messageGroupId;
49
58
  }
50
59