Skip to content

Conversation

@ezzak
Copy link
Contributor

@ezzak ezzak commented Sep 3, 2025

  1. Recent PRs created some issues on Firefox, the Promise based chrome. APIs in Firefox/Safari must use browser. this is why we haven't usually used these in the past. But I want to be able to use this syntax, so I've added some global logic to magically use browser. when it's available (non-chromium browsers) and fallback to chrome. when it's not, this will allow the Promise based APIs to always work.
  2. I also realized we're transpiling to polyfill async/await which we don't really need to, upped the target ES version in .tsconfig
  3. storage.getKeys() JUST got added to Firefox https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/143#changes_for_add-on_developers so I'm changing things to use storage.get(null) instead since it has access to similar information
  4. Changed to typedefinitions file to support the above and remove some legacy unnecessary definitions

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 3, 2025
Copy link
Contributor

@rich-hansen rich-hansen left a comment

Choose a reason for hiding this comment

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

Looks good to me.

"noFallthroughCasesInSwitch": true,
"strict": true,
"target": "ES6"
"target": "ES2017"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we go higher?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, I'll look into it as a follow up.

@rich-hansen rich-hansen merged commit d13e87d into facebookincubator:main Sep 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants