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

Add support for Manifest v3 #28

Merged
merged 9 commits into from
Jan 18, 2024
Merged

Add support for Manifest v3 #28

merged 9 commits into from
Jan 18, 2024

Conversation

aspiers
Copy link
Contributor

@aspiers aspiers commented Dec 31, 2023

This is only lightly tested on Chrome with a v3 manifest, not with any v2 manifests or other browsers such as Firefox.

Adam Spiers and others added 3 commits December 31, 2023 14:53
@aspiers aspiers mentioned this pull request Jan 16, 2024
@fregante fregante self-assigned this Jan 16, 2024
index.ts Outdated
const optionalHosts = optionalPermissions?.filter(permission => /<all_urls>|\*/.test(permission));
const optHostPermsKey = manifest.version === '2' ? 'optional_permissions' : 'optional_host_permissions';
// @types/chrome is missing a type for optional_host_permissions:
// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/68051
Copy link
Owner

Choose a reason for hiding this comment

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

@fregante
Copy link
Owner

@aspiers how does it look? I published a beta version as v4.1.0-0 that you can install directly.

One thing I'd avoid in this PR is to update the dependencies (except maybe @types/chrome if necessary). This way I can release it as a minor version for now

@fregante fregante changed the title manifest v3 support (updated) Add support for Manifest v3 Jan 16, 2024
@aspiers
Copy link
Contributor Author

aspiers commented Jan 16, 2024

@aspiers how does it look? I published a beta version as v4.1.0-0 that you can install directly.

Will test and let you know!

One thing I'd avoid in this PR is to update the dependencies (except maybe @types/chrome if necessary). This way I can release it as a minor version for now

Ah sorry, I thought you'd asked for that, but looking back at that comment I see you probably meant something else.

@fregante
Copy link
Owner

Oh yeah I did ask for it, thinking that those dependencies were recently updated to improve MV3 compat, but that isn't the case.

The dev dependencies also change the output so I'll skip them for now

@aspiers
Copy link
Contributor Author

aspiers commented Jan 18, 2024

Still testing this and trying to untangle various issues as mentioned in #29 (comment)

@fregante
Copy link
Owner

This works for me. The other issues I see are unrelated to MV3

@fregante fregante merged commit 8893525 into fregante:main Jan 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manifest v3 compatibility
2 participants