@source-repo/query
The pull half of a control network: a TanStack Query cache over $data, whose freshness comes from the publisher rather than from a clock. Its own version line, built against the library's public APIs only.
npm install @source-repo/query- Confirmed current, not "probably still good" — a page drawn at the revision the component channel currently holds has had nothing published over it, which is a fact from the source rather than a policy computed from a timer.
- Three states, never two —
current,possibly-changed, andunknownfor where nothing is watching. Acurrentthat is sometimes a guess would be worth nothing. - A period that costs nothing while the plant is quiet — a tick over a
currentpage asks for nothing at all, and the same period behaves exactly as before against a moving one. semanticsdecides whether a retry is safe — a cache retries three times by default, which is right only because aqueryis a query; undeclared means undeclared, and nothing is retried.- A deadline is a budget across attempts — every attempt gets what remains of what the caller declared, and one that arrives with none left is refused rather than sent.
- Not a browser thing —
@tanstack/query-coreis framework-agnostic, so two Node services pulling from a third get the same dedup, arithmetic and freshness.
Full documentation: the package README. On npm: @source-repo/query.