|
| 1 | +# How to contribute |
| 2 | + |
| 3 | +## Reporting issues |
| 4 | + |
| 5 | +If you think you've spotted a problem with this module, feel free to open up a |
| 6 | +[new issue](https://github.com/bugsnag/vite-plugin-bugsnag/issues/new). There are a couple |
| 7 | +of things you should check before doing so: |
| 8 | + |
| 9 | +- Do you have the latest version of vite-plugin-bugsnag? If not, does updating to the latest |
| 10 | +version fix your issue? |
| 11 | +- Has somebody else [already reported](https://github.com/bugsnag/vite-plugin-bugsnag/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen) |
| 12 | +your issue? Feel free to comment or check-in on an existing issue that matches your own. |
| 13 | +- Is your problem definitely to do with this module? For anything else, email [[email protected]](mailto:[email protected]). |
| 14 | + |
| 15 | +## Fixing issues |
| 16 | + |
| 17 | +If you've identified a fix to a new or existing issue, we welcome contributions! |
| 18 | + |
| 19 | +- [Fork](https://help.github.com/articles/fork-a-repo) the [repo on github](https://github.com/bugsnag/vite-plugin-bugsnag) |
| 20 | +- Make your changes locally |
| 21 | +- Ensure the changes pass tests (`npm test`) |
| 22 | +- Commit and push your changes |
| 23 | +- [Make a pull request](https://help.github.com/articles/using-pull-requests) |
| 24 | +- Ensure CI passes (and if it fails, attempt to address the cause) |
| 25 | + |
| 26 | +## Adding features |
| 27 | + |
| 28 | +In general, feature additions will come from Bugsnag employees. If you think you have |
| 29 | +a useful addition that doesn’t take long to create a pull request for, feel free |
| 30 | +to go ahead and make it and strike up a discussion. With any non-trivial amount |
| 31 | +of work, the best thing to do is [create an issue](https://github.com/bugsnag/vite-plugin-bugsnag/issues/new) |
| 32 | +in which to discuss the feature, for the following reasons: |
| 33 | + |
| 34 | +- Bugsnag has an internal roadmap of things to work on. We might have already planned to |
| 35 | +work on your suggested feature. |
| 36 | +- We might disagree about whether the addition is worthwhile or not. |
| 37 | +- We might agree that the addition is worthwhile but disagree with the implementation. |
| 38 | + |
| 39 | +That said, we have had some tremendous contributions from the community in the past, |
| 40 | +so use your best judgement. What we want to avoid here is anybody feeling like they’ve |
| 41 | +wasted their time! |
| 42 | + |
| 43 | +## Releases |
| 44 | + |
| 45 | +To start a release: |
| 46 | + |
| 47 | +- decide on a version number |
| 48 | +- create a new release branch from `next` with the version number in the branch name `git checkout -b release/vX.Y.Z` |
| 49 | +- review commits made to `next` since the last release |
| 50 | +- update `CHANGELOG.md` reflecting the above changes, release version, and release date and commit to your release branch |
| 51 | +- make a PR from your release branch to `main` entitled `Release vX.Y.Z` |
| 52 | +- get the release PR reviewed – all code changes should have been reviewed already, this should be a review of the integration of all changes to be shipped and the changelog |
| 53 | + |
| 54 | +Once the release PR has been approved, merge the PR into `main`. You are now ready to make the release. Ensure you are logged in to npm and that you have access to publish the package. |
| 55 | + |
| 56 | +- Make sure you are on the latest `main`. |
| 57 | + |
| 58 | +- Bump the package version and push the new commit and tag: |
| 59 | + |
| 60 | + ``` |
| 61 | + npm version <major|minor|patch> |
| 62 | + git push origin main |
| 63 | + git push --tags |
| 64 | + ``` |
| 65 | + |
| 66 | +- Publish the new version to npm: |
| 67 | + |
| 68 | + ``` |
| 69 | + npm publish |
| 70 | + ``` |
| 71 | + |
| 72 | +Finally: |
| 73 | + |
| 74 | +- create a release on GitHub https://github.com/bugsnag/vite-plugin-bugsnag/releases/new |
| 75 | +- Use the existing tag created during the version step above |
| 76 | +- copy the release notes from `CHANGELOG.md` |
| 77 | +- publish the release |
| 78 | +- update and push `next`: |
| 79 | + ``` |
| 80 | + git checkout next |
| 81 | + git merge main |
| 82 | + git push |
| 83 | + ``` |
0 commit comments