@servicetitan/error-boundary 30.1.2 → 30.2.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.
@@ -27,7 +27,7 @@ export class ErrorBoundary extends Component {
27
27
  if (this.logService) {
28
28
  const { moduleName: Module, getErrorData } = this.props;
29
29
  const data = { Module, ...getErrorData === null || getErrorData === void 0 ? void 0 : getErrorData(error) };
30
- this.logService.error({ error, message: error.message, data });
30
+ this.logService.error({ error, message: error.message, data }, { skipConsole: true });
31
31
  }
32
32
  this.setState({ hasError: true }); // eslint-disable-line react/no-set-state
33
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../src/error-boundary.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAYrE,MAAM,OAAO,aAAc,SAAQ,SAA6B;IAAhE;;QACI;;;;mBAAQ;gBACJ,QAAQ,EAAE,KAAK;aAClB;WAAC;IA8BN,CAAC;IAxBG,iBAAiB,CAAC,KAAY;QAC1B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACxD,MAAM,IAAI,GAAG,EAAE,MAAM,EAAE,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,KAAK,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC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AY,uBAAZ,YAAY,CAAG,KAAK,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1F,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,yCAAyC;IAChF,CAAC;IAED,MAAM;QACF,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE5D,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEhC,IAAI,QAAQ,EAAE,CAAC;YACX,MAAM,aAAa,GAAG,GAAG,EAAE;gBACvB,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,yCAAyC;YACjF,CAAC,CAAC;YACF,OAAO,KAAC,QAAQ,IAAC,SAAS,EAAE,aAAa,GAAI,CAAC;QAClD,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ;AA1BmB;IAFf,QAAQ,EAAE;IACV,gBAAgB,CAAC,GAAG,CAAC;8BACO,GAAG;iDAAC;AA4BrC,MAAM,eAAe,GAAO,GAAG,EAAE,CAAC,gDAA6B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/error-boundary",
3
- "version": "30.1.2",
3
+ "version": "30.2.1",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/error-boundary",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "src"
17
17
  ],
18
18
  "devDependencies": {
19
- "@servicetitan/log-service": "30.1.2",
20
- "@servicetitan/react-ioc": "30.1.2",
19
+ "@servicetitan/log-service": "30.2.1",
20
+ "@servicetitan/react-ioc": "30.2.1",
21
21
  "@testing-library/dom": "^10.4.0",
22
22
  "@testing-library/jest-dom": "^6.6.3",
23
23
  "@testing-library/react": "^16.3.0",
@@ -25,8 +25,8 @@
25
25
  "react": "~18.3.1"
26
26
  },
27
27
  "peerDependencies": {
28
- "@servicetitan/log-service": "30.1.2",
29
- "@servicetitan/react-ioc": "30.1.2",
28
+ "@servicetitan/log-service": "30.2.1",
29
+ "@servicetitan/react-ioc": "30.2.1",
30
30
  "react": ">=17.0.2"
31
31
  },
32
32
  "publishConfig": {
@@ -35,5 +35,5 @@
35
35
  "cli": {
36
36
  "webpack": false
37
37
  },
38
- "gitHead": "76e26006c94d59038b9719ede1fa416d84d4a2c3"
38
+ "gitHead": "297a0bb448afa86cf35e80c5d9a7613d8f86b0a3"
39
39
  }
@@ -61,11 +61,14 @@ describe(`[error-boundary] ${ErrorBoundary.name}`, () => {
61
61
  test('logs the error', () => {
62
62
  subject();
63
63
 
64
- expect(log.error).toHaveBeenCalledWith({
65
- error,
66
- data: { Module: props.moduleName },
67
- message: error.message,
68
- });
64
+ expect(log.error).toHaveBeenCalledWith(
65
+ {
66
+ error,
67
+ data: { Module: props.moduleName },
68
+ message: error.message,
69
+ },
70
+ { skipConsole: true }
71
+ );
69
72
  });
70
73
 
71
74
  describe('with a custom fallback', () => {
@@ -114,7 +117,8 @@ describe(`[error-boundary] ${ErrorBoundary.name}`, () => {
114
117
  expect(log.error).toHaveBeenLastCalledWith(
115
118
  expect.objectContaining({
116
119
  data: { Module: props.moduleName, ...customDataCallback(error) },
117
- })
120
+ }),
121
+ { skipConsole: true }
118
122
  );
119
123
  });
120
124
  });
@@ -25,7 +25,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps> {
25
25
  if (this.logService) {
26
26
  const { moduleName: Module, getErrorData } = this.props;
27
27
  const data = { Module, ...getErrorData?.(error) };
28
- this.logService.error({ error, message: error.message, data });
28
+ this.logService.error({ error, message: error.message, data }, { skipConsole: true });
29
29
  }
30
30
 
31
31
  this.setState({ hasError: true }); // eslint-disable-line react/no-set-state