Skip to content

Commit

Permalink
feat: Update JavaScript SDKs to v8.2.1 for stable release (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed May 21, 2024
1 parent e909ab2 commit 54497eb
Show file tree
Hide file tree
Showing 7 changed files with 281 additions and 363 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Unreleased

## 5.0.0-beta.0
## 5.0.0

This release updates the underlying Sentry JavaScript SDKs to v8 which includes a number of breaking changes, including
removal of APIs deprecated in the previous major version. The aim of these changes is to improve our performance
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
"e2e": "xvfb-maybe vitest run --root=./test/e2e --silent=false --disable-console-intercept"
},
"dependencies": {
"@sentry/browser": "8.0.0-beta.5",
"@sentry/core": "8.0.0-beta.5",
"@sentry/node": "8.0.0-beta.5",
"@sentry/types": "8.0.0-beta.5",
"@sentry/utils": "8.0.0-beta.5",
"@sentry/browser": "8.2.1",
"@sentry/core": "8.2.1",
"@sentry/node": "8.2.1",
"@sentry/types": "8.2.1",
"@sentry/utils": "8.2.1",
"deepmerge": "4.3.1"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@sentry-internal/eslint-config-sdk": "8.0.0-beta.5",
"@sentry-internal/typescript": "8.0.0-beta.5",
"@sentry-internal/eslint-config-sdk": "8.2.1",
"@sentry-internal/typescript": "8.2.1",
"@types/busboy": "^0.2.3",
"@types/form-data": "^2.5.0",
"@types/koa": "^2.0.52",
Expand Down
11 changes: 10 additions & 1 deletion scripts/check-exports.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ const ignoredBrowser = [
'makeFetchTransport',
'makeMultiplexedTransport',
'lazyLoadIntegration',
// deprecated
'captureUserFeedback',
];

const ignoredNode = ['SDK_VERSION', 'makeNodeTransport', 'getSentryRelease'];
const ignoredNode = [
'SDK_VERSION',
'makeNodeTransport',
'getSentryRelease',
// We don't include these by default in the Electron SDK
'getDefaultIntegrationsWithoutPerformance',
'initWithoutDefaultIntegrations',
];

const missingRenderer = browserExports.filter((key) => !rendererExports.includes(key) && !ignoredBrowser.includes(key));
const missingMain = nodeExports.filter((key) => !mainExports.includes(key) && !ignoredNode.includes(key));
Expand Down
5 changes: 5 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export {
captureConsoleIntegration,
captureEvent,
captureException,
captureFeedback,
captureMessage,
captureSession,
close,
Expand Down Expand Up @@ -65,6 +66,7 @@ export {
initOpenTelemetry,
isInitialized,
koaIntegration,
lastEventId,
linkedErrorsIntegration,
localVariablesIntegration,
metrics,
Expand All @@ -81,6 +83,7 @@ export {
parameterize,
postgresIntegration,
prismaIntegration,
redisIntegration,
requestDataIntegration,
rewriteFramesIntegration,
Scope,
Expand All @@ -105,6 +108,7 @@ export {
setupKoaErrorHandler,
setupNestErrorHandler,
setUser,
spanToBaggageHeader,
spanToJSON,
spanToTraceHeader,
spotlightIntegration,
Expand All @@ -117,6 +121,7 @@ export {
withIsolationScope,
withMonitor,
withScope,
zodErrorsIntegration,
} from '@sentry/node';

export type { NodeOptions } from '@sentry/node';
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export {
captureConsoleIntegration,
captureEvent,
captureException,
captureFeedback,
captureMessage,
captureSession,
captureUserFeedback,
chromeStackLineParser,
contextLinesIntegration,
continueTrace,
Expand All @@ -46,6 +46,7 @@ export {
extraErrorDataIntegration,
feedbackAsyncIntegration,
feedbackIntegration,
feedbackSyncIntegration,
forceLoad,
functionToStringIntegration,
getActiveSpan,
Expand All @@ -66,6 +67,7 @@ export {
inboundFiltersIntegration,
instrumentOutgoingRequests,
isInitialized,
lastEventId,
linkedErrorsIntegration,
moduleMetadataIntegration,
onLoad,
Expand All @@ -92,6 +94,7 @@ export {
setTags,
setUser,
showReportDialog,
spanToBaggageHeader,
spanToJSON,
spanToTraceHeader,
startBrowserTracingNavigationSpan,
Expand All @@ -103,6 +106,7 @@ export {
withActiveSpan,
withIsolationScope,
withScope,
zodErrorsIntegration,
} from '@sentry/browser';

export type { BrowserOptions, ReportDialogOptions } from '@sentry/browser';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface ElectronRendererOptions extends BrowserOptions {
export function init<O extends ElectronRendererOptions>(
options: ElectronRendererOptions & O = {} as ElectronRendererOptions & 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_v8_0_0_beta_5: O) => void = browserInit,
originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v8_2_1: O) => void = browserInit,
): void {
// Ensure the browser SDK is only init'ed once.
if (window?.__SENTRY__RENDERER_INIT__) {
Expand Down
Loading

0 comments on commit 54497eb

Please sign in to comment.