Commit 7d6e178
## Explanation
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:
* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
This PR migrates `AuthenticationController`, `UserStorageController` to
the new `@metamask/messenger` message bus, as opposed to the one
exported from `@metamask/base-controller`.
## References
<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?
For example:
* Fixes #12345
* Related to #67890
-->
* Related to #5626
## Checklist
- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Migrates `AuthenticationController` and `UserStorageController` to
`@metamask/messenger`, renames state metadata `anonymous` ->
`includeInDebugSnapshot`, and updates tests, configs, and deps.
>
> - **Profile Sync Controller**:
> - Migrate `AuthenticationController` and `UserStorageController` from
`@metamask/base-controller` messenger to `@metamask/messenger`
(`messagingSystem` -> `messenger`; new handler/subscribe/call usage;
updated types).
> - Update imports to `@metamask/base-controller/next`.
> - Rename state metadata key `anonymous` to `includeInDebugSnapshot`
and adjust tests accordingly.
> - Revise tests/mocks to construct root/child messengers and delegate
permissions; adapt mock handlers (e.g., `SnapController:handleRequest`).
> - **Dependencies/Config**:
> - Add `@metamask/messenger` dependency and TS project references;
update `yarn.lock`.
> - Update README dependency graph to include `@metamask/messenger` and
new edges.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b09e552. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Michele Esposito <michele@esposito.codes>
1 parent caccf12 commit 7d6e178
File tree
11 files changed
+168
-99
lines changed- packages/profile-sync-controller
- src/controllers
- authentication
- user-storage
- __fixtures__
11 files changed
+168
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
Lines changed: 54 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
5 | | - | |
6 | | - | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
560 | 566 | | |
561 | 567 | | |
562 | 568 | | |
563 | | - | |
| 569 | + | |
564 | 570 | | |
565 | 571 | | |
566 | 572 | | |
| |||
726 | 732 | | |
727 | 733 | | |
728 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
729 | 758 | | |
730 | 759 | | |
731 | 760 | | |
732 | 761 | | |
733 | 762 | | |
734 | 763 | | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
743 | 778 | | |
744 | 779 | | |
745 | | - | |
| 780 | + | |
746 | 781 | | |
747 | 782 | | |
748 | 783 | | |
| |||
771 | 806 | | |
772 | 807 | | |
773 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
774 | 815 | | |
775 | 816 | | |
776 | 817 | | |
| |||
Lines changed: 25 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 128 | + | |
131 | 129 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 130 | + | |
135 | 131 | | |
136 | 132 | | |
137 | | - | |
| 133 | + | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 136 | + | |
143 | 137 | | |
144 | 138 | | |
145 | 139 | | |
| |||
163 | 157 | | |
164 | 158 | | |
165 | 159 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 160 | + | |
169 | 161 | | |
170 | 162 | | |
171 | | - | |
| 163 | + | |
172 | 164 | | |
173 | 165 | | |
174 | 166 | | |
175 | | - | |
| 167 | + | |
176 | 168 | | |
177 | 169 | | |
178 | 170 | | |
| |||
239 | 231 | | |
240 | 232 | | |
241 | 233 | | |
242 | | - | |
| 234 | + | |
243 | 235 | | |
244 | 236 | | |
245 | 237 | | |
246 | 238 | | |
247 | | - | |
| 239 | + | |
248 | 240 | | |
249 | 241 | | |
250 | 242 | | |
251 | 243 | | |
252 | | - | |
| 244 | + | |
253 | 245 | | |
254 | 246 | | |
255 | 247 | | |
256 | 248 | | |
257 | | - | |
| 249 | + | |
258 | 250 | | |
259 | 251 | | |
260 | 252 | | |
261 | 253 | | |
262 | | - | |
| 254 | + | |
263 | 255 | | |
264 | 256 | | |
265 | 257 | | |
266 | 258 | | |
267 | | - | |
| 259 | + | |
268 | 260 | | |
269 | 261 | | |
270 | 262 | | |
| |||
388 | 380 | | |
389 | 381 | | |
390 | 382 | | |
391 | | - | |
| 383 | + | |
392 | 384 | | |
393 | 385 | | |
394 | 386 | | |
| |||
404 | 396 | | |
405 | 397 | | |
406 | 398 | | |
407 | | - | |
| 399 | + | |
408 | 400 | | |
409 | 401 | | |
410 | 402 | | |
| |||
434 | 426 | | |
435 | 427 | | |
436 | 428 | | |
437 | | - | |
| 429 | + | |
438 | 430 | | |
439 | 431 | | |
440 | 432 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
| 769 | + | |
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| |||
0 commit comments