For years, Honeybadger has supported client-side JavaScript and Node.js via two separate NPM packages: honeybadger-js (client-side) and honeybadger (Node.js). Today, we're excited to release a new universal package for JavaScript: @honeybadger-io/js.
The following packages are deprecated moving forward:
Use @honeybadger-io/js instead.
Why make this change?
Combining our JavaScript packages means we can share the same core client code while integrating deeply with each environment. The result is less duplication, better consistency, and a more straightforward experience for universal/isomorphic apps that run in multiple environments via Server-side Rendering (SSR).
Do I have to upgrade?
The short answer: You can keep using the old packages (for now), but why would you when upgrading is so easy? See How to upgrade.
The long answer: We will continue to support the old packages, fix bugs, etc., for now. All new development for client-side JavaScript and Node.js will happen on @honeybadger-io/js (the GitHub repo is here).
We plan to deprecate the old packages on NPM in the future to encourage more users to upgrade—if you do it now, you won't have to worry about any of that! :)
How to upgrade
Upgrading to the new @honeybadger-io/js package should take 5 minutes or less for most users. If you have a simple installation, the process has just two steps:
Replace your current package(s) with @honeybadger-io/js, i.e.:
npm uninstall honeybadger-js honeybadger npm install @honeybadger-io/js
Replace any
import
/require
statements that reference the old package(s):const Honeybadger = require('@honeybadger-io/js'); // Or: // import Honeybadger from '@honeybadger-io/js'; Honeybadger.configure({ apiKey: 'project api key', environment: 'production', revision: 'git SHA/project version' });
If you use a lot of custom configuration, it may take a little bit longer, as there are a few minor breaking changes. For details, check out the complete upgrading guide.
CDN users
If you use our CDN, replace your current script tag with the v3.0 script tag:
<script src="//js.honeybadger.io/v4.2/honeybadger.min.js" type="text/javascript"></script>
Review the upgrading guide for a list of breaking changes.
Reporting bugs
Please report bugs and any other issues you encounter to support@honeybadger.io!