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

Build MV3 extensions #98

Merged
merged 20 commits into from
Aug 11, 2021
Merged

Build MV3 extensions #98

merged 20 commits into from
Aug 11, 2021

Conversation

jacksteamdev
Copy link
Contributor

Community guidelines:

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers: #79 #94

Description

This PR adds the ability to build MV3 extensions. I've added a simple test with Playwright that builds an MV3 extension and checks that messages from a content script to the background service worker and the options page work as expected.

There is a bug in Chromium that causes content scripts not to work on pages with opaque origins (like files and sandboxed iframes).

I also encountered a bug while using chrome.storage that caused the options page to die with the error SIGABRT. It's not consistent and I haven't had time to report it.

@jacksteamdev jacksteamdev changed the base branch from main to beta August 11, 2021 22:45
@jacksteamdev jacksteamdev merged commit 19d5e6b into beta Aug 11, 2021
@jacksteamdev jacksteamdev deleted the mv3-output branch August 11, 2021 22:47
@jacksteamdev jacksteamdev mentioned this pull request Aug 11, 2021
8 tasks
jacksteamdev added a commit that referenced this pull request Aug 18, 2021
* fix: delay reload by 100ms

* tests: wait for reloader delay
skip delay if delay is 0

* 3.6.0-0

* Add MV3 types and JSON schema (#89)

* Fix integration bugs with new schema (#90)

* fix: add strict schema and fix schema bugs

* feat: upgrade manifest validation errors

* tests: upgrade TS and Jest
fix a bazillion ts-eslint errors
increase jest beforeAll timeout

* fix bug where pkg version could be undefined

* fix: use strict manifest for build validation

* chore: one more time!

* chore: again

* chore: include schema on npm

* chore: support node >= 12

* chore: remove comment from rollup config

* chore: fix types build step

* chore: add alias to jest

* chore: remove aliases

* 3.6.0-1

* chore: fix tsconfig one last time

* Update test fixtures for MV3 (#92)

* tests: rename mv2 parser test
use readJSONSync instead of require

* refactor: rename manifest types file

* chore: rename tests and fix test paths

* tests: create mv3 copies of all crx's

* tests: format test fixture manifest.json files

* chore: add mv2 to all mv3 manifests

* chore: upgrade all fixture manifests to mv3

* chore: ignore script files

* tests: remove junk files from google's conversion script

* tests: make scripts into modules

* tests: rename background file

* tests: rename fixture background files to service_worker

* chore: move and rename background sw files

* tests: remove mv3 irrelevant fixtures

* tests: rename fixture

* tests: side effect

* MV3 Parser (#93)

* tests: rename mv2 parser test
use readJSONSync instead of require

* refactor: rename manifest types file

* chore: rename tests and fix test paths

* tests: create mv3 copies of all crx's

* tests: format test fixture manifest.json files

* chore: add mv2 to all mv3 manifests

* chore: upgrade all fixture manifests to mv3

* chore: ignore script files

* tests: remove junk files from google's conversion script

* tests: make scripts into modules

* tests: rename background file

* tests: rename fixture background files to service_worker

* chore: move and rename background sw files

* tests: remove mv3 irrelevant fixtures

* tests: rename fixture

* feat: parse mv3

* 3.6.0-2

* Support locales (#95)

* tests: add locales fixtures

* feat: support locales in both mv2 and mv3

* fix: tighten filename validation to commonjs chunk

* Remove prettier (#96)

* refactor: remove prettier usage

* chore: make prettier a devDependency

* 3.6.0-3

* Build MV3 extensions (#98)

* 3.6.0-5

* chore: fix build error

* fix: allow ports in schema url match patterns

* 3.6.0-6

* fix: remove debugging line

* fix: warn deprecated feature correctly

* Manifest as ts files (#99)

* refactor deprecation warnings into own file

* refactor manifest v3 update into own file

* tests: add tests for manifest as ts file

* feat: support manifest as TS files

* fix build errors

* 3.6.0-7

* fix deprecation warning condition

* fix: convert content script match patterns (#100)

* fix duplicate match patterns

* fix duplicate map calls

* feat: simplify MV3 content script approach

* 3.6.0-8

* fix manifest v2 schema bug

* MV3 simple reloader (#103)

* refactor: switch to lodash

* feat: add mv3 support to simpleReloader

* fix manifest json schema bug

* refactor simple reloader
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.

1 participant