@defra/grants-config-utils 1.2.0 → 1.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @defra/grants-config-utils
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0842ad8: Include messageId in attributes for onMessage
8
+
3
9
  ## 1.2.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/grants-config-utils",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "NPM module for providing utils for publishing grants config",
5
5
  "engines": {
6
6
  "node": ">=24",
@@ -104,7 +104,9 @@ export class SqsSubscriber {
104
104
  }
105
105
 
106
106
  extractMessageAttributes(message) {
107
- const attributes = {};
107
+ const attributes = {
108
+ messageId: message.MessageId,
109
+ };
108
110
  for (const key in message.MessageAttributes) {
109
111
  if (Object.hasOwn(message.MessageAttributes, key)) {
110
112
  const attr = message.MessageAttributes[key];
@@ -151,6 +151,7 @@ describe("message processing", () => {
151
151
  Attribute1: "Value1",
152
152
  Attribute2: "1",
153
153
  Attribute3: new TextEncoder().encode("Value3"),
154
+ messageId: "msg-1",
154
155
  },
155
156
  "1780599163000",
156
157
  );