From 650d7f0c6b8389d2cfd1814b1be1003cb8af1370 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Fri, 12 Apr 2024 17:35:18 +0800 Subject: [PATCH 1/3] fix: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. (#518) close #522 #518 --- src/background/messageListeners/index.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/background/messageListeners/index.ts b/src/background/messageListeners/index.ts index 16ce931d..3be80fc5 100644 --- a/src/background/messageListeners/index.ts +++ b/src/background/messageListeners/index.ts @@ -14,10 +14,15 @@ import API_VIDEO from './video' import API_WATCHLATER from './watchLater' export function setupAllMsgLstnrs() { - // Merge all API objects into one - const FullAPI = Object.assign({}, API_AUTH, API_ANIME, API_HISTORY, API_FAVORITE, API_MOMENT, API_NOTIFICATION, API_RANKING, API_SEARCH, API_USER, API_VIDEO, API_WATCHLATER) - // Create a message listener for each API - const handleMessage = apiListenerFactory(FullAPI) - browser.runtime.onMessage.removeListener(handleMessage) - browser.runtime.onMessage.addListener(handleMessage) + browser.runtime.onConnect.removeListener(handleConnect) + browser.runtime.onConnect.addListener(handleConnect) + + function handleConnect() { + // Merge all API objects into one + const FullAPI = Object.assign({}, API_AUTH, API_ANIME, API_HISTORY, API_FAVORITE, API_MOMENT, API_NOTIFICATION, API_RANKING, API_SEARCH, API_USER, API_VIDEO, API_WATCHLATER) + // Create a message listener for each API + const handleMessage = apiListenerFactory(FullAPI) + browser.runtime.onMessage.removeListener(handleMessage) + browser.runtime.onMessage.addListener(handleMessage) + } } From 723c92c316959ed37ea09008e34cf735097a997f Mon Sep 17 00:00:00 2001 From: Hakadao Date: Fri, 12 Apr 2024 17:36:31 +0800 Subject: [PATCH 2/3] chore: update version number --- .github/workflows/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 8f08052e..f6a1eef8 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -19,6 +19,6 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} release-type: node package-name: release-please-action - release-as: 0.16.2 + release-as: 0.16.4 signoff: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>' changelog-types: '[{"type":"types","section":"Types","hidden":false},{"type":"revert","section":"Reverts","hidden":false},{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"improvement","section":"Feature Improvements","hidden":false},{"type":"docs","section":"Docs","hidden":false},{"type":"i18n","section":"I18n","hidden":true},{"type":"style","section":"Style Changes","hidden":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]' From bed79a287259050e95cde79b7114471bcda5f695 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Fri, 12 Apr 2024 17:37:53 +0800 Subject: [PATCH 3/3] chore(main): release 0.16.4 Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a233d461..85dd7d90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.16.4](https://github.com/hakadao/BewlyBewly/compare/v0.16.2...v0.16.4) (2024-04-12) + + +### Bug Fixes + +* Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. ([#518](https://github.com/hakadao/BewlyBewly/issues/518)) ([650d7f0](https://github.com/hakadao/BewlyBewly/commit/650d7f0c6b8389d2cfd1814b1be1003cb8af1370)) + ## [0.16.2](https://github.com/hakadao/BewlyBewly/compare/v0.16.1...v0.16.2) (2024-04-11) diff --git a/package.json b/package.json index 2a52ef79..05e28b31 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bewly-bewly", "displayName": "BewlyBewly", - "version": "0.16.2", + "version": "0.16.4", "private": true, "packageManager": "pnpm@8.15.3", "description": "Just make a few small changes to your Bilibili homepage.",