diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d998628 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,66 @@ +# Contributing to Raygun4Node-AWS-Lambda + +## Project and library organisation + +Building the project requires Node.js installed. +All current LTS versions should be supported. + +The `@raygun.io/aws-lambda` package is at the repository root. + +The `example` folder contains an example app showing the provider capabilities. + +## Building and running + +The recommended IDE for working on this project is Visual Studio Code. + +### Tests + +To run tests, run `npm run test` or run all tests from VSCode. + +### Code analysis + +To check the code, run `npm run eslint` and `npm run tseslint`. + +### Formatting + +To format the code, run `npm run prettier`. + +### Running the example + +Instructions on how to run the example can be found in the `example` folder. + +## How to contribute? + +This section is intended for external contributors not part of the Raygun team. + +Before you undertake any work, please create a ticket with your proposal, +so that it can be coordinated with what we're doing. + +If you're interested in contributing on a regular basis, +please get in touch with the Raygun team. + +### Fork the repository + +Please fork the main repository from https://github.com/MindscapeHQ/raygun4node-aws-lambda +into your own GitHub account. + +### Create a new branch + +Create a local branch off `main` in your fork, +named so that it explains the work in the branch. + +Do not submit a PR directly from your `main` branch. + +### Open a pull request + +Submit a pull request against the main repositories' `main` branch. + +Fill the PR template and give it a title that follows the [Conventional Commits guidelines](https://www.conventionalcommits.org/en/v1.0.0/). + +### Wait for a review + +Wait for a review by the Raygun team. +The team will leave you feedback and might ask you to do changes in your code. + +Once the PR is approved, the team will merge it. + diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..f6b0c9b --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,87 @@ +# Releasing @raygun.io/aws-lambda + +Raygun for AWS Lambda is published on https://www.npmjs.com/ as [`@raygun.io/aws-lambda`](https://www.npmjs.com/package/@raygun.io/aws-lambda). + +## Semantic versioning + +This NPM package follows semantic versioning, + +Given a version number MAJOR.MINOR.PATCH (x.y.z), increment the: + +- MAJOR version when you make incompatible changes +- MINOR version when you add functionality in a backward compatible manner +- PATCH version when you make backward compatible bug fixes + +To learn more about semantic versioning check: https://semver.org/ + +## Preparing for release + +### Release branch + +Create a new branch named `release/x.y.z` +where `x.y.z` is the Major, Minor and Patch release numbers. + +### Update version + +Update the `version` in the `package.json` file. + +### Run npm install + +Run `npm install` to update the version in the `package-lock.json`. + +### Update CHANGELOG.md + +Add a new entry in the `CHANGELOG.md` file. + +Obtain a list of changes using the following git command: + +``` +git log --pretty=format:"- %s (%as)" +``` + +### Run publish dry-run + +Run a publish dry-run to ensure no errors appear: + +``` +npm publish --dry-run +``` + +### Commit and open a PR + +Commit all the changes into a commit with the message `chore: Release x.y.z` +where `x.y.z` is the Major, Minor and Patch release numbers. + +Then push the branch and open a new PR, ask the team to review it. + +## Publishing + +### PR approval + +Once the PR has been approved, you can publish the provider. + +### Publish to npmjs.com + +Run the publish command without `dry-run`. +You will need npmjs.com credentials to publish, +as well as being part of the [Raygun organization](https://www.npmjs.com/~raygunowner). + +``` +npm publish +``` + +Now the package is available for customers. + +### Merge PR to main + +With the PR approved and the package published, +squash and merge the PR into `main`. + +### Tag and create Github Release + +Go to https://github.com/MindscapeHQ/raygun4node-aws-lambda/releases and create a new Release. + +GitHub will create a tag for you, you don't need to create the tag manually. + +You can also generate the release notes automatically. +