@flareapp/react 2.2.1 → 2.3.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/README.md +15 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @flareapp/react
|
|
2
2
|
|
|
3
|
-
React integration for [Flare](https://flareapp.io) error tracking. Provides an error boundary component and
|
|
4
|
-
error handler for catching and reporting React component errors to Flare.
|
|
3
|
+
React integration for [Flare](https://flareapp.io) error tracking and logging. Provides an error boundary component and
|
|
4
|
+
a React 19+ error handler for catching and reporting React component errors to Flare.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -28,6 +28,19 @@ function App() {
|
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
## Logging
|
|
32
|
+
|
|
33
|
+
Beyond errors, the client can send structured logs. Logs are opt-in: enable them with `enableLogs`, then call any of the
|
|
34
|
+
eight syslog levels (`debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`).
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { flare } from '@flareapp/js';
|
|
38
|
+
|
|
39
|
+
flare.configure({ enableLogs: true });
|
|
40
|
+
|
|
41
|
+
flare.logger.info('Checkout started', { cartId: cart.id, total: cart.total });
|
|
42
|
+
```
|
|
43
|
+
|
|
31
44
|
## Documentation
|
|
32
45
|
|
|
33
46
|
Full documentation on the error boundary, the React 19+ error handler, lifecycle callbacks, and more is available
|
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,7 @@ react = __toESM(react);
|
|
|
33
33
|
//#region src/constants.ts
|
|
34
34
|
const CHROMIUM_STACK_REGEX = /^at\s+(\S+)(?:\s+\((.+):(\d+):(\d+)\))?$/;
|
|
35
35
|
const FIREFOX_SAFARI_STACK_REGEX = /^(\S+?)@(.+):(\d+):(\d+)$/;
|
|
36
|
-
const PACKAGE_VERSION = typeof process !== "undefined" && true ? "2.
|
|
36
|
+
const PACKAGE_VERSION = typeof process !== "undefined" && true ? "2.3.0" : "?";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/identify.ts
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { Component } from "react";
|
|
|
5
5
|
//#region src/constants.ts
|
|
6
6
|
const CHROMIUM_STACK_REGEX = /^at\s+(\S+)(?:\s+\((.+):(\d+):(\d+)\))?$/;
|
|
7
7
|
const FIREFOX_SAFARI_STACK_REGEX = /^(\S+?)@(.+):(\d+):(\d+)$/;
|
|
8
|
-
const PACKAGE_VERSION = typeof process !== "undefined" && true ? "2.
|
|
8
|
+
const PACKAGE_VERSION = typeof process !== "undefined" && true ? "2.3.0" : "?";
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/identify.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flareapp/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "React client for flareapp.io",
|
|
5
5
|
"homepage": "https://flareapp.io",
|
|
6
6
|
"bugs": "https://github.com/spatie/flare-client-js/issues",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"vitest": "^4.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@flareapp/js": "^2.
|
|
63
|
+
"@flareapp/js": "^2.3.0",
|
|
64
64
|
"react": "^16.0.0||^17.0.0||^18.0.0||^19.0.0"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|