Skip to content

Commit

Permalink
feat: Update Sentry SDKs to v7.68.0 (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed Sep 11, 2023
1 parent 500cb02 commit b0edb71
Show file tree
Hide file tree
Showing 30 changed files with 109 additions and 114 deletions.
2 changes: 1 addition & 1 deletion examples/electron-forge-webpack/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-forge/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-react-boilerplate/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"frames": []
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/electron-vite/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"frames": []
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-context-isolation-preload/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-context-isolation/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
"fix:eslint": "eslint . --format stylish --fix",
"pretest": "yarn build",
"test": "cross-env TS_NODE_PROJECT=tsconfig.json xvfb-maybe electron-mocha --require ts-node/register/transpile-only --timeout 120000 ./test/unit/**/*.ts",
"pree2e": "rimraf test/e2e/dist/**/node_modules/@sentry/** test/e2e/dist/**/yarn.lock && node scripts/clean-cache.js && yarn build && npm pack",
"pree2e": "rimraf test/e2e/dist/**/node_modules/@sentry/** test/e2e/dist/**/yarn.lock test/e2e/dist/**/package-lock.json && node scripts/clean-cache.js && yarn build && npm pack",
"e2e": "cross-env TS_NODE_PROJECT=tsconfig.json xvfb-maybe mocha --require ts-node/register/transpile-only --retries 3 ./test/e2e/*.ts"
},
"dependencies": {
"@sentry/browser": "7.66.0",
"@sentry/core": "7.66.0",
"@sentry/node": "7.66.0",
"@sentry/types": "7.66.0",
"@sentry/utils": "7.66.0",
"@sentry/browser": "7.68.0",
"@sentry/core": "7.68.0",
"@sentry/node": "7.68.0",
"@sentry/types": "7.68.0",
"@sentry/utils": "7.68.0",
"deepmerge": "4.3.0",
"lru_map": "^0.3.3",
"tslib": "^2.5.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.66.0",
"@sentry-internal/typescript": "7.66.0",
"@sentry-internal/eslint-config-sdk": "7.68.0",
"@sentry-internal/typescript": "7.68.0",
"@types/busboy": "^0.2.3",
"@types/chai": "^4.2.10",
"@types/chai-as-promised": "^7.1.5",
Expand Down
14 changes: 13 additions & 1 deletion src/main/integrations/onuncaughtexception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,19 @@ export class OnUncaughtException implements Integration {
}));

const nodeClient = getCurrentHub().getClient() as NodeClient;
nodeClient.captureException(error, { originalException: error }, getCurrentHub().getScope());
nodeClient.captureException(
error,
{
originalException: error,
data: {
mechanism: {
handled: false,
type: 'generic',
},
},
},
getCurrentHub().getScope(),
);
await nodeClient.flush(nodeClient.getOptions().shutdownTimeout || 2000);

if (options?.onFatalError) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const defaultIntegrations = [...defaultBrowserIntegrations, new ScopeToMa
export function init<O extends BrowserOptions>(
options: BrowserOptions & O = {} as BrowserOptions & O,
// This parameter name ensures that TypeScript error messages contain a hint for fixing SDK version mismatches
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v7_66_0: O) => void = browserInit,
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v7_68_0: O) => void = browserInit,
): void {
ensureProcess('renderer');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/main-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/preload-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/javascript/renderer-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/offline/renderer-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/browser-replay/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/child-process/event2.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/custom-renderer-name/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/error-iframe/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/main-process-module/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/net-breadcrumbs/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "generic"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/scope-breadcrumbs/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/other/screenshots/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-apps/sessions/javascript-error/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
]
},
"mechanism": {
"handled": true,
"handled": false,
"type": "instrument"
}
}
Expand Down
17 changes: 0 additions & 17 deletions test/e2e/test-apps/sessions/javascript-error/session-end.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"init": false,
"started": 0,
"timestamp": 0,
"status": "ok",
"status": "crashed",
"errors": 1,
"duration": 0,
"attrs": {
Expand Down

0 comments on commit b0edb71

Please sign in to comment.