Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: bump the manifest version to v3 #5339

Closed
wants to merge 1 commit into from
Closed

Update: bump the manifest version to v3 #5339

wants to merge 1 commit into from

Conversation

vrishtrix
Copy link

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.
  • Added/Updated related tests.

Short description of the change(s)

The first step to adding support for Manifest v3, addresses the concern laid out on #5308.

This PR bumps the manifest file version to v3 which is intended to be followed up with changes related to functionality to make the browser extension compatible.

It has no breaking changes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 1, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Vrishtrix / name: Vrishin Patel (ffb51e4)

@vidorteg
Copy link
Member

vidorteg commented Oct 4, 2022

Thank you for the PR @vrishtrix, this has been in our radar for some time. We are validating a couple of tricky scenarios and if everything works out as expected we can merge this PR. I'll come back soon and take a look.

Copy link
Member

@vidorteg vidorteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a look and it seems this requires more work 😉, here are some of my findings:

  • manifest.json still have some V2 only properties (left some comments)
  • service workers cannot longer access the DOM so extension-browser/src/shared/globals.ts needs to account for this (e.g failures in document, window, MutationObserver and impacts packages/extension-browser/src/content-script/connector.ts)
  • tabs.executeScript becomes scripting.executeScript this impacts extension-browser/src/background-script.ts and also manifest.json

There might be more but these are the ones I found on a quick glance. Please address them and feel free to ping me again once review is required. Thanks again for your contributions to the webhint community.

@@ -1,22 +1,22 @@
{
"author": "webhint",
"background": {
"scripts": [
"service_worker": [
"background-script.js"
],
"persistent": false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be taken out on V3

@@ -1,22 +1,22 @@
{
"author": "webhint",
"background": {
"scripts": [
"service_worker": [
"background-script.js"
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in V3 should be a string instead of an array

"default_title": "webhint",
"default_popup": "browser-action/browser-action.html"
},
"default_locale": "en",
"description": "Quickly test your website to see if there are any issues with accessibility, browser compatibility, security, performance and more.",
"devtools_page": "devtools/devtools.html",
"manifest_version": 2,
"manifest_version": 3,
"name": "webhint",
"permissions": [
"<all_urls>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that <all_urls> is not a valid value in permissions any more (maybe host_permissions)?

@vrishtrix vrishtrix closed this by deleting the head repository Apr 7, 2023
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.

2 participants