@appsignal/preact
Advanced tools
Comparing version 1.0.17 to 1.0.18
# AppSignal for preact changelog | ||
## 1.0.18 | ||
### Removed | ||
- [a33e5fd](https://github.com/appsignal/appsignal-javascript/commit/a33e5fdbadb3a56f6cece03e2906a900bb2763a3) patch - Remove error type check on ErrorBoundary. This is now done in the `setError` helper instead for all function calls. | ||
## 1.0.17 | ||
@@ -4,0 +10,0 @@ |
@@ -42,12 +42,2 @@ "use strict"; | ||
}); | ||
it("ignores non-Error objects being thrown", function () { | ||
expect(function () { | ||
preact_2.render(preact_1.h(ErrorBoundary_1.ErrorBoundary, { instance: instance }, | ||
preact_1.h(BrokenEvent, null))); | ||
}).toThrow(); | ||
expect(mock.setAction).not.toBeCalled(); | ||
expect(mock.setTags).not.toBeCalled(); | ||
expect(mock.setError).not.toBeCalled(); | ||
expect(instance.send).not.toBeCalled(); | ||
}); | ||
it("modifies the action if provided as a prop", function () { | ||
@@ -54,0 +44,0 @@ preact_2.render(preact_1.h(ErrorBoundary_1.ErrorBoundary, { instance: instance, action: "testaction" }, |
@@ -29,3 +29,2 @@ "use strict"; | ||
var preact_1 = require("preact"); | ||
var core_1 = require("@appsignal/core"); | ||
var ErrorBoundary = (function (_super) { | ||
@@ -39,4 +38,2 @@ __extends(ErrorBoundary, _super); | ||
ErrorBoundary.prototype.componentDidCatch = function (error, info) { | ||
if (!core_1.isError(error)) | ||
return; | ||
var _a = this.props, appsignal = _a.instance, action = _a.action, tags = _a.tags; | ||
@@ -43,0 +40,0 @@ var name = error.name, message = error.message, stack = error.stack; |
@@ -40,12 +40,2 @@ import { h } from "preact"; | ||
}); | ||
it("ignores non-Error objects being thrown", function () { | ||
expect(function () { | ||
render(h(ErrorBoundary, { instance: instance }, | ||
h(BrokenEvent, null))); | ||
}).toThrow(); | ||
expect(mock.setAction).not.toBeCalled(); | ||
expect(mock.setTags).not.toBeCalled(); | ||
expect(mock.setError).not.toBeCalled(); | ||
expect(instance.send).not.toBeCalled(); | ||
}); | ||
it("modifies the action if provided as a prop", function () { | ||
@@ -52,0 +42,0 @@ render(h(ErrorBoundary, { instance: instance, action: "testaction" }, |
@@ -26,3 +26,2 @@ var __extends = (this && this.__extends) || (function () { | ||
import { Component } from "preact"; | ||
import { isError } from "@appsignal/core"; | ||
var ErrorBoundary = (function (_super) { | ||
@@ -36,4 +35,2 @@ __extends(ErrorBoundary, _super); | ||
ErrorBoundary.prototype.componentDidCatch = function (error, info) { | ||
if (!isError(error)) | ||
return; | ||
var _a = this.props, appsignal = _a.instance, action = _a.action, tags = _a.tags; | ||
@@ -40,0 +37,0 @@ var name = error.name, message = error.message, stack = error.stack; |
{ | ||
"name": "@appsignal/preact", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"main": "dist/cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34898
296