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

@bugsnag/plugin-react-native-event-sync

Package Overview
Dependencies
Maintainers
9
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/plugin-react-native-event-sync - npm Package Compare versions

Comparing version 8.0.0-alpha.9 to 8.0.0-alpha.10

46

event-sync.js
module.exports = (NativeClient) => ({
load: (client) => {
client.addOnError(async event => {
const {
threads,
breadcrumbs,
app,
device,
deviceMetadata,
appMetadata
} = await NativeClient.getPayloadInfo({ unhandled: event.unhandled })
const isTurboModuleEnabled = global.__turboModuleProxy != null
event.breadcrumbs = breadcrumbs
event.app = { ...event.app, ...app }
event.device = { ...event.device, ...device }
event.threads = threads
event.addMetadata('device', deviceMetadata)
event.addMetadata('app', appMetadata)
}, true)
if (isTurboModuleEnabled) {
client.addOnError(event => {
const payloadInfo = NativeClient.getPayloadInfo({ unhandled: event.unhandled })
syncEvent(payloadInfo, event)
}, true)
} else {
client.addOnError(async event => {
const payloadInfo = await NativeClient.getPayloadInfoAsync({ unhandled: event.unhandled })
syncEvent(payloadInfo, event)
}, true)
}
}
})
const syncEvent = (payloadInfo, event) => {
const {
threads,
breadcrumbs,
app,
device,
deviceMetadata,
appMetadata
} = payloadInfo
event.breadcrumbs = breadcrumbs
event.app = { ...event.app, ...app }
event.device = { ...event.device, ...device }
event.threads = threads
event.addMetadata('device', deviceMetadata)
event.addMetadata('app', appMetadata)
}
{
"name": "@bugsnag/plugin-react-native-event-sync",
"version": "8.0.0-alpha.9",
"version": "8.0.0-alpha.10",
"main": "event-sync.js",

@@ -20,3 +20,3 @@ "description": "@bugsnag/react-native plugin to sync native event information in an onError callbacks",

"devDependencies": {
"@bugsnag/core": "^8.0.0-alpha.9"
"@bugsnag/core": "^8.0.0-alpha.10"
},

@@ -26,3 +26,3 @@ "peerDependencies": {

},
"gitHead": "aa2585cd436873745012438acb522dd4db91272c"
"gitHead": "295998db709e022da6f5c7e73571e5b9a45f045e"
}
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