@flareapp/react 1.0.0 → 1.2.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/.release-it.json +16 -0
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -7
- package/dist/index.mjs +2 -4
- package/package.json +6 -5
- package/src/index.ts +2 -4
- package/tsconfig.json +1 -1
package/.release-it.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"git": {
|
|
3
|
+
"commitMessage": "Release @flareapp/react v${version}",
|
|
4
|
+
"tagName": "@flareapp/react@${version}",
|
|
5
|
+
"tagAnnotation": "Release @flareapp/react v${version}"
|
|
6
|
+
},
|
|
7
|
+
"github": {
|
|
8
|
+
"release": false
|
|
9
|
+
},
|
|
10
|
+
"npm": {
|
|
11
|
+
"publish": true
|
|
12
|
+
},
|
|
13
|
+
"hooks": {
|
|
14
|
+
"after:bump": "npm run build"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @flareapp/react
|
|
2
|
+
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Peer dependency on `@flareapp/js` tightened from `^1.0.0` to `^1.2.0`. Consumers must upgrade `@flareapp/js` in lock-step so the v2-wire-format mapper is present at the egress boundary.
|
|
7
|
+
|
|
8
|
+
No functional changes in this package.
|
|
9
|
+
|
|
10
|
+
## 1.0.1
|
|
11
|
+
|
|
12
|
+
Initial release tracked here. Prior history is in git.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Component, PropsWithChildren } from 'react';
|
|
2
3
|
|
|
3
4
|
declare class FlareErrorBoundary extends Component<PropsWithChildren> {
|
|
4
5
|
componentDidCatch(error: Error, reactErrorInfo: React.ErrorInfo): void;
|
|
5
|
-
render(): ReactNode;
|
|
6
|
+
render(): react.ReactNode;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export { FlareErrorBoundary };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Component, PropsWithChildren } from 'react';
|
|
2
3
|
|
|
3
4
|
declare class FlareErrorBoundary extends Component<PropsWithChildren> {
|
|
4
5
|
componentDidCatch(error: Error, reactErrorInfo: React.ErrorInfo): void;
|
|
5
|
-
render(): ReactNode;
|
|
6
|
+
render(): react.ReactNode;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export { FlareErrorBoundary };
|
package/dist/index.js
CHANGED
|
@@ -18,20 +18,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
FlareErrorBoundary: () => FlareErrorBoundary
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
var import_react = require("react");
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
26
|
var import_js = require("@flareapp/js");
|
|
27
|
+
var import_react = require("react");
|
|
28
28
|
var FlareErrorBoundary = class extends import_react.Component {
|
|
29
29
|
componentDidCatch(error, reactErrorInfo) {
|
|
30
30
|
const context = {
|
|
31
31
|
react: {
|
|
32
|
-
componentStack: formatReactComponentStack(
|
|
33
|
-
reactErrorInfo?.componentStack ?? ""
|
|
34
|
-
)
|
|
32
|
+
componentStack: formatReactComponentStack(reactErrorInfo?.componentStack ?? "")
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
35
|
import_js.flare.report(error, context, { react: { errorInfo: reactErrorInfo } });
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { Component } from "react";
|
|
3
2
|
import { flare } from "@flareapp/js";
|
|
3
|
+
import { Component } from "react";
|
|
4
4
|
var FlareErrorBoundary = class extends Component {
|
|
5
5
|
componentDidCatch(error, reactErrorInfo) {
|
|
6
6
|
const context = {
|
|
7
7
|
react: {
|
|
8
|
-
componentStack: formatReactComponentStack(
|
|
9
|
-
reactErrorInfo?.componentStack ?? ""
|
|
10
|
-
)
|
|
8
|
+
componentStack: formatReactComponentStack(reactErrorInfo?.componentStack ?? "")
|
|
11
9
|
}
|
|
12
10
|
};
|
|
13
11
|
flare.report(error, context, { react: { errorInfo: reactErrorInfo } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flareapp/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -22,18 +22,19 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"prepublishOnly": "npm run build",
|
|
24
24
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
25
|
-
"typescript": "tsc --noEmit"
|
|
25
|
+
"typescript": "tsc --noEmit",
|
|
26
|
+
"release": "npx release-it"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@flareapp/js": "file:../js",
|
|
29
30
|
"@types/react": "^18.2.47",
|
|
30
|
-
"react": "^
|
|
31
|
+
"react": "^19.0.0",
|
|
31
32
|
"tsup": "^8.0.1",
|
|
32
33
|
"typescript": "^5.3.3"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"@flareapp/js": "^1.
|
|
36
|
-
"react": "^16.0.0||^17.0.0||^18.0.0"
|
|
36
|
+
"@flareapp/js": "^1.2.0",
|
|
37
|
+
"react": "^16.0.0||^17.0.0||^18.0.0||^19.0.0"
|
|
37
38
|
},
|
|
38
39
|
"publishConfig": {
|
|
39
40
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode, Component, PropsWithChildren } from 'react';
|
|
2
1
|
import { flare } from '@flareapp/js';
|
|
2
|
+
import { Component, PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
4
|
interface Context {
|
|
5
5
|
react: {
|
|
@@ -11,9 +11,7 @@ export class FlareErrorBoundary extends Component<PropsWithChildren> {
|
|
|
11
11
|
componentDidCatch(error: Error, reactErrorInfo: React.ErrorInfo) {
|
|
12
12
|
const context: Context = {
|
|
13
13
|
react: {
|
|
14
|
-
componentStack: formatReactComponentStack(
|
|
15
|
-
reactErrorInfo?.componentStack ?? '',
|
|
16
|
-
),
|
|
14
|
+
componentStack: formatReactComponentStack(reactErrorInfo?.componentStack ?? ''),
|
|
17
15
|
},
|
|
18
16
|
};
|
|
19
17
|
|
package/tsconfig.json
CHANGED