exile-center / better-trading

QoL improvements for the official PathOfExile trading site.
30 stars 5 forks source link

Update from manifest v2 to manifest v3 #108

Closed dbjorge closed 1 year ago

dbjorge commented 1 year ago

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 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:

pboutin commented 1 year ago

running make format will run eslint in fix mode and also prettier, that should fix the build. I can do that for you :)