Skip to content

Use modern browser API

Warren Gifford requested to merge browser-api into master

Created by: felixfbecker

  • Removes all uses of chrome API and replaces it with the browser API, which is much nicer as it uses Promises.
  • Adds custom types for WebExtensions because existing ones were largely incorrect. Might contribute to DT.
  • Removes the src/browser API wrapper, which was unpredictable and inconsistent.
  • Removes the storage wrapper and replaces it with a simpler wrapper that does nothing but add type safety.
    • As part of that, removes migrations. They were really hard to reason about and trivial to do ad-hoc when we need them. All migrations had been in there for a long time.
    • Also now all storage items are correctly typed as potentially undefined
  • Changes scripts/background.ts to use async/await and make the content/background script RPC more type safe (replace switch statement with dispatcher).

Closes #3200 (closed) Closes #3005 (closed)

Test Plan

Code Hosts
  • GitHub
  • GitHub Enterprise
  • Refined GitHub
  • Phabricator
  • Phabricator integration
  • Bitbucket
  • Gitlab
Browsers
  • Chrome
  • Firefox

Merge request reports

Loading