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

Simplify Chrome API wrapper #1607

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Simplify Chrome API wrapper #1607

merged 3 commits into from
Oct 2, 2024

Conversation

robertknight
Copy link
Member

Since the migration to Manifest V3 is now complete, all of the chrome APIs support returning promises, so we don't need to wrap the older callback-returning APIs to return promises. This simplifies the code and also removes the need for a TypeScript workaround when resolving the type of wrapped functions.

In the process I had to fix an error when running make format locally due to node_modules/.bin/prettier not being executable. This had been on my TODO list for a while.

Fix an error complaining that `node_modules/.bin/prettier` is not executable.
Since the migration to Manifest V3 is now complete, all of the `chrome` APIs
support returning promises, so we don't need to wrap the older
callback-returning APIs to return promises. This simplifies the code and
also removes the need for a TypeScript workaround when resolving the type
of wrapped functions.
This API is always present as we only support Manifest V3.
Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

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

👍🏼

@robertknight robertknight merged commit e5b6f0f into main Oct 2, 2024
2 checks passed
@robertknight robertknight deleted the simplify-chrome-api-wrapper branch October 2, 2024 13:04
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.

2 participants