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 7.22.7 to 7.25.0-alpha.0

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": "7.22.7",
"version": "7.25.0-alpha.0",
"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": "^7.22.7"
"@bugsnag/core": "^7.25.0-alpha.0"
},

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

},
"gitHead": "644e54464cb8994fbf033867b30b59373a56925d"
"gitHead": "5617661e40cd3dd8e6d449153c77ba276357cb47"
}
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