Repository navigation
v0.1.19
Release 0.1.19
Keep what a preload registered, and register the routes late enough to see it
Two halves of the same gap, both of which made relay.authorize(...) in a
preload answer E_CHANNEL_NO_AUTHORIZER at request time.
services/main hands out a Proxy that builds a default Relay on first
property access, so an application with no provider still has a usable
surface. The provider then builds its own — configured — instance and
takes the slot, leaving everything already registered on the default with
an object nothing serves from. Nothing said so: both calls read as
relay.authorize(...), and getRelay() returned the served one.
setRelay now moves those registrations across — authorizers, the route
customizer, mounted hubs and lifecycle listeners. Only from the lazy
default, and only for a pattern the served instance has not declared
itself: replacing a real instance with another (a hot reload, a second
Ignitor under test) must hand over a clean one rather than drag the
previous application's rules into it.
And the routes move from start() to ready(). The provider's comment
claimed they were registered "AFTER preloads have run", which is not the
order: the host starts every provider first, precisely so a preload finds
a built container. So registerRoutes(customizer) written in
start/services.ts could never reach the routes it decorates — they were
already built. ready() runs after the preloads, and adding routes there
is safe: the router builds its lookup index lazily and rebuilds it when
the table changes.
Lint this package the way its own repository will
biome's configuration lived only at the workspace root. This package is
built from its own repository, where that file does not exist and biome
falls back to its defaults — so lint in CI has been checking a different
set of rules from lint here, and the bans this project actually cares
about were never enforced where it counts.
The config is now the package's own, and says the same thing the root one
did.
Declare what CI has to install
Each package is its own repository: pnpm install there sees only this
file, so a dependency the workspace happened to hoist locally is simply
absent in CI. --coverage needs @vitest/coverage-v8 named here, and an
optional peer a test imports has to be a devDependency as well — optional
is exactly what keeps it from being installed.
Lint the tests, and read a sent frame by name
Six sites did JSON.parse(sent[n]?.toString() ?? "") and cast the result
to reach .code: the optional chain reads like a guard, and the cast is
what keeps the compiler from asking. They go through an errorCode(sent, nth) helper that says which frame it means and fails with that name.
Plus the rest of the gates the package already declared.
Changes since v0.1.18.