This major version contains substantial changes. Please also refer to the upgrade guide.
Added
- Add
onBreadcrumb
andonSession
callbacks. #665 - Add
pauseSession()
andresumeSession()
methods toClient
#666 - Add static
Bugsnag
client interface #685 - Add
getUser()
andsetUser()
methods toSession
#692
Changed
- Migrate lint tooling to ESLint for both .js and .ts source files #644
- Rename
autoNotify
->autoDetectErrors
, and addenabledErrorTypes
option for granularity #706 - Rename
autoCaptureSessions
->autoTrackSessions
and simplify validation logic #647 - Rename
report
toevent
#646 - Rename
notifyReleaseStages
->enabledReleaseStages
#649 - Rename
beforeSend
->onError
, removeevent.ignore()
and refactor callback logic #654 - Update signature of
notify(err, opts?, cb?)
->notify(err, onError?, cb?)
for a canonical way to update events #655 - Simplify client configuration, and store resulting config privately #656
- User is now stored privately on
client
andevent
and updated via get/set methods #657 - Remove individual breadcrumb flags in favour of
enabledBreadcrumbTypes
, renamebreadcrumb.{ name -> message, metaData -> metadata }
, and updateleaveBreadcrumb()
type signature to be more explicit #650 - Rename
metaData
->metadata
and add consistentadd/get/clearMetadata()
methods toClient
/Event
for manipulating metadata explicitly, rather than mutating a property #658 - Update
leaveBreadcrumb()
type signature to returnvoid
. #661 - Refactor
notify()
to not accept events (they go via_notify()
instead). ConsolidateEvent
static methods into a single.create()
utility, used by all automatic error detection components. #664 - Stop applying default error class/message when none is supplied #676
- Remove Bugsnag* prefix from internal class names #679
- Rename and make private the
Session
methodtrackError()
->_track()
#675 - Update
Event
to support multiple errors #680 - Move context to a private property on
Client
, and get/set viagetContext()/setContext()
#681 - Update
@bugsnag/safe-json-stringify
to replace redacted values with[REDACTED]
#683 - Update
collectUserIp
option to use[REDACTED]
instead of[NOT COLLECTED]
for consistency #743 - Refactor type definitions #682
- Ensure automatic context is not used when
setContext(null)
has been called #694 - Rename
filters
option toredactedKeys
#704 - Rename
device.modelName
todevice.model
#726 - Rename
client.refresh()
toclient.resetEventCount()
#727 client.use(plugin)
has been removed and plugins must now be passed in to configuration #759- Invalid configuration (except for
apiKey
) now falls back to default values rather than throwing an error #759