Skip to content

honeybadger-io/honeybadger-js

master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Honeybadger for JavaScript

Node CI

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:

Documentation and Support

For comprehensive documentation and support, check out our documentation site.

Changelog

  • CHANGELOG.md is updated when a new version is released (npm run release). The root CHANGELOG.md has a collective changelog from changes in all the packages of the monorepo. Each package also has its own CHANGELOG.md with changes related only to itself.

  • Conventional Commits are enforced with a Git hook (via husky + commitlint) in order to automate changelog generation.

Contributing

  1. Fork the repo.
  2. Create a topic branch git checkout -b my_branch
  3. Commit your changes git commit -am "chore: boom"
  4. Push to your branch git push origin my_branch
  5. Send a pull request

Development

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
  1. Run npm install from the monorepo root.
  2. Run npm test from the monorepo root to run unit tests for all packages.

Lerna Tips

  • 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 add my-pkg in the @honeybadger-io/js project. Or you can manually add to the target project's package.json file. You still need to run npm 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 execute npm run test to all packages that have this script available.

For more info, you can read the docs.

Troubleshooting TypeScript

  • 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.

Releasing

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).

Release Automation

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).

Available Commands

  • 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.

License

This Honeybadger repository and published packages are MIT licensed. See the MIT-LICENSE file in this repository for details.