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

fix: missing browser in shadow-root file #1317

Merged

Conversation

1natsu172
Copy link
Contributor

@1natsu172 1natsu172 commented Dec 31, 2024

I saw the Discord announcement and tried it and found that shadow RootUi was broken. I found the browser import missing(loadCss failed), so I fix that.

With this fix both my project and wxt-demo mount fine.

@aklinker1
Copy link
Collaborator

Thanks... But why didn't typescript catch this 🤔 gonna double check that no more browser imports are missing before merging

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.48%. Comparing base (4e4f99d) to head (5749e28).
Report is 1 commits behind head on 0.20.0-breaking-changes.

Files with missing lines Patch % Lines
...ges/wxt/src/utils/content-script-ui/shadow-root.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           0.20.0-breaking-changes    #1317      +/-   ##
===========================================================
+ Coverage                    81.23%   81.48%   +0.25%     
===========================================================
  Files                          127      127              
  Lines                         6245     6244       -1     
  Branches                      1045     1049       +4     
===========================================================
+ Hits                          5073     5088      +15     
+ Misses                        1155     1139      -16     
  Partials                        17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1natsu172
Copy link
Contributor Author

But why didn't typescript catch this 🤔

That's because the browser.runtime.getURL part has @ts-expect-error.

gonna double check

I checked this regex( /@ts-expect-error[^\n]*\n[^\n]*\bbrowser\b/g ) to see if there were any others, but please double check. If you can think of anything else besides browser, that too.

@aklinker1 aklinker1 merged commit 58145e6 into wxt-dev:0.20.0-breaking-changes Dec 31, 2024
10 checks passed
@1natsu172 1natsu172 deleted the fix-0.20-shadow-root branch December 31, 2024 16:06
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