sqs-producer
Advanced tools
Comparing version 2.1.0 to 2.2.0
# Contributing | ||
Thank you for your interest in contributing to the sqs-producer. | ||
Thank you for your interest in contributing to the sqs-consumer. | ||
* If you have a suggstion for a new feature or you are aware of a fault, please [create an issue](https://github.com/bbc/sqs-producer/issues/new) first. Raising an issue encourages discussion and aids planning. | ||
* We aim for 100% test coverage. Please write tests for any new functionality or changes. | ||
* Any API changes should be fully documented. | ||
* Make sure your code meets our linting standards. Run `npm run lint` to check your code. | ||
* Maintain the existing coding style. There are some settings in `.jsbeautifyrc` to help. Run ` npx js-beautify lib/producer.js -r` | ||
* Be mindful of others when making suggestions and/or code reviewing. | ||
- 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. | ||
- We aim for 100% test coverage. Please write tests for any new functionality or changes. | ||
- Any API changes should be fully documented. | ||
- Make sure your code meets our linting standards. Run `npm run lint` to check your code. | ||
- Maintain the existing coding style. There are some settings in `.jsbeautifyrc` to help. | ||
- Be mindful of others when making suggestions and/or code reviewing. | ||
## Reporting Issues | ||
Before opening a new issue, first check that there is not already an [open issue or Pull Request](https://github.com/bbc/sqs-producer/issues?utf8=%E2%9C%93&q=is%3Aopen) that addresses it. | ||
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. | ||
If there is, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment: | ||
* 👍 - upvote | ||
* 👎 - downvote | ||
- 👍 - upvote | ||
- 👎 - downvote | ||
If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below. | ||
1. Pick an appropriate template for the type of issue [from here](https://github.com/bbc/sqs-producer/issues/choose) | ||
1. Pick an appropriate template for the type of issue [from here](https://github.com/bbc/sqs-consumer/issues/choose) | ||
2. Provide as much detail as possible | ||
@@ -27,4 +28,5 @@ 3. Follow your issue in the issue tracking workflow | ||
## Contributing Code | ||
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 `master` branch. | ||
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. | ||
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`). | ||
@@ -37,4 +39,5 @@ | ||
## Pull Request Process | ||
1. Make sure you have opened an issue and it was approved by a project maintainer before working on a PR | ||
2. Read and complete all relevant sections of the PR template | ||
3. Wait for the PR get approved |
@@ -1,15 +0,24 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
## Description | ||
<!--- Describe your changes in detail --> | ||
## Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
## Types of changes | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
Resolves #NUMBER | ||
**Description:** | ||
_A very high-level summary of easily-reproducible changes that can be understood by non-devs._ | ||
**Type of change:** | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
## Checklist: | ||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
**Why is this change required?:** | ||
_A simple explanation of what the problem is and how this PR solves it_ | ||
**Code changes:** | ||
- _A bullet point list of key code changes that have been made._ | ||
- _When describing code changes, try to communicate **how** and **why** you implemented something a specific way, not just **what** has changed._ | ||
--- | ||
**Checklist:** | ||
- [ ] My code follows the code style of this project. | ||
@@ -16,0 +25,0 @@ - [ ] My change requires a change to the documentation. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Producer = void 0; | ||
var producer_1 = require("./producer"); | ||
Object.defineProperty(exports, "Producer", { enumerable: true, get: function () { return producer_1.Producer; } }); |
{ | ||
"name": "sqs-producer", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Enqueues messages onto a given SQS queue", | ||
@@ -8,6 +8,7 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"test": "mocha", | ||
"test": "mocha --recursive --full-trace --exit", | ||
"posttest": "npm run lint", | ||
"coverage": "nyc mocha && nyc report --reporter=html && nyc report --reporter=json-summary", | ||
"lint": "tslint --project tsconfig.json", | ||
"lcov": "nyc mocha && nyc report --reporter=lcov", | ||
"lint": "tsc --noEmit", | ||
"build": "npm run clean && tsc", | ||
@@ -37,22 +38,25 @@ "prepublish": "npm run build", | ||
"homepage": "https://github.com/bbc/sqs-producer", | ||
"devDependencies": { | ||
"@types/chai": "^4.3.4", | ||
"@types/debug": "^4.1.7", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.11.12", | ||
"@types/sinon": "^10.0.13", | ||
"chai": "^4.3.7", | ||
"mocha": "^10.1.0", | ||
"nyc": "^15.1.0", | ||
"sinon": "^15.0.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.4" | ||
}, | ||
"dependencies": { | ||
"aws-sdk": "^2.673.0" | ||
"aws-sdk": "^2.1271.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.2.11", | ||
"@types/debug": "^4.1.3", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^13.13.5", | ||
"@types/sinon": "^9.0.0", | ||
"chai": "^4.2.0", | ||
"codeclimate-test-reporter": "^0.5.1", | ||
"mocha": "^7.1.1", | ||
"nyc": "^15.0.0", | ||
"sinon": "^9.0.2", | ||
"ts-node": "^8.10.1", | ||
"tslint": "^6.1.2", | ||
"tslint-config-airbnb": "^5.3.1", | ||
"tslint-microsoft-contrib": "^6.2.0", | ||
"typescript": "^3.8.3" | ||
"peerDependencies": { | ||
"aws-sdk": "^2.1271.0" | ||
}, | ||
"mocha": { | ||
"spec": "test/**/**/*.test.ts", | ||
"require": "ts-node/register" | ||
}, | ||
"nyc": { | ||
@@ -59,0 +63,0 @@ "include": [ |
@@ -5,3 +5,3 @@ sqs-producer | ||
[![NPM downloads](https://img.shields.io/npm/dm/sqs-producer.svg?style=flat)](https://npmjs.org/package/sqs-producer) | ||
[![Build Status](https://travis-ci.org/bbc/sqs-producer.svg?branch=master)](https://travis-ci.org/bbc/sqs-producer?branch=master) | ||
[![Build Status](https://github.com/bbc/sqs-producer/actions/workflows/test.yml/badge.svg)](https://github.com/bbc/sqs-producer/actions/workflows/test.yml) | ||
[![Code Climate](https://codeclimate.com/github/BBC/sqs-producer/badges/gpa.svg)](https://codeclimate.com/github/BBC/sqs-producer) | ||
@@ -21,2 +21,3 @@ [![Test Coverage](https://codeclimate.com/github/BBC/sqs-producer/badges/coverage.svg)](https://codeclimate.com/github/BBC/sqs-producer) | ||
const { Producer } = require('sqs-producer'); | ||
import AWS from 'aws-sdk' | ||
@@ -30,7 +31,12 @@ // create simple producer | ||
// create custom producer (supporting all opts as per the API docs: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#constructor-property) | ||
AWS.config.update({ | ||
accessKeyId: 'yourAccessKey', | ||
secretAccessKey: 'yourSecret', | ||
region: 'eu-west-1', | ||
}); | ||
const producer = Producer.create({ | ||
queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name', | ||
region: 'eu-west-1', | ||
accessKeyId: 'yourAccessKey', | ||
secretAccessKey: 'yourSecret' | ||
sqs: new AWS.SQS(), | ||
}); | ||
@@ -37,0 +43,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11
28
114
31342
2
369
1
Updatedaws-sdk@^2.1271.0