Welcome! This is the monorepo which holds all Honeybadger packages for JavaScript. You can refer to the README of each package for more information and instructions:
- @honeybadger-io/core
The core package that integrates with Honeybadger API - @honeybadger-io/js
SDK for browser, nodejs and AWS Lambda
- @honeybadger-io/webpack
Webpack plugin to upload source maps to Honeybadger - @honeybadger-io/vue
SDK for vue.js integration - @honeybadger-io/react
SDK for React integration - @honeybadger-io/gatsby-plugin-honeybadger
Gatsby plugin - @honeybadger-io/react-native
SDK for React Native integration
For comprehensive documentation and support, check out our documentation site.
-
CHANGELOG.md is updated when a new version is released (
npm run release
). The rootCHANGELOG.md
has a collective changelog from changes in all the packages of the monorepo. Each package also has its ownCHANGELOG.md
with changes related only to itself. -
Conventional Commits are enforced with a Git hook (via husky + commitlint) in order to automate changelog generation.
- Fork the repo.
- Create a topic branch
git checkout -b my_branch
- Commit your changes
git commit -am "chore: boom"
- Push to your branch
git push origin my_branch
- Send a pull request
We use Lerna to manage the monorepo. It helps us:
- link between packages,
- generate changelogs and bump versions (based on conventional commits) and
- publish to NPM
- Run
npm install
from the monorepo root. - Run
npm test
from the monorepo root to run unit tests for all packages.
- Always install from the root, i.e.
npm install
only from the root folder, otherwise you may get unexpected issues with the linked packages. - Use
lerna add my-pkg --scope="@honeybadger-io/js"
to addmy-pkg
in the@honeybadger-io/js
project. Or you can manually add to the target project'spackage.json
file. You still need to runnpm install
from the root. - Use
lerna run
to execute commands for all projects. If the command is not found it will not be executed. You can filter the packages using--scope
. For example,lerna run test
will executenpm run test
to all packages that have this script available.
For more info, you can read the docs.
- Not seeing changes when working in
.ts
files? Make sure that you rebuild every time you make a change. Or enable "compile on save" with your IDE - WebStorm(Jetbrains) / VS Code. - If you are getting errors with Typescript, make sure that you do
npm run build
. It's a prerequisite for Typescript Project References.
All packages in the monorepo are released in fixed mode, meaning that releasing a new version of one package also creates a release in that version for the other packages.
Releasing is done using npm run release
. This command calls lerna publish
, which does the following:
- generates changelog based on the commit messages (see Changelog above)
npm version
npm publish
Note: some packages may have a postpublish
script, for example @honeybadger-io/js
(found in packages/js
) has a script to also publish to our js.honeybadger.io CDN (hosted on AWS via S3/CloudFront).
The repository automatically releases new packages every week (see lerna-scheduled-publish.yml
).
You can manually trigger a new release using the Publish New Release
(lerna-publish.yml
) workflow.
Note: only users with write permissions can trigger this workflow (i.e. Collaborators).
npm run release
- Calculates the next version, commits and publishes to NPM (and to our CDN). This command is executed from the Publish New Release workflow.
This Honeybadger repository and published packages are MIT licensed. See the MIT-LICENSE file in this repository for details.