feat: add support for Firefox data collection permissions#1976
feat: add support for Firefox data collection permissions#1976suveshmoza wants to merge 15 commits intowxt-dev:mainfrom
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
I'm concerned that devs will see the warning and get mad that the only way to silence it is to add the option. I'd be nervous to do that because I'm not sure if adding, even a blank object, could result in the extension being disabled since the manifest changed in a way that the prompt also changed. I'd like to add a config option to silence this if the dev doesn't want to address it yet.
Thoughts?
I agree with your concerns. The warning could frustrate developers, especially those maintaining existing extensions, who are currently exempt but will eventually need to specify these permissions. Yes, a config option would be nice and could be extended for future warnings. Something like export default defineConfig({
suppressWarnings: {
firefoxDataCollection: true,
},
// ... rest of config
});
if (
wxt.config.browser === 'firefox' &&
!userManifest.browser_specific_settings?.gecko?.data_collection_permissions &&
!wxt.config.suppressWarnings?.firefoxDataCollection //using config option here to silence warning
) |
54a2c71 to
feed267
Compare
aklinker1
left a comment
There was a problem hiding this comment.
suppressWarnings - I like that naming, lets add it!
Needs to be added in 2 places:
-
User facing config type:
Lines 12 to 377 in 223cf86
Everything needs to be optional
-
Internal config type:
Lines 1288 to 1403 in 223cf86
Everything is required.
-
Map the user config to the resolved config:
You should see a type error in this file after changing the types.
Then we can also a message to the warning about how to set the config to suppress the warning.
3a474cb to
12da160
Compare
|
Done. I've added the suppressWarnings config option as specified. export default defineConfig({
suppressWarnings: {
firefoxDataCollection: true,
},
// ... rest of config
}); |
1e98210 to
e6f8d68
Compare
aklinker1
left a comment
There was a problem hiding this comment.
Sorry for the delay, this looks good now! Just a few small changes then we can merge.
…` option (wxt-dev#2142) Co-authored-by: nickbar01234 <nickbar01234gmail.com> Co-authored-by: Aaron <aaronklinker1@gmail.com>
|
@suveshmoza Are you eager to go on with this? |
…#2150) Co-authored-by: Aaron <aaronklinker1@gmail.com>
e6f8d68 to
057518d
Compare
Yes, I’ve made the requested changes and pushed the updates. |
|
@aklinker1 Let's check it, maybe that's good enough to merge. |
aklinker1
left a comment
There was a problem hiding this comment.
Perfect, thanks. Releasing today.
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1976 +/- ##
==========================================
+ Coverage 76.26% 76.39% +0.12%
==========================================
Files 113 114 +1
Lines 3055 3071 +16
Branches 686 698 +12
==========================================
+ Hits 2330 2346 +16
Misses 641 641
Partials 84 84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Looks like there's a test failing because of the new warn. |
|
This is the second time linux tests passed and windows failed when they both should have failed... I guess I need to figure that out lol. |
Overview
Adds support for Firefox's required
data_collection_permissionsfield inbrowser_specific_settings.gecko. As of November 3rd, 2025, all new Firefox extensions must declare their data collection practices.Changes
FirefoxDataCollectionTypeandFirefoxDataCollectionPermissionsTypeScript typesUserManifestto includedata_collection_permissionsinbrowser_specific_settings.geckodata_collection_permissions#specifiedManual Testing
Building the wxt-demo for Firefox will show a warning to add
data_collection_permissionsto manifest config.Related Issue
This PR closes #1975