Skip to content

Commit

Permalink
Bump @types/webextension-polyfill from 0.10.7 to 0.12.1 (#259)
Browse files Browse the repository at this point in the history
* Bump @types/webextension-polyfill from 0.10.7 to 0.12.1

Bumps [@types/webextension-polyfill](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webextension-polyfill) from 0.10.7 to 0.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webextension-polyfill)

---
updated-dependencies:
- dependency-name: "@types/webextension-polyfill"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* update nvmrc; fix typing

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Graham Langford <[email protected]>
  • Loading branch information
dependabot[bot] and grahamlangford authored Sep 3, 2024
1 parent 9d616fb commit 40bf143
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20.12.0
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@sindresorhus/tsconfig": "^6.0.0",
"@types/chrome": "^0.0.270",
"@types/tape": "^5.6.4",
"@types/webextension-polyfill": "^0.10.7",
"@types/webextension-polyfill": "^0.12.1",
"buffer": "^6.0.3",
"eslint": "^8.57.0",
"eslint-config-pixiebrix": "^0.39.0",
Expand Down
2 changes: 1 addition & 1 deletion source/receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function isMessengerMessage(message: unknown): message is Message {
function onMessageListener(
message: unknown,
sender: Sender,
): Promise<unknown> | void {
): Promise<unknown> | undefined {
if (!isMessengerMessage(message)) {
// TODO: Add test for this eventuality: ignore unrelated messages

Check warning on line 32 in source/receiver.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'TODO: Add test for this eventuality:...'
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
browser.runtime.onMessage.addListener(
(message: unknown): Promise<string> | void => {
(message: unknown): Promise<string> | undefined => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((message as any)?.type === "sleep") {
console.log(
"I’m an unrelated message listener, but I'm replying anyway to",
{ message }
{ message },
);
return Promise.resolve("/r/nosleep");
}

console.log("I’m an unrelated message listener. I’ve seen", { message });
}
return undefined;
},
);

0 comments on commit 40bf143

Please sign in to comment.