Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 5.11 KB

CONTRIBUTING.md

File metadata and controls

99 lines (66 loc) · 5.11 KB

Contributing

Thanks for stopping by! This document should cover most topics surrounding contributing to this repo.

Reporting issues

Are you having trouble getting started? Please contact us directly for assistance with integrating Bugsnag into your application. If you have spotted a problem with this module, feel free to open a new issue. Here are a few things to check before doing so:

  • Are you using the latest version of Bugsnag? If not, does updating to the latest version fix your issue?
  • Has somebody else already reported your issue? Feel free to add additional context to or check-in on an existing issue that matches your own.
  • Is your issue caused by this module? Only things related to @bugsnag/js (including @bugsnag/plugin-* plugins to support various frameworks) should be reported here. For anything else, please contact us directly and we'd be happy to help you out.

Fixing issues

If you've identified a fix to a new or existing issue, we welcome contributions! Here are some helpful suggestions on contributing that help us merge your PR quickly and smoothly:

  • Fork the library on GitHub
  • Build and test your changes. We have automated tests for many scenarios but its also helpful to use npm pack to build the module locally and install it in a real app.
  • Commit and push until you are happy with your contribution
  • Make a pull request
  • Ensure the automated checks pass (and if it fails, please try to address the cause)

Adding features

Unfortunately we’re unable to accept PRs that add features or refactor the library at this time. However, we’re very eager and welcome to hearing feedback about the library so please contact us directly to discuss your idea, or open a feature request to help us improve the library.

Here’s a bit about our process designing and building the Bugsnag libraries:

  • We have an internal roadmap to plan out the features we build, and sometimes we will already be planning your suggested feature!
  • Our open source libraries span many languages and frameworks so we strive to ensure they are idiomatic on the given platform, but also consistent in terminology between platforms. That way the core concepts are familiar whether you adopt Bugsnag for one platform or many.
  • Finally, one of our goals is to ensure our libraries work reliably, even in crashy, multi-threaded environments. Oftentimes, this requires an intensive engineering design and code review process that adheres to our style and linting guidelines.

System requirements

In order to develop on the project you’ll need to be on Mac/Linux٭. You’ll need:

If you want to run the end-to-end tests locally you'll need Docker (including Docker Compose), and the AWS CLI. Note that you'll also need some BrowserStack and AWS credentials which are only available to Bugsnag employees.

Testing

A full guide to testing can be found in the testing document

CI

CI runs on Buildkite. Tests are run automatically on any branch from within this repo. PRs from external repos do not run on the private test infrastructure. Once an external PR has been reviewed by a Bugsnag employee, a branch can be created within this repo in order to run on CI.

⚠️ Caution: exercise due-diligence before creating a branch based on an external contribution – for example, be sure not to merge a bitcoin miner disguised as a bug fix!

Prereleases

If you are starting a new prerelease, use one of the following commands:

lerna version [premajor | preminor | prepatch]

For subsequent iterations on that release, run:

lerna version prerelease

If you want to publish the release to npm, use the following command:

lerna publish from-git --dist-tag next

The --dist-tag next part ensures that it is not installed by unsuspecting users who do not specify a version – npm automatically adds the latest tag to a published module unless one is specified.

If you want to publish the release to the CDN, use the following command:

lerna run cdn-upload

Releases

To graduate a prerelease into a release you will want to use patch as the version.

lerna version [major | minor | patch]
lerna publish from-git
lerna run cdn-upload