From eeb146cdec1d141ebd0df0a3dcb50f8d23b2d429 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Thu, 20 Mar 2025 13:40:57 +0100 Subject: [PATCH 1/4] docs: add Releasing and Contributing --- CONTRIBUTING.md | 71 ++++++++++++++++++++++++++++++++++++++++ RELEASING.md | 87 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 RELEASING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..920a97f3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Contributing to Raygun4ReactNative + +## Project and library organisation + +Building the project requires [Node.js](https://nodejs.org). + +The project should work on all LTS Node versions. + +All required React Native packages will be installed through `npm`. + +- The `raygun4reactnative` package is in the `sdk` folder. +- The `demo` folder contains an example app based on React Native. +- The `ExpoDemo` folder contain an example app based on Expo. + +## Building and running + +The recommended IDE for working on this project is Visual Studio Code. + +Setup instructions can be found in the `sdk` folder in the `README.md` file. + +### Tests + +To run tests, in the `sdk` folder run `npm run test` or run all tests from VSCode. + +### Code analysis + +To check the code, in the `sdk` folder run `npm run eslint`. + +### Formatting + +To format the code, in the `sdk` folder run `npm run prettier`. + +### Running examples + +Instructions on how to run the examples can be found in their respective folders. + +## 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/raygun4reactnative +into your own GitHub account. + +### Create a new branch + +Create a local branch off `master` in your fork, +named so that it explains the work in the branch. + +Do not submit a PR directly from your `master` branch. + +### Open a pull request + +Submit a pull request against the main repositories' `master` 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 00000000..44badb12 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,87 @@ +# Releasing Raygun4ReactNative + +Raygun for Node is published on npmjs.com as [`raygun4reactnative`](https://www.npmjs.com/package/raygun4reactnative). + +## Semantic versioning + +This 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 `src/package.json` file. + +### Run npm install + +Run `npm install` in the `sdk` 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 in the `sdk` 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 an account in npmjs.com 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 master + +With the PR approved and the package published, +squash and merge the PR into `master`. + +### Tag and create Github Release + +Go to https://github.com/MindscapeHQ/raygun4reactnative/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. + From 3665dd3a25d5f5cbf03259bde2684409ffce39d4 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Thu, 27 Mar 2025 22:53:40 +0100 Subject: [PATCH 2/4] Update RELEASING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- RELEASING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 44badb12..9d7c7d10 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,7 +1,6 @@ # Releasing Raygun4ReactNative -Raygun for Node is published on npmjs.com as [`raygun4reactnative`](https://www.npmjs.com/package/raygun4reactnative). - +Raygun4ReactNative is published on npmjs.com as [`raygun4reactnative`](https://www.npmjs.com/package/raygun4reactnative). ## Semantic versioning This package follows semantic versioning. From 991f7fa706176e61f839472bd7cac93f1008b879 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Thu, 27 Mar 2025 22:53:50 +0100 Subject: [PATCH 3/4] Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 920a97f3..8e294d9c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,8 +10,7 @@ All required React Native packages will be installed through `npm`. - The `raygun4reactnative` package is in the `sdk` folder. - The `demo` folder contains an example app based on React Native. -- The `ExpoDemo` folder contain an example app based on Expo. - +- The `ExpoDemo` folder contains an example app based on Expo. ## Building and running The recommended IDE for working on this project is Visual Studio Code. From b6b46f171c73a2f72339325a5860b87ae4525481 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Fri, 28 Mar 2025 07:43:44 +0100 Subject: [PATCH 4/4] Update CONTRIBUTING.md Co-authored-by: Sumitra Manga <36393794+sumitramanga@users.noreply.github.com> --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8e294d9c..b99a801c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ All required React Native packages will be installed through `npm`. - The `raygun4reactnative` package is in the `sdk` folder. - The `demo` folder contains an example app based on React Native. - The `ExpoDemo` folder contains an example app based on Expo. + ## Building and running The recommended IDE for working on this project is Visual Studio Code.