webext-messenger
Advanced tools
Comparing version 0.15.0-0 to 0.15.0-1
@@ -0,5 +1,10 @@ | ||
// Imports must use the .js extension because of ESM requires it and TS refuses to rewrite .ts to .js | ||
// This works in TS even if the .js doesn't exist, but it breaks Parcel (the tests builder) | ||
// For this reason, there's an `alias` field in package.json to redirect these imports. | ||
// If you see "@parcel/resolver-default: Cannot load file './yourNewFile.js'" you need to add it to the `alias` list | ||
// 🥲 | ||
export * from "./receiver.js"; | ||
export * from "./sender.js"; | ||
export * from "./types.js"; | ||
import { initPrivateApi } from "./thisTarget"; | ||
import { initPrivateApi } from "./thisTarget.js"; | ||
initPrivateApi(); |
@@ -6,3 +6,3 @@ import browser from "webextension-polyfill"; | ||
import { getContextName } from "webext-detect-page"; | ||
import { getActionForMessage, nameThisTarget } from "./thisTarget"; | ||
import { getActionForMessage, nameThisTarget } from "./thisTarget.js"; | ||
export function isMessengerMessage(message) { | ||
@@ -9,0 +9,0 @@ return (isObject(message) && |
import { isBackgroundPage, isContentScript } from "webext-detect-page"; | ||
import { messenger } from "./index"; | ||
import { messenger } from "./sender.js"; | ||
import { registerMethods } from "./receiver.js"; | ||
@@ -4,0 +4,0 @@ import { debug } from "./shared.js"; |
{ | ||
"name": "webext-messenger", | ||
"version": "0.15.0-0", | ||
"version": "0.15.0-1", | ||
"description": "Browser Extension component messaging framework", | ||
@@ -16,3 +16,4 @@ "keywords": [], | ||
"./source/types.js": "./source/types.ts", | ||
"./source/shared.js": "./source/shared.ts" | ||
"./source/shared.js": "./source/shared.ts", | ||
"./source/thisTarget.js": "./source/thisTarget.ts" | ||
}, | ||
@@ -49,2 +50,17 @@ "scripts": { | ||
"rules": { | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
"paths": [ | ||
{ | ||
"name": "./index", | ||
"message": "The index file is only used to re-export internal files. Use direct imports instead." | ||
} | ||
] | ||
} | ||
], | ||
"import/extensions": [ | ||
"error", | ||
"always" | ||
], | ||
"import/no-unresolved": "off", | ||
@@ -82,2 +98,10 @@ "unicorn/filename-case": [ | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"source/test/**/*" | ||
], | ||
"rules": { | ||
"import/extensions": "off" | ||
} | ||
} | ||
@@ -87,5 +111,5 @@ ] | ||
"dependencies": { | ||
"p-retry": "^4.6.1", | ||
"serialize-error": "^8.1.0", | ||
"type-fest": "^2.5.1", | ||
"p-retry": "^5.0.0", | ||
"serialize-error": "^9.0.0", | ||
"type-fest": "^2.6.0", | ||
"webext-detect-page": "^3.1.0", | ||
@@ -95,20 +119,20 @@ "webextension-polyfill": "^0.8.0" | ||
"devDependencies": { | ||
"@parcel/config-webextension": "^2.0.0", | ||
"@parcel/config-webextension": "^2.0.1", | ||
"@sindresorhus/tsconfig": "^2.0.0", | ||
"@types/chrome": "^0.0.159", | ||
"@types/webextension-polyfill": "^0.8.0", | ||
"@typescript-eslint/eslint-plugin": "^5.1.0", | ||
"@typescript-eslint/parser": "^5.1.0", | ||
"eslint": "^8.1.0", | ||
"@types/chrome": "^0.0.164", | ||
"@types/tape": "^4.13.2", | ||
"@types/webextension-polyfill": "^0.8.2", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"eslint": "^8.3.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-config-xo": "^0.39.0", | ||
"eslint-config-xo-typescript": "^0.45.2", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-unicorn": "^37.0.1", | ||
"fresh-tape": "^5.3.1", | ||
"eslint-config-xo-typescript": "^0.47.1", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-unicorn": "^39.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"parcel": "^2.0.0", | ||
"typescript": "^4.4.4", | ||
"webext-content-scripts": "^0.10.1", | ||
"xo": "^0.45.0" | ||
"parcel": "^2.0.1", | ||
"tape": "^5.3.2", | ||
"typescript": "^4.5.2", | ||
"webext-content-scripts": "^0.10.1" | ||
}, | ||
@@ -115,0 +139,0 @@ "targets": { |
20511
15
346
+ Added@types/retry@0.12.1(transitive)
+ Addedp-retry@5.1.2(transitive)
+ Addedserialize-error@9.1.1(transitive)
- Removed@types/retry@0.12.0(transitive)
- Removedp-retry@4.6.2(transitive)
- Removedserialize-error@8.1.0(transitive)
- Removedtype-fest@0.20.2(transitive)
Updatedp-retry@^5.0.0
Updatedserialize-error@^9.0.0
Updatedtype-fest@^2.6.0