feat(query-core): add timeoutManager to allow changing setTimeout/setInterval (#9612)
* add timeoutManager class * add additional types & export functions * convert all setTimeout/setInterval to managed versions * tweaks * add claude-generated tests * tests * revert changes in query-async-storage-persister: no path to import query-core * re-export more types * console.warn -> non-production console.error * query-async-storage-persister: use query-core managedSetTimeout * pdate pnpm-lock for new dependency edge * sleep: always managedSetTimeout * remove managed* functions, call method directly * remove runtime coercion and accept unsafe any within TimeoutManager class * cleanup; fix test after changes * name is __TEST_ONLY__ * notifyManager: default scheduler === systemSetTimeoutZero * Improve TimeoutCallback comment since ai was confused * remove unnecessary timeoutManager-related exports * prettier-ify index.ts (seems my editor messed with it already this pr?) * continue to export defaultTimeoutProvider for tests * oops missing import * fix: export systemSetTimeoutZero from core * ref: use notifyManager.schedule in createPersister because it needs to work with whatever scheduleFn we have set there * ref: move provider check behind env check * docs * doc tweaks * doc tweaks * docs: reference timeoutManager in discussion of 24 day setTimout limit * Apply suggestion from @TkDodo * Apply suggestion from @TkDodo * chore: fix broken links * docs: syntax fix --------- Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
J
Jake Teton-Landis committed
a0b96db9375d98ec42009d50b73e97822c72487c
Parent: 2283633
Committed by GitHub <noreply@github.com>
on 9/5/2025, 11:37:09 AM