Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

honeybadger-js

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

honeybadger-js - npm Package Compare versions

Comparing version 0.4.9 to 0.5.0

4

bower.json
{
"name": "honeybadger",
"version": "0.4.9",
"version": "0.5.0",
"homepage": "https://github.com/honeybadger-io/honeybadger-js",

@@ -26,2 +26,2 @@ "authors": [

]
}
}

@@ -8,2 +8,8 @@ # Change Log

## [0.5.0] - 2017-07-19
### Changed
- Honeybadger now uses source maps when available to group errors. If upgrading,
some errors may be grouped differently (causing new errors to be created), but
the new grouping will be more accurate.
## [0.4.9] - 2017-07-19

@@ -10,0 +16,0 @@ ### Fixed

/*
honeybadger.js v0.4.9
honeybadger.js v0.5.0
A JavaScript Notifier for Honeybadger

@@ -52,3 +52,3 @@ https://github.com/honeybadger-io/honeybadger-js

}(this, function () {
var VERSION = '0.4.9',
var VERSION = '0.5.0',
NOTIFIER = {

@@ -324,3 +324,4 @@ name: 'honeybadger.js',

project_root: err.projectRoot || err.project_root || config('projectRoot', config('project_root', window.location.protocol + '//' + window.location.host)),
environment_name: err.environment || config('environment')
environment_name: err.environment || config('environment'),
revision: err.revision || config('revision')
}

@@ -327,0 +328,0 @@ };

{
"name": "honeybadger-js",
"description": "A JavaScript library for integrating apps with the Honeybadger Rails Error Notifier.",
"version": "0.4.9",
"version": "0.5.0",
"homepage": "https://github.com/honeybadger-io/honeybadger-js",

@@ -34,2 +34,2 @@ "author": {

"typings": "./honeybadger-js.d.ts"
}
}

@@ -17,3 +17,3 @@ # Honeybadger Client-Side Javascript Library

```html
<script src="//js.honeybadger.io/v0.4/honeybadger.min.js" type="text/javascript" data-apiKey="project api key" data-environment="production"></script>
<script src="//js.honeybadger.io/v0.5/honeybadger.min.js" type="text/javascript" data-apiKey="project api key" data-environment="production" data-revision="git SHA/project version"></script>
```

@@ -27,3 +27,4 @@

apiKey: 'project api key',
environment: 'production'
environment: 'production',
revision: 'git SHA/project version'
});

@@ -55,3 +56,4 @@ </script>

apiKey: 'project api key',
environment: 'production'
environment: 'production',
revision: 'git SHA/project version'
});

@@ -69,3 +71,4 @@ ```

apiKey: 'project api key',
environment: 'production'
environment: 'production',
revision: 'git SHA/project version'
});

@@ -96,3 +99,4 @@ });

apiKey: 'project api key',
environment: 'production'
environment: 'production',
revision: 'git SHA/project version'
});

@@ -125,6 +129,9 @@ ```

debug: false,
// Honeybadger API key (required)
apiKey: '',
// The revision of the current deploy
revision: '',
// Collector Host

@@ -358,59 +365,18 @@ host: 'api.honeybadger.io',

Honeybadger can automatically un-minify your code if you provide a [sourcemap](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) along with your minified JavaScript files.
Honeybadger can automatically un-minify your code if you provide a [sourcemap](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) along with your minified JavaScript files.
To do this, you'll add a special comment at the bottom of your minified JS. It tells us where to find your sourcemap. For example:
For source maps to work properly, first make sure you're configuring the revision option in *honeybadger.js*. The value should be a unique version number for your current code deployment (a git SHA works well for this). The revision is used to tell Honeybadger that your code has changed and that it should update your source translations for future errors:
```js
// ...minified code...
//# sourceMappingURL=application.min.js.map
Honeybadger.configure({
apiKey: 'project api key',
environment: 'production',
revision: 'dcc69529edf375c72df39b0e9195d60d59db18ff'
});
```
The sourcemap URL needs to be a valid URL accessible to the public.
We recommend [uploading your source map files to our servers](https://docs.honeybadger.io/guides/source-maps.html#uploading-your-files-to-honeybadger) every time you deploy your code. It's also possible for you to [host your source map files yourself](https://docs.honeybadger.io/guides/source-maps.html#hosting-your-own-files) along with your production assets, in which case we'll try to download your source maps when an error is reported to us.
For more information on sourcemaps, check out the [Source Map Revision 3 Proposal](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
[See our guide to learn how to generate source maps and providing them to Honeybadger.](https://docs.honeybadger.io/guides/source-maps.html)
### Linking stack traces to source files
If you'd like to be able to jump from the Honeybadger backtrace to your unminified source file, just tell us where to find your unminified files using the `sourceRoot` option.
`sourceRoot` is the root URL for your unminified source files. To set it, you can use another magic comment:
```js
// ...minified code...
//# sourceRoot=https://sources.my-domain.com/src
```
This option may also be specified as a top-level key in the JSON sourcemap file itself:
```js
{
"sourceRoot" : "https://sources.my-domain.com/src",
// ...sourcemap...
}
```
If providing the `sourceRoot` option fouls up other tools in your toolchain, you can alternatively use `honeybadgerSourceRoot`.
#### Using GitHub
If you're using Honeybadger's GitHub integration, you can link to source files on GitHub by substituting a special `[PROJECT_ROOT]` token for the root of your GitHub repository:
```js
// ...minified code...
//# sourceMappingURL=honeybadger.min.js.map
//# honeybadgerSourceRoot=[PROJECT_ROOT]/src
```
This is the only situation in which the source root is not required to be a valid URL.
#### Authentication
Requests sent from Honeybadger servers to download sourcemaps and related-files include a secret token in the `Honeybadger-Token` header, which may be used to authenticate requests from Honeybadger.
To find your `Honeybadger-Token` token, visit your project settings page in Honeybadger and click on the "Sourcemaps" tab.
One exception is direct links from the Honeybadger UI (such as when displaying links in backtraces); these cannot be authenticated.
## Sending cookies by default

@@ -417,0 +383,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc