chore(electron): temporary remove @sentry/electron due to version mismatch (#7001)

This commit is contained in:
Brooooooklyn 2024-05-21 04:30:22 +00:00
parent d898dae280
commit 41c7215ef1
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99
5 changed files with 27 additions and 860 deletions

View File

@ -44,7 +44,6 @@
"@electron-forge/shared-types": "^7.3.0", "@electron-forge/shared-types": "^7.3.0",
"@emotion/react": "^11.11.4", "@emotion/react": "^11.11.4",
"@pengx17/electron-forge-maker-appimage": "^1.2.0", "@pengx17/electron-forge-maker-appimage": "^1.2.0",
"@sentry/electron": "^5.0.0-beta.0",
"@sentry/esbuild-plugin": "^2.16.1", "@sentry/esbuild-plugin": "^2.16.1",
"@sentry/react": "^8.0.0", "@sentry/react": "^8.0.0",
"@toeverything/infra": "workspace:*", "@toeverything/infra": "workspace:*",

View File

@ -4,10 +4,10 @@ import '@affine/core/bootstrap/preload';
import { appConfigProxy } from '@affine/core/hooks/use-app-config-storage'; import { appConfigProxy } from '@affine/core/hooks/use-app-config-storage';
import { performanceLogger } from '@affine/core/shared'; import { performanceLogger } from '@affine/core/shared';
import { apis, events } from '@affine/electron-api'; import { apis, events } from '@affine/electron-api';
import { init, setTags } from '@sentry/electron/renderer';
import { import {
init as reactInit, init,
reactRouterV6BrowserTracingIntegration, reactRouterV6BrowserTracingIntegration,
setTags,
} from '@sentry/react'; } from '@sentry/react';
import { debounce } from 'lodash-es'; import { debounce } from 'lodash-es';
import { StrictMode, useEffect } from 'react'; import { StrictMode, useEffect } from 'react';
@ -38,22 +38,19 @@ function main() {
performanceMainLogger.info('setup start'); performanceMainLogger.info('setup start');
if (window.SENTRY_RELEASE || environment.isDebug) { if (window.SENTRY_RELEASE || environment.isDebug) {
// https://docs.sentry.io/platforms/javascript/guides/electron/ // https://docs.sentry.io/platforms/javascript/guides/electron/
init( init({
{ dsn: process.env.SENTRY_DSN,
dsn: process.env.SENTRY_DSN, environment: process.env.BUILD_TYPE ?? 'development',
environment: process.env.BUILD_TYPE ?? 'development', integrations: [
integrations: [ reactRouterV6BrowserTracingIntegration({
reactRouterV6BrowserTracingIntegration({ useEffect,
useEffect, useLocation,
useLocation, useNavigationType,
useNavigationType, createRoutesFromChildren,
createRoutesFromChildren, matchRoutes,
matchRoutes, }),
}), ],
], });
},
reactInit
);
setTags({ setTags({
appVersion: runtimeConfig.appVersion, appVersion: runtimeConfig.appVersion,
editorVersion: runtimeConfig.editorVersion, editorVersion: runtimeConfig.editorVersion,

View File

@ -2,7 +2,6 @@ import './security-restrictions';
import path from 'node:path'; import path from 'node:path';
import { init, IPCMode } from '@sentry/electron/main';
import { app } from 'electron'; import { app } from 'electron';
import { createApplicationMenu } from './application-menu/create'; import { createApplicationMenu } from './application-menu/create';
@ -13,7 +12,6 @@ import { registerEvents } from './events';
import { registerHandlers } from './handlers'; import { registerHandlers } from './handlers';
import { logger } from './logger'; import { logger } from './logger';
import { registerProtocol } from './protocol'; import { registerProtocol } from './protocol';
import { isOnline } from './ui/handlers';
import { registerUpdater } from './updater'; import { registerUpdater } from './updater';
import { launch } from './windows-manager/launcher'; import { launch } from './windows-manager/launcher';
import { launchStage } from './windows-manager/stage'; import { launchStage } from './windows-manager/stage';
@ -65,17 +63,6 @@ app.on('activate', () => {
setupDeepLink(app); setupDeepLink(app);
// https://docs.sentry.io/platforms/javascript/guides/electron/
if (process.env.SENTRY_DSN) {
init({
dsn: process.env.SENTRY_DSN,
ipcMode: IPCMode.Protocol,
transportOptions: {
shouldSend: () => isOnline,
},
});
}
/** /**
* Create app window when background process will be ready * Create app window when background process will be ready
*/ */

View File

@ -1,2 +1 @@
import '@sentry/electron/preload';
import './bootstrap'; import './bootstrap';

839
yarn.lock

File diff suppressed because it is too large Load Diff