sqs-consumer 14.2.6 → 14.2.7-canary.2
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 +3 -14
- package/dist/cjs/consumer.js +12 -11
- package/dist/esm/consumer.js +12 -11
- package/package.json +5 -5
- package/src/consumer.ts +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
## [14.2.
|
|
1
|
+
## [14.2.7-canary.2](https://github.com/bbc/sqs-consumer/compare/v14.2.7-canary.1...v14.2.7-canary.2) (2026-04-14)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
*
|
|
6
|
-
* **deps-dev:** bump conventional-changelog-conventionalcommits from 9.1.0 to 9.3.0 ([#749](https://github.com/bbc/sqs-consumer/issues/749)) ([497d4ee](https://github.com/bbc/sqs-consumer/commit/497d4ee450cfcdb0fa156b1bac94d64fc84a4eab))
|
|
7
|
-
* **deps-dev:** bump handlebars from 4.7.8 to 4.7.9 in the npm_and_yarn group across 1 directory ([#756](https://github.com/bbc/sqs-consumer/issues/756)) ([a6ad6b4](https://github.com/bbc/sqs-consumer/commit/a6ad6b4eb35b9fd955c4ed288291780fae64cb88))
|
|
8
|
-
* **deps-dev:** bump p-event from 7.0.2 to 7.1.0 ([#748](https://github.com/bbc/sqs-consumer/issues/748)) ([8e4e1a2](https://github.com/bbc/sqs-consumer/commit/8e4e1a2fdd7e9fbdafbced52ff55dc62227816b1))
|
|
9
|
-
* **deps-dev:** bump typedoc from 0.28.16 to 0.28.17 ([#745](https://github.com/bbc/sqs-consumer/issues/745)) ([22f1272](https://github.com/bbc/sqs-consumer/commit/22f1272354057e58bacd7043ff91d788eb67c15f))
|
|
10
|
-
* **deps:** bump actions/configure-pages from 5.0.0 to 6.0.0 ([#753](https://github.com/bbc/sqs-consumer/issues/753)) ([2eaadc4](https://github.com/bbc/sqs-consumer/commit/2eaadc46930365e22e8681141153a7f8c71d3136))
|
|
11
|
-
* **deps:** bump actions/deploy-pages from 4.0.5 to 5.0.0 ([#754](https://github.com/bbc/sqs-consumer/issues/754)) ([090618e](https://github.com/bbc/sqs-consumer/commit/090618efcbae6ce92679ef186be84ef4c88ebfc8))
|
|
12
|
-
* **deps:** bump dorny/test-reporter from 2.6.0 to 3.0.0 ([#752](https://github.com/bbc/sqs-consumer/issues/752)) ([dac83d1](https://github.com/bbc/sqs-consumer/commit/dac83d134b6ba39ff1510a05c930c44e082110b8))
|
|
13
|
-
* **deps:** bump github/codeql-action from 4.33.0 to 4.34.1 ([#751](https://github.com/bbc/sqs-consumer/issues/751)) ([3b746b6](https://github.com/bbc/sqs-consumer/commit/3b746b670f4be86923561bb684622cba85fe8611))
|
|
14
|
-
* **deps:** bump the npm_and_yarn group across 1 directory with 2 updates ([#755](https://github.com/bbc/sqs-consumer/issues/755)) ([d384481](https://github.com/bbc/sqs-consumer/commit/d384481bba92134d525b4f267275159b9bccc806))
|
|
15
|
-
* **deps:** bump zgosalvez/github-actions-report-lcov ([#750](https://github.com/bbc/sqs-consumer/issues/750)) ([bc3db61](https://github.com/bbc/sqs-consumer/commit/bc3db6193a7813995ecd194ede0d8243f54a13ef))
|
|
16
|
-
* update codeowners ([9feb849](https://github.com/bbc/sqs-consumer/commit/9feb8493cb179656daa0e16bca1acc796fc7aa0e))
|
|
5
|
+
* broken error handlers kill the poll loop ([#771](https://github.com/bbc/sqs-consumer/issues/771)) ([12eda91](https://github.com/bbc/sqs-consumer/commit/12eda91eb092392952f656768c7ce3526c8a477e))
|
package/dist/cjs/consumer.js
CHANGED
|
@@ -181,7 +181,12 @@ class Consumer extends emitter_js_1.TypedEventEmitter {
|
|
|
181
181
|
})
|
|
182
182
|
.then((output) => this.handleSqsResponse(output))
|
|
183
183
|
.catch((err) => {
|
|
184
|
-
|
|
184
|
+
try {
|
|
185
|
+
this.emitError(err);
|
|
186
|
+
}
|
|
187
|
+
catch (listenerErr) {
|
|
188
|
+
logger_js_1.logger.warn(`An error event listener threw an error: ${listenerErr instanceof Error ? listenerErr.message : String(listenerErr)}`);
|
|
189
|
+
}
|
|
185
190
|
if ((0, errors_js_1.isConnectionError)(err)) {
|
|
186
191
|
logger_js_1.logger.debug("authentication_error", {
|
|
187
192
|
code: err.code || "Unknown",
|
|
@@ -189,19 +194,15 @@ class Consumer extends emitter_js_1.TypedEventEmitter {
|
|
|
189
194
|
});
|
|
190
195
|
currentPollingTimeout = this.authenticationErrorTimeout;
|
|
191
196
|
}
|
|
192
|
-
return;
|
|
193
|
-
})
|
|
194
|
-
.then(() => {
|
|
195
|
-
if (this.pollingTimeoutId) {
|
|
196
|
-
clearTimeout(this.pollingTimeoutId);
|
|
197
|
-
}
|
|
198
|
-
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
199
|
-
})
|
|
200
|
-
.catch((err) => {
|
|
201
|
-
this.emitError(err);
|
|
202
197
|
})
|
|
203
198
|
.finally(() => {
|
|
204
199
|
this.isPolling = false;
|
|
200
|
+
if (!this.stopped) {
|
|
201
|
+
if (this.pollingTimeoutId) {
|
|
202
|
+
clearTimeout(this.pollingTimeoutId);
|
|
203
|
+
}
|
|
204
|
+
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
205
|
+
}
|
|
205
206
|
});
|
|
206
207
|
}
|
|
207
208
|
/**
|
package/dist/esm/consumer.js
CHANGED
|
@@ -178,7 +178,12 @@ export class Consumer extends TypedEventEmitter {
|
|
|
178
178
|
})
|
|
179
179
|
.then((output) => this.handleSqsResponse(output))
|
|
180
180
|
.catch((err) => {
|
|
181
|
-
|
|
181
|
+
try {
|
|
182
|
+
this.emitError(err);
|
|
183
|
+
}
|
|
184
|
+
catch (listenerErr) {
|
|
185
|
+
logger.warn(`An error event listener threw an error: ${listenerErr instanceof Error ? listenerErr.message : String(listenerErr)}`);
|
|
186
|
+
}
|
|
182
187
|
if (isConnectionError(err)) {
|
|
183
188
|
logger.debug("authentication_error", {
|
|
184
189
|
code: err.code || "Unknown",
|
|
@@ -186,19 +191,15 @@ export class Consumer extends TypedEventEmitter {
|
|
|
186
191
|
});
|
|
187
192
|
currentPollingTimeout = this.authenticationErrorTimeout;
|
|
188
193
|
}
|
|
189
|
-
return;
|
|
190
|
-
})
|
|
191
|
-
.then(() => {
|
|
192
|
-
if (this.pollingTimeoutId) {
|
|
193
|
-
clearTimeout(this.pollingTimeoutId);
|
|
194
|
-
}
|
|
195
|
-
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
196
|
-
})
|
|
197
|
-
.catch((err) => {
|
|
198
|
-
this.emitError(err);
|
|
199
194
|
})
|
|
200
195
|
.finally(() => {
|
|
201
196
|
this.isPolling = false;
|
|
197
|
+
if (!this.stopped) {
|
|
198
|
+
if (this.pollingTimeoutId) {
|
|
199
|
+
clearTimeout(this.pollingTimeoutId);
|
|
200
|
+
}
|
|
201
|
+
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
202
|
+
}
|
|
202
203
|
});
|
|
203
204
|
}
|
|
204
205
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sqs-consumer",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.7-canary.2",
|
|
4
4
|
"description": "Build SQS-based Node applications without the boilerplate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"consumer",
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
"generate-docs": "typedoc"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@aws-sdk/client-sqs": "^3.
|
|
62
|
+
"@aws-sdk/client-sqs": "^3.1013.0",
|
|
63
63
|
"debug": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@cucumber/cucumber": "^12.7.0",
|
|
67
|
-
"@sebbo2002/semantic-release-jsr": "^3.1
|
|
67
|
+
"@sebbo2002/semantic-release-jsr": "^3.2.1",
|
|
68
68
|
"@semantic-release/changelog": "^6.0.3",
|
|
69
69
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
70
70
|
"@semantic-release/git": "^10.0.1",
|
|
71
71
|
"@semantic-release/github": "^12.0.6",
|
|
72
|
-
"@semantic-release/npm": "^13.1.
|
|
72
|
+
"@semantic-release/npm": "^13.1.5",
|
|
73
73
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
74
74
|
"@types/chai": "^5.2.2",
|
|
75
75
|
"@types/node": "^25.2.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"vitest": "^3.2.4"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@aws-sdk/client-sqs": "^3.
|
|
93
|
+
"@aws-sdk/client-sqs": "^3.1013.0"
|
|
94
94
|
},
|
|
95
95
|
"overrides": {
|
|
96
96
|
"cross-spawn": "^7.0.3"
|
package/src/consumer.ts
CHANGED
|
@@ -258,7 +258,13 @@ export class Consumer extends TypedEventEmitter {
|
|
|
258
258
|
})
|
|
259
259
|
.then((output: ReceiveMessageCommandOutput) => this.handleSqsResponse(output))
|
|
260
260
|
.catch((err): void => {
|
|
261
|
-
|
|
261
|
+
try {
|
|
262
|
+
this.emitError(err);
|
|
263
|
+
} catch (listenerErr) {
|
|
264
|
+
logger.warn(
|
|
265
|
+
`An error event listener threw an error: ${listenerErr instanceof Error ? listenerErr.message : String(listenerErr)}`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
262
268
|
if (isConnectionError(err)) {
|
|
263
269
|
logger.debug("authentication_error", {
|
|
264
270
|
code: err.code || "Unknown",
|
|
@@ -266,19 +272,15 @@ export class Consumer extends TypedEventEmitter {
|
|
|
266
272
|
});
|
|
267
273
|
currentPollingTimeout = this.authenticationErrorTimeout;
|
|
268
274
|
}
|
|
269
|
-
return;
|
|
270
|
-
})
|
|
271
|
-
.then((): void => {
|
|
272
|
-
if (this.pollingTimeoutId) {
|
|
273
|
-
clearTimeout(this.pollingTimeoutId);
|
|
274
|
-
}
|
|
275
|
-
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
276
|
-
})
|
|
277
|
-
.catch((err): void => {
|
|
278
|
-
this.emitError(err);
|
|
279
275
|
})
|
|
280
276
|
.finally((): void => {
|
|
281
277
|
this.isPolling = false;
|
|
278
|
+
if (!this.stopped) {
|
|
279
|
+
if (this.pollingTimeoutId) {
|
|
280
|
+
clearTimeout(this.pollingTimeoutId);
|
|
281
|
+
}
|
|
282
|
+
this.pollingTimeoutId = setTimeout(() => this.poll(), currentPollingTimeout);
|
|
283
|
+
}
|
|
282
284
|
});
|
|
283
285
|
}
|
|
284
286
|
|