Skip to content

Commit

Permalink
Bump serialize-error
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jan 4, 2025
1 parent 32d1989 commit bbf7d65
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
22 changes: 6 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webext-messenger",
"version": "0.29.1",
"version": "0.30.0-0",
"description": "Browser Extension component messaging framework",
"keywords": [],
"repository": "pixiebrix/webext-messenger",
Expand Down Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"p-event": "^6.0.1",
"p-retry": "^6.2.1",
"serialize-error": "^11.0.3",
"serialize-error": "github:sindresorhus/serialize-error#b6ff2ebcd3ed474787a1666596999b9702fa8fb6",
"type-fest": "^4.31.0",
"webext-detect": "^5.3.2",
"webext-events": "^3.1.1"
Expand Down
5 changes: 2 additions & 3 deletions source/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type JsonObject } from "type-fest";
import { errorConstructors } from "serialize-error";
import { addKnownErrorConstructor } from "serialize-error";

type ErrorObject = {
name?: string;
Expand All @@ -17,8 +17,7 @@ export class MessengerError extends Error {
override name = "MessengerError";
}

// @ts-expect-error Wrong `errorConstructors` types
errorConstructors.set("MessengerError", MessengerError);
addKnownErrorConstructor(MessengerError);

export function isErrorObject(error: unknown): error is ErrorObject {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a type guard function and it uses ?.
Expand Down

0 comments on commit bbf7d65

Please sign in to comment.