Repository navigation
feat(storage): add metadata watchers - #2630
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@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 #2630 +/- ##
==========================================
- Coverage 79.81% 79.68% -0.13%
==========================================
Files 138 138
Lines 4092 4101 +9
Branches 941 943 +2
==========================================
+ Hits 3266 3268 +2
- Misses 729 735 +6
- Partials 97 98 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for helping make WXT better! |
Closes #1988
Adds
watchMetato both the top-level storage API and defined storage items. Metadata callbacks normalize missing or removed values to{}, matchinggetMeta, and return the same unsubscribe function as value watchers.The storage guide now documents both forms.
Tests cover metadata updates, removals, unrelated value changes, and unsubscription across storage areas.
Verified with:
bun run --cwd packages/storage test runbun run --cwd packages/storage check