This was a pretty simple transition because better-trading makes very minimal use of its background page; it was already event-based and required no code changes to adapt to becoming a service worker. Most of the changes are trivial updates to the manifest generation script.
The only real interesting change was the new ember-cli-build.js setting that's become required with Manifest v3's new security requirements that forbid the use of eval by extensions. Previously, in dev builds of the extension, ember-auto-import would by default use webpack settings for source map generation that resulted in eval appearing implicitly in the dev js bundle. The new forbidEval setting forces ember-auto-import not to do that so that the dev extension can load successfully in mv3 mode.
Verified by:
running make test
smoke testing that a dev build of the extension (make dev) loaded and appeared functional
smoke testing that a prod build of the extension (make package-chrome) loaded and appeared functional
This PR updates the extension from Manifest v2 to Manifest v3. This will avoid the extension breaking in January 2023, when Chrome intends to drop support for v2 extensions.
To do this, I followed Chrome's migration guide and double checked its migration checklist.
This was a pretty simple transition because
better-trading
makes very minimal use of its background page; it was already event-based and required no code changes to adapt to becoming a service worker. Most of the changes are trivial updates to the manifest generation script.The only real interesting change was the new
ember-cli-build.js
setting that's become required with Manifest v3's new security requirements that forbid the use ofeval
by extensions. Previously, in dev builds of the extension,ember-auto-import
would by default use webpack settings for source map generation that resulted ineval
appearing implicitly in the dev js bundle. The newforbidEval
setting forcesember-auto-import
not to do that so that the dev extension can load successfully in mv3 mode.Verified by:
make test
make dev
) loaded and appeared functionalmake package-chrome
) loaded and appeared functional