Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 14, 2025

This PR migrates the pbkit-devtools browser extension from Manifest V2 to Manifest V3, in preparation for Chrome's deprecation of Manifest V2 (see Chrome's Manifest V3 migration guide).

Changes Made

The migration updates packages/browser-extension/template/manifest.json with the following changes:

  1. Updated manifest version: Changed manifest_version from 2 to 3

  2. Converted background script to service worker: Replaced the background.scripts array with background.service_worker to use the new service worker-based background script model:

    - "background": {
    -   "scripts": ["background.js"]
    - }
    + "background": {
    +   "service_worker": "background.js"
    + }
  3. Added host permissions: Added host_permissions field to explicitly declare URL access permissions that were previously implicit in the content scripts matches:

    "host_permissions": ["<all_urls>"]

Compatibility Verification

  • background.js: Already fully compatible with service workers. It only uses:

    • chrome.runtime.onConnect API (fully supported in service workers)
    • Standard JavaScript (WeakMap, objects, functions)
    • No DOM access or other service worker-incompatible APIs
  • content-script.js: Remains fully compatible with Manifest V3:

    • Uses chrome.runtime.connect which is unchanged in MV3
    • Message passing functionality works identically

The extension is now compliant with Manifest V3 requirements and will continue to work as Chrome phases out Manifest V2 support.

Fixes #1

Original prompt

This section details on the original issue you should resolve

<issue_title>migrate to manifest v3</issue_title>
<issue_description>https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #12


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Migrate extension to manifest V3 Migrate browser extension to Manifest V3 Oct 14, 2025
@Copilot Copilot AI requested a review from disjukr October 14, 2025 09:05
Copilot finished work on behalf of disjukr October 14, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate to manifest v3

2 participants