@bugsnag/plugin-react-native-event-sync
Advanced tools
Comparing version 7.22.7 to 7.25.0-alpha.0
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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2990
32
1