@bugsnag/plugin-expo-app
Advanced tools
Comparing version 7.0.0-pre-alpha-ben.6 to 7.0.0-rc.0
30
app.js
@@ -1,2 +0,2 @@ | ||
const { Constants } = require('expo') | ||
const Constants = require('expo-constants').default | ||
const { AppState } = require('react-native') | ||
@@ -28,21 +28,23 @@ | ||
client.config.beforeSend.unshift(report => { | ||
client.addOnSession(session => { | ||
if (Constants.manifest.revisionId) { | ||
session.app.codeBundleId = Constants.manifest.revisionId | ||
} | ||
}) | ||
client.addOnError(event => { | ||
const now = new Date() | ||
const inForeground = AppState.currentState === 'active' | ||
report.app.inForeground = inForeground | ||
report.app.duration = now - appStart | ||
event.app.inForeground = inForeground | ||
event.app.duration = now - appStart | ||
if (inForeground) { | ||
report.app.durationInForeground = now - lastEnteredForeground | ||
event.app.durationInForeground = now - lastEnteredForeground | ||
} | ||
report.updateMetaData('app', { nativeBundleVersion, nativeVersionCode }) | ||
}) | ||
event.addMetadata('app', { nativeBundleVersion, nativeVersionCode }) | ||
if (!client.app.version && Constants.manifest.version) { | ||
client.app.version = Constants.manifest.version | ||
} | ||
if (Constants.manifest.revisionId) { | ||
client.app.codeBundleId = Constants.manifest.revisionId | ||
} | ||
if (Constants.manifest.revisionId) { | ||
event.app.codeBundleId = Constants.manifest.revisionId | ||
} | ||
}, true) | ||
} | ||
} |
{ | ||
"name": "@bugsnag/plugin-expo-app", | ||
"version": "7.0.0-pre-alpha-ben.6", | ||
"version": "7.0.0-rc.0", | ||
"main": "app.js", | ||
@@ -23,8 +23,10 @@ "description": "@bugsnag/js plugin to provide information about an Expo app", | ||
"devDependencies": { | ||
"@bugsnag/core": "^7.0.0-pre-alpha-ben.6", | ||
"@bugsnag/core": "^7.0.0-rc.0", | ||
"jasmine": "3.1.0", | ||
"nyc": "^12.0.2", | ||
"proxyquire": "^2.1.0" | ||
"nyc": "^12.0.2" | ||
}, | ||
"gitHead": "2607f3de7d8c9bd06d8e3566e72cfef0b12708a5" | ||
"dependencies": { | ||
"expo-constants": "^6.0.0" | ||
}, | ||
"gitHead": "dac88cba8c4cbe76a361dcb420695357e41792b5" | ||
} |
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
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
3528
3
42
1
+ Addedexpo-constants@^6.0.0
+ Addedexpo-constants@6.0.0(transitive)
+ Addedua-parser-js@0.7.39(transitive)