webext-messenger 0.29.1 → 0.30.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.
@@ -1,4 +1,4 @@
1
- import { errorConstructors } from "serialize-error";
1
+ import { addKnownErrorConstructor } from "serialize-error";
2
2
  export const __webextMessenger = true;
3
3
  export function isObject(value) {
4
4
  return typeof value === "object" && value !== null;
@@ -6,8 +6,7 @@ export function isObject(value) {
6
6
  export class MessengerError extends Error {
7
7
  name = "MessengerError";
8
8
  }
9
- // @ts-expect-error Wrong `errorConstructors` types
10
- errorConstructors.set("MessengerError", MessengerError);
9
+ addKnownErrorConstructor(MessengerError);
11
10
  export function isErrorObject(error) {
12
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a type guard function and it uses ?.
13
12
  return typeof error?.message === "string";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webext-messenger",
3
- "version": "0.29.1",
3
+ "version": "0.30.0",
4
4
  "description": "Browser Extension component messaging framework",
5
5
  "keywords": [],
6
6
  "repository": "pixiebrix/webext-messenger",
@@ -28,9 +28,9 @@
28
28
  "dependencies": {
29
29
  "p-event": "^6.0.1",
30
30
  "p-retry": "^6.2.1",
31
- "serialize-error": "^11.0.3",
32
- "type-fest": "^4.29.1",
33
- "webext-detect": "^5.3.1",
31
+ "serialize-error": "^12.0.0",
32
+ "type-fest": "^4.31.0",
33
+ "webext-detect": "^5.3.2",
34
34
  "webext-events": "^3.1.1"
35
35
  },
36
36
  "@parcel/resolver-default": {
@@ -40,7 +40,7 @@
40
40
  "@parcel/config-webextension": "^2.11.0",
41
41
  "@sindresorhus/tsconfig": "^7.0.0",
42
42
  "@types/chrome": "^0.0.287",
43
- "@types/tape": "^5.6.5",
43
+ "@types/tape": "^5.8.0",
44
44
  "@types/webextension-polyfill": "^0.12.1",
45
45
  "buffer": "^6.0.3",
46
46
  "eslint": "^8.57.0",
@@ -53,7 +53,7 @@
53
53
  "stream-browserify": "^3.0.0",
54
54
  "tape": "^5.9.0",
55
55
  "typescript": "^5.7.2",
56
- "vitest": "^2.1.6",
56
+ "vitest": "^2.1.8",
57
57
  "webext-content-scripts": "^2.7.0",
58
58
  "webextension-polyfill": "^0.12.0"
59
59
  },