sqs-producer 3.0.0-alpha.3 β†’ 3.0.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.
@@ -0,0 +1,2 @@
1
+ # All changes should be reviewed by codeowners
2
+ * @bbc/ibl @bbc/detl-engineers
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct (CoC)
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behaviour that contributes to a positive environment for our community include:
12
+
13
+ - Respect different opinions, perspectives, and experiences
14
+ - Giving and appreciating constructive feedback
15
+ - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
16
+ - Focusing on what is best for us as individuals and the overall community
17
+ - Demonstrating kindness toward other people
18
+
19
+ Examples of unacceptable behaviour include:
20
+
21
+ - The use of sexualised language or imagery, and sexual attention or advances of any kind
22
+ - Trolling, insulting or derogatory comments, and personal or political attacks
23
+ - Public or private harassment
24
+ - Publishing others’ private information, such as a physical or email address, without their explicit permission
25
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Project maintainers are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ [Project maintainers](https://github.com/bbc/sqs-consumber/blob/main/.github/CODEOWNERS) are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ ### 1. Correction
46
+
47
+ Community Impact: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome in the community.
48
+
49
+ Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.
50
+
51
+ ### 2. Warning
52
+
53
+ Community Impact: A violation through a single incident or series of actions.
54
+
55
+ Consequence: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
56
+
57
+ ### 3. Temporary Ban
58
+
59
+ Community Impact: A serious violation of community standards, including sustained inappropriate behaviour.
60
+
61
+ Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
62
+
63
+ ### 4. Permanent Ban
64
+
65
+ Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
66
+
67
+ Consequence: A permanent ban from any sort of public interaction within the community.
68
+
69
+ ## Attribution
70
+
71
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://www.contributor-covenant.org/version/2/0/code_of_conduct/
@@ -0,0 +1,41 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest in contributing to the sqs-consumer.
4
+
5
+ - If you're unsure if a feature would make a good addition, you can always [create an issue](https://github.com/bbc/sqs-consumer/issues/new) first. Raising an issue before creating a pull request is recommended.
6
+ - We aim for 100% test coverage. Please write tests for any new functionality or changes.
7
+ - Any API changes should be fully documented.
8
+ - Make sure your code meets our linting standards. Run `npm run lint` to check your code.
9
+ - Maintain the existing coding style. There are some settings in `.jsbeautifyrc` to help.
10
+ - Be mindful of others when making suggestions and/or code reviewing.
11
+
12
+ ## Reporting Issues
13
+
14
+ Before opening a new issue, first check that there is not already an [open issue or Pull Request](https://github.com/bbc/sqs-consumer/issues?utf8=%E2%9C%93&q=is%3Aopen) that addresses it.
15
+
16
+ If there is, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
17
+
18
+ - πŸ‘ - upvote
19
+ - πŸ‘Ž - downvote
20
+
21
+ If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below.
22
+
23
+ 1. Pick an appropriate template for the type of issue [from here](https://github.com/bbc/sqs-consumer/issues/choose)
24
+ 2. Provide as much detail as possible
25
+ 3. Follow your issue in the issue tracking workflow
26
+
27
+ ## Contributing Code
28
+
29
+ If you do not have push access to the repository, please [fork it](https://help.github.com/en/articles/fork-a-repo). You should then work on your own `main` branch.
30
+
31
+ Otherwise, you may clone this repository and create a working branch with a _kebab-case_ name reflecting what you are working on (e.g. `fix-the-thing`).
32
+
33
+ Follow the setup instructions in the [README](../README.md).
34
+
35
+ Ensure all your code is thoroughly tested and that this testing is detailed in the pull request.
36
+
37
+ ## Pull Request Process
38
+
39
+ 1. Make sure you have opened an issue and it was approved by a project maintainer before working on a PR
40
+ 2. Read and complete all relevant sections of the PR template
41
+ 3. Wait for the PR get approved
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Steps to reproduce the behaviour:
14
+
15
+ 1. Go to '...'
16
+ 2. Select '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behaviour**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Additional context**
27
+ Add any other context about the problem here, such as specific device information.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: feature-request
6
+ assignees: ''
7
+ ---
8
+
9
+ **The problem**
10
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11
+
12
+ **Suggested solution**
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Alternatives considered**
16
+ A clear and concise description of any alternative solutions or features you've considered.
17
+
18
+ **Additional context**
19
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Technical question
3
+ about: Want to ask a technical question about the project
4
+ title: ''
5
+ labels: 'question'
6
+ assignees: ''
7
+ ---
8
+
9
+ **Question**
10
+ A clear technical question could be asked here.
11
+
12
+ **screenshots**
13
+ If applicable, add screenshots to help explain your question.
14
+
15
+ **Additional context**
16
+ Add any other context about the question here, such as specific device information, technology choice etc.
@@ -0,0 +1,9 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Our full security policy and vulnerability reporting procedure is documented on [this external website](https://www.bbc.com/backstage/security-disclosure-policy/#reportingavulnerability).
6
+
7
+ Please note that this is a general BBC process. Communication will not be direct with the team responsible for this repo.
8
+
9
+ If you would like to, you can also open an issue in this repo regarding your disclosure, but please never share any details of the vulnerability in the GitHub issue.
@@ -0,0 +1,29 @@
1
+ Resolves #NUMBER
2
+
3
+ **Description:**
4
+ _A very high-level summary of easily-reproducible changes that can be understood by non-devs._
5
+
6
+ **Type of change:**
7
+
8
+ - [ ] Bug fix (non-breaking change which fixes an issue)
9
+ - [ ] New feature (non-breaking change which adds functionality)
10
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
11
+
12
+ **Why is this change required?:**
13
+ _A simple explanation of what the problem is and how this PR solves it_
14
+
15
+ **Code changes:**
16
+
17
+ - _A bullet point list of key code changes that have been made._
18
+ - _When describing code changes, try to communicate **how** and **why** you implemented something a specific way, not just **what** has changed._
19
+
20
+ ---
21
+
22
+ **Checklist:**
23
+
24
+ - [ ] My code follows the code style of this project.
25
+ - [ ] My change requires a change to the documentation.
26
+ - [ ] I have updated the documentation accordingly.
27
+ - [ ] I have read the **CONTRIBUTING** document.
28
+ - [ ] I have added tests to cover my changes.
29
+ - [ ] All new and existing tests passed.
@@ -0,0 +1,35 @@
1
+ name: Report Coverage
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - 'main'
6
+ push:
7
+ branches:
8
+ - main
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ node-version: [14.x]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+
22
+ - name: Use Node.js ${{ matrix.node-version }}
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: ${{ matrix.node-version }}
26
+
27
+ - name: Install Node Modules
28
+ run: npm ci
29
+
30
+ - name: Report Coverage
31
+ uses: paambaati/codeclimate-action@v3.2.0
32
+ env:
33
+ CC_TEST_REPORTER_ID: 2ae0377f20bf6db6d94dc02470f60a0dae8cf2862e2fe7fe092472dd4e2978cf
34
+ with:
35
+ coverageCommand: npm run lcov
@@ -0,0 +1,19 @@
1
+ name: 'Close stale issues and PRs'
2
+ on:
3
+ schedule:
4
+ - cron: '30 1 * * *'
5
+
6
+ jobs:
7
+ stale:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/stale@v6
11
+ with:
12
+ stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
13
+ stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
14
+ close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
15
+ close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
16
+ days-before-issue-stale: 30
17
+ days-before-pr-stale: 45
18
+ days-before-issue-close: 5
19
+ days-before-pr-close: 10
@@ -0,0 +1,34 @@
1
+ name: Run Tests
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - 'main'
6
+ push:
7
+ branches:
8
+ - main
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ node-version: [14.x, 16.x, 18.x]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+
22
+ - name: Use Node.js ${{ matrix.node-version }}
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: ${{ matrix.node-version }}
26
+
27
+ - name: Install Node Modules
28
+ run: npm ci
29
+
30
+ - name: NPM Audit
31
+ run: npx audit-ci
32
+
33
+ - name: Run Tests and Linting
34
+ run: npm run test
package/.jsbeautifyrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "space_after_anon_function": true,
3
+ "keep_array_indentation": "true",
4
+ "indent_size": 2
5
+ }
package/README.md CHANGED
@@ -17,7 +17,7 @@ npm install sqs-producer
17
17
  > This library assumes you are using [AWS SDK v3](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sqs/index.html). If you are using v2, please install v2.2.0:
18
18
  >
19
19
  > ```bash
20
- > npm install sqs-producer@5.8.0 --save-dev
20
+ > npm install sqs-producer@2.2.0 --save-dev
21
21
  > ```
22
22
 
23
23
  ## Usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqs-producer",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.1",
4
4
  "description": "Enqueues messages onto a given SQS queue",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "format": "prettier --loglevel warn --write \"**/*.{js,json,jsx,md,ts,tsx,html}\"",
15
15
  "format:check": "prettier --check \"**/*.{js,json,jsx,md,ts,tsx,html}\"",
16
16
  "build": "npm run clean && tsc",
17
- "prepublish": "npm run build",
17
+ "prepare": "npm run build",
18
18
  "pretest": "npm run build",
19
19
  "watch": "tsc --watch",
20
20
  "clean": "rm -fr dist/*"