Skip to content

Commit 1cf822a

Browse files
committed
Use process-specific @sentry/electron modules.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent b9baf14 commit 1cf822a

File tree

6 files changed

+217
-7
lines changed

6 files changed

+217
-7
lines changed

app/common/config-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from "node:fs";
22
import path from "node:path";
33

4-
import * as Sentry from "@sentry/electron";
4+
import * as Sentry from "@sentry/core";
55
import {JsonDB} from "node-json-db";
66
import {DataError} from "node-json-db/dist/lib/Errors";
77
import type {z} from "zod";

app/main/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {Readable} from "node:stream";
66
import {pipeline} from "node:stream/promises";
77
import type {ReadableStream} from "node:stream/web";
88

9-
import * as Sentry from "@sentry/electron";
9+
import * as Sentry from "@sentry/electron/main";
1010
import {z} from "zod";
1111

1212
import Logger from "../common/logger-util.js";

app/renderer/js/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import url from "node:url";
55

66
import {Menu, app, dialog, session} from "@electron/remote";
77
import * as remote from "@electron/remote";
8-
import * as Sentry from "@sentry/electron";
8+
import * as Sentry from "@sentry/electron/renderer";
99

1010
import type {Config} from "../../common/config-util.js";
1111
import * as ConfigUtil from "../../common/config-util.js";

app/renderer/js/utils/domain-util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from "node:fs";
22
import path from "node:path";
33

44
import {app, dialog} from "@electron/remote";
5-
import * as Sentry from "@sentry/electron";
5+
import * as Sentry from "@sentry/electron/renderer";
66
import {JsonDB} from "node-json-db";
77
import {DataError} from "node-json-db/dist/lib/Errors";
88
import {z} from "zod";

package-lock.json

Lines changed: 208 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
},
148148
"devDependencies": {
149149
"@electron/remote": "^2.0.8",
150+
"@sentry/core": "^7.94.1",
150151
"@sentry/electron": "^4.1.2",
151152
"@types/adm-zip": "^0.5.0",
152153
"@types/auto-launch": "^5.0.2",
@@ -239,6 +240,10 @@
239240
"error",
240241
{
241242
"paths": [
243+
{
244+
"name": "@sentry/electron",
245+
"message": "Use @sentry/electron/main, @sentry/electron/renderer, or @sentry/core."
246+
},
242247
{
243248
"name": "electron",
244249
"message": "Use electron/main, electron/renderer, or electron/common."

0 commit comments

Comments
 (0)