sqs-consumer 6.2.0 → 6.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/.github/CONTRIBUTING.md +1 -1
- package/.github/workflows/coverage.yml +4 -0
- package/.github/workflows/docs.yml +5 -1
- package/.github/workflows/test.yml +9 -3
- package/.prettierignore +2 -1
- package/README.md +0 -2
- package/package.json +17 -12
package/.github/CONTRIBUTING.md
CHANGED
|
@@ -6,7 +6,7 @@ Thank you for your interest in contributing to the sqs-consumer.
|
|
|
6
6
|
- We aim for 100% test coverage. Please write tests for any new functionality or changes.
|
|
7
7
|
- Any API changes should be fully documented.
|
|
8
8
|
- Make sure your code meets our linting standards. Run `npm run lint` to check your code.
|
|
9
|
-
- Maintain the existing coding style.
|
|
9
|
+
- Maintain the existing coding style.
|
|
10
10
|
- Be mindful of others when making suggestions and/or code reviewing.
|
|
11
11
|
|
|
12
12
|
## Reporting Issues
|
|
@@ -23,12 +23,18 @@ jobs:
|
|
|
23
23
|
uses: actions/setup-node@v3
|
|
24
24
|
with:
|
|
25
25
|
node-version: ${{ matrix.node-version }}
|
|
26
|
-
|
|
27
|
-
- name: Install Node Modules
|
|
28
|
-
run: npm ci
|
|
26
|
+
cache: 'npm'
|
|
29
27
|
|
|
30
28
|
- name: NPM Audit
|
|
31
29
|
run: npx audit-ci
|
|
32
30
|
|
|
31
|
+
- name: Install Node Modules
|
|
32
|
+
run: npm ci
|
|
33
|
+
|
|
33
34
|
- name: Run Tests and Linting
|
|
34
35
|
run: npm run test
|
|
36
|
+
|
|
37
|
+
- uses: actions/upload-artifact@v3
|
|
38
|
+
with:
|
|
39
|
+
name: test-reports-${{ matrix.node-version }}
|
|
40
|
+
path: test/reports/
|
package/.prettierignore
CHANGED
package/README.md
CHANGED
|
@@ -50,8 +50,6 @@ app.start();
|
|
|
50
50
|
- Throwing an error (or returning a rejected promise) from the handler function will cause the message to be left on the queue. An [SQS redrive policy](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSDeadLetterQueue.html) can be used to move messages that cannot be processed to a dead letter queue.
|
|
51
51
|
- By default messages are processed one at a time – a new message won't be received until the first one has been processed. To process messages in parallel, use the `batchSize` option [detailed below](#options).
|
|
52
52
|
|
|
53
|
-
You can also find some examples of sqs-consumer implemented in various ways within the [examples directory](./examples/).
|
|
54
|
-
|
|
55
53
|
### Credentials
|
|
56
54
|
|
|
57
55
|
By default the consumer will look for AWS credentials in the places [specified by the AWS SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Setting_AWS_Credentials). The simplest option is to export your credentials as environment variables:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sqs-consumer",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Build SQS-based Node applications without the boilerplate",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
"watch": "tsc --watch",
|
|
10
10
|
"clean": "rm -fr dist/*",
|
|
11
11
|
"prepublishOnly": "npm run build",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"test:unit": "mocha --recursive --full-trace --exit",
|
|
13
|
+
"pretest:integration:init": "npm run build",
|
|
14
|
+
"test:integration:init": "sh ./test/scripts/initIntTests.sh",
|
|
15
|
+
"test:integration": "npm run test:integration:init && cucumber-js --config ./test/config/cucumber.js",
|
|
16
|
+
"test": "npm run test:unit && npm run test:integration",
|
|
14
17
|
"coverage": "nyc mocha && nyc report --reporter=html && nyc report --reporter=json-summary",
|
|
15
18
|
"lcov": "nyc mocha && nyc report --reporter=lcov",
|
|
16
19
|
"lint": "eslint . --ext .ts",
|
|
@@ -22,10 +25,10 @@
|
|
|
22
25
|
},
|
|
23
26
|
"repository": {
|
|
24
27
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/bbc/sqs-consumer.git"
|
|
26
29
|
},
|
|
27
30
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
31
|
+
"url": "https://github.com/bbc/sqs-consumer/issues"
|
|
29
32
|
},
|
|
30
33
|
"homepage": "https://bbc.github.io/sqs-consumer/",
|
|
31
34
|
"keywords": [
|
|
@@ -35,33 +38,35 @@
|
|
|
35
38
|
],
|
|
36
39
|
"license": "Apache-2.0",
|
|
37
40
|
"devDependencies": {
|
|
41
|
+
"@cucumber/cucumber": "^8.10.0",
|
|
38
42
|
"@types/chai": "^4.3.4",
|
|
39
43
|
"@types/debug": "^4.1.7",
|
|
40
44
|
"@types/mocha": "^10.0.1",
|
|
41
45
|
"@types/node": "^18.11.18",
|
|
42
46
|
"@types/sinon": "^10.0.13",
|
|
43
47
|
"chai": "^4.3.7",
|
|
44
|
-
"eslint": "^8.
|
|
48
|
+
"eslint": "^8.32.0",
|
|
45
49
|
"eslint-config-iplayer-ts": "^4.1.0",
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
50
|
+
"eslint-config-prettier": "^8.6.0",
|
|
47
51
|
"mocha": "^10.2.0",
|
|
48
52
|
"nyc": "^15.1.0",
|
|
49
53
|
"p-event": "^4.2.0",
|
|
50
|
-
"prettier": "^2.8.
|
|
54
|
+
"prettier": "^2.8.3",
|
|
51
55
|
"sinon": "^15.0.1",
|
|
56
|
+
"sqs-producer": "^3.1.1",
|
|
52
57
|
"ts-node": "^10.9.1",
|
|
53
|
-
"typedoc": "^0.23.
|
|
58
|
+
"typedoc": "^0.23.24",
|
|
54
59
|
"typescript": "^4.9.4"
|
|
55
60
|
},
|
|
56
61
|
"dependencies": {
|
|
57
|
-
"@aws-sdk/client-sqs": "^3.
|
|
62
|
+
"@aws-sdk/client-sqs": "^3.258.0",
|
|
58
63
|
"debug": "^4.3.4"
|
|
59
64
|
},
|
|
60
65
|
"peerDependencies": {
|
|
61
|
-
"@aws-sdk/client-sqs": "^3.
|
|
66
|
+
"@aws-sdk/client-sqs": "^3.258.0"
|
|
62
67
|
},
|
|
63
68
|
"mocha": {
|
|
64
|
-
"spec": "test/**/**/*.test.ts",
|
|
69
|
+
"spec": "test/tests/**/**/*.test.ts",
|
|
65
70
|
"require": "ts-node/register"
|
|
66
71
|
},
|
|
67
72
|
"nyc": {
|