@belvador/browser 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,14 +6,21 @@ Error tracking for browser apps, sending to your [Belvador](https://belvador.dev
|
|
|
6
6
|
npm install @belvador/browser
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
`src/instrument.ts`, imported on the **first line** of your entry file (imports run before the
|
|
10
|
+
rest of a file, so a later `init` misses errors thrown while your other modules load):
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
|
-
import { init
|
|
13
|
+
import { init } from "@belvador/browser";
|
|
11
14
|
|
|
12
15
|
init({
|
|
13
16
|
dsn: "https://<key>@ingest.belvador.dev/<project>", // Project settings → DSN
|
|
14
17
|
release: import.meta.env.VITE_APP_VERSION, // your build or commit id
|
|
15
18
|
environment: import.meta.env.MODE,
|
|
16
19
|
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { captureException } from "@belvador/browser";
|
|
17
24
|
|
|
18
25
|
try {
|
|
19
26
|
risky();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belvador/browser",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Belvador error tracking for the browser: one init, errors only, private by default.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Belvador (https://belvador.dev)",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"node": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@belvador/core": "0.4.
|
|
40
|
+
"@belvador/core": "0.4.1",
|
|
41
41
|
"@sentry/browser": "10.76.2"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|