Skip to content

v0.52.2

Choose a tag to compare

@github-actions github-actions released this 19 Apr 20:25
· 21 commits to main since this release

    Revert

Rolls back defineRouteKit, mapDomainErrors, and the $use MiddlewareDef union overload added in v0.52.1 (#10).

In practice, these helpers made route-level dependency injection typeable instead of removing it — and the DI pattern itself is the real source of the any ctx and GuardDef<any, any> noise reported in #9. The cleaner fix is the shared rpc package pattern (export s + shared guards from an internal package, import directly in domain packages) which removes the boilerplate without new API surface. See #9 for the pattern and rationale.

Breaking for v0.52.1 consumers only. If you adopted one of these in v0.52.1:

  • defineRouteKit<Ctx>() → inline the route in the package that owns the silgi() instance, or import s from a shared package.

  • mapDomainErrors(mapper) → keep as a userland wrapper; ~10 lines, not core.

  • $use(mw) with a GuardDef | WrapDef union → pass the concrete middleware; the union boundary was only needed for the factory pattern we're recommending against.

  • Revert: defineRouteKit, mapDomainErrors, $use union overload (#10)  -  by @productdevbook (ae33d)

    View changes on GitHub