@exodus/error-tracking 1.3.0 → 1.4.0
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/CHANGELOG.md +12 -0
- package/LICENSE +7 -0
- package/README.md +2 -2
- package/module/remote-error-tracking.js +2 -4
- package/package.json +8 -5
- package/report/index.js +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/error-tracking@1.3.1...@exodus/error-tracking@1.4.0) (2025-02-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- move report.errorTracking to report.errors ([#11431](https://github.com/ExodusMovement/exodus-hydra/issues/11431)) ([d63b4e3](https://github.com/ExodusMovement/exodus-hydra/commit/d63b4e35660ce200da53cb8b035a20a24ce15508))
|
|
11
|
+
|
|
12
|
+
## [1.3.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/error-tracking@1.3.0...@exodus/error-tracking@1.3.1) (2025-01-09)
|
|
13
|
+
|
|
14
|
+
### License
|
|
15
|
+
|
|
16
|
+
- license: re-license under MIT license (#11022)
|
|
17
|
+
|
|
6
18
|
## [1.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/error-tracking@1.2.1...@exodus/error-tracking@1.3.0) (2024-10-03)
|
|
7
19
|
|
|
8
20
|
### Features
|
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2024 Exodus Movement, Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ yarn add @exodus/error-tracking
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/
|
|
13
|
+
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/development/using-the-sdk.md).
|
|
14
14
|
|
|
15
15
|
### Play with it
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ This feature is designed to be used together with `@exodus/headless`. See [using
|
|
|
20
20
|
|
|
21
21
|
### API Side
|
|
22
22
|
|
|
23
|
-
See [using the sdk](../../docs/
|
|
23
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#setup-the-api-side) for more details on how features plug into the SDK and the API interface in the [type declaration](./api/index.d.ts).
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
26
|
await exodus.errors.track({ namespace, error, context: {} })
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import createSentryClient from '@exodus/sentry-client'
|
|
2
|
-
import stackTraceParser from '@exodus/sentry-client/src/stack-trace-parsers/default.js'
|
|
3
2
|
import createFetchival from '@exodus/fetch/create-fetchival'
|
|
4
3
|
|
|
5
4
|
export const remoteErrorTrackingDefinition = {
|
|
6
5
|
id: 'remoteErrorTracking',
|
|
7
6
|
type: 'module',
|
|
8
|
-
factory: ({ config, fetch
|
|
7
|
+
factory: ({ config, fetch }) => {
|
|
9
8
|
const fetchival = createFetchival({ fetch })
|
|
10
9
|
return createSentryClient({
|
|
11
10
|
config,
|
|
12
11
|
fetchival,
|
|
13
|
-
defaultStackTraceParser: defaultStackTraceParser || stackTraceParser,
|
|
14
12
|
})
|
|
15
13
|
},
|
|
16
|
-
dependencies: ['config', 'fetch'
|
|
14
|
+
dependencies: ['config', 'fetch'],
|
|
17
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/error-tracking",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple error tracking package to let any feature collect errors and create the report",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/features/error-tracking",
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "MIT",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Aerror-tracking"
|
|
15
15
|
},
|
|
@@ -27,16 +27,19 @@
|
|
|
27
27
|
"!**/__tests__/**"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"test": "run -T jest",
|
|
30
|
+
"test": "run -T exodus-test --jest",
|
|
31
31
|
"lint": "run -T eslint -c ../../eslint.config.mjs",
|
|
32
32
|
"lint:fix": "yarn lint --fix"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@exodus/atoms": "^9.0.0",
|
|
36
|
-
"@exodus/
|
|
36
|
+
"@exodus/errors": "^1.2.0",
|
|
37
37
|
"@exodus/fetch": "^1.3.1",
|
|
38
38
|
"@exodus/sentry-client": "^3.2.0",
|
|
39
39
|
"@exodus/typeforce": "^1.19.0"
|
|
40
40
|
},
|
|
41
|
-
"
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "754f0804c3f5bd785cf46e514d9cd6558f015ab7"
|
|
42
45
|
}
|
package/report/index.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import { SafeError } from '@exodus/errors'
|
|
2
|
+
|
|
1
3
|
const errorTrackingReportDefinition = {
|
|
2
4
|
type: 'report',
|
|
3
5
|
id: 'errorTrackingReport',
|
|
4
6
|
factory: ({ errorsAtom }) => ({
|
|
5
|
-
namespace: '
|
|
7
|
+
namespace: 'errors',
|
|
6
8
|
export: async () => {
|
|
7
|
-
|
|
9
|
+
const { errors } = await errorsAtom.get()
|
|
10
|
+
return {
|
|
11
|
+
errors: errors.map(({ namespace, error, context, time }) => ({
|
|
12
|
+
namespace,
|
|
13
|
+
error: SafeError.from(error),
|
|
14
|
+
time,
|
|
15
|
+
})),
|
|
16
|
+
}
|
|
8
17
|
},
|
|
9
18
|
}),
|
|
10
19
|
dependencies: ['errorsAtom'],
|