Commit 6aab24a
committed
Log deprecated Router warning once per process
The deprecated `Router`/`RouterError` compatibility shim from `@fedify/fedify/federation` logged a deprecation warning on every wrapped call. For applications that keep the compatibility class during migration, this could flood logs.
Consolidate both warnings into a single module-level one-shot `warnDeprecated()` guard so the migration signal is emitted at most once per process, and add a regression test asserting the warning is logged at most once across many wrapped calls and the error path.
#758 (comment)
Assisted-by: Claude Code:claude-opus-4-71 parent 8544065 commit 6aab24a
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
15 | 26 | | |
16 | 27 | | |
17 | 28 | | |
| |||
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
0 commit comments