Skip to content

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Jun 20:03
· 113 commits to main since this release

Changes

  • break(kernel): 💥 Add integration extension points

Release details

Pull request notes

Summary

  • Adds a consumer middleware pipeline with built-in idempotency, correlation/causation and retry middleware.
  • Adds metadata-aware consumer execution context and AMQP transport metadata propagation.
  • Adds publisher hooks, domain-aware publish context and configurable post-publish hook error policy.
  • Separates generic MessageBus from domain-specific DomainMessageBus.
  • Extends ExpressKernelServer with external controllers, phase hooks, configurable middleware, controller DI integration, duplicate-run protection and an imperative HTTP pipeline registration API.
  • Adds routingControllersOptions passthrough for useExpressServer, including cors, defaultErrorHandler and routing-controllers middleware classes.
  • Resolves express and routing-controllers from the consumer application root so local file: installs do not accidentally use a nested package runtime.
  • Adds a shared HttpErrorHandler for Express/routing-controllers applications, covering malformed JSON, payload-too-large errors, custom app handlers, HTTP status errors, flattened validation errors and unhandled 500 responses.
  • Adds dependency injection overrides with useClass, useValue and useFactory, including support for unresolved references generated from external package imports.
  • Keeps the instance kernel active during dependency injection so the instance API and legacy static facade stay aligned.
  • Adds kernel.dependencyInjection({ containerBuild }) so applications can choose container generation explicitly, while keeping CONTAINER_BUILD=true as fallback.
  • Adds TypeScript moduleResolution: node support coverage.
  • Polishes the example app with constructor injection, consumer middleware registration, HTTP middleware/hooks/error handling, shutdown hooks and explicit DI build configuration.
  • Removes the README stability section now that this is intentionally a major-impact API change.
  • Raises coverage thresholds to 100% for statements, branches, functions and lines.
  • Adds Renovate dependency automation, a README dependency automation badge and compatible dependency updates.

Breaking changes

  • MessageBus in @haskou/ddd-kernel/contracts/pubsub is now a generic pub/sub contract. Domain-event buses should use DomainMessageBus from @haskou/ddd-kernel/domain.
  • Route/controller construction can now be delegated to the kernel DI container through ExpressKernelServer, which changes the recommended route wiring style to constructor injection.
  • The Express adapter now exposes explicit registration APIs for controllers, middleware, hooks and error handlers; applications should prefer those over ad-hoc local wrappers.

Documentation

Updated docs cover:

  • consumer middleware pipeline, metadata and idempotency store expectations
  • message bus publisher hooks and hook error policy
  • Express phase hooks, external controller registration, HTTP middleware registration, routingControllersOptions, optional cors peer usage and HttpErrorHandler
  • app-specific HTTP error mappings through HttpErrorHandler({ handlers })
  • scheduler error policy usage
  • dependency injection build configuration through kernel.dependencyInjection({ containerBuild })
  • dependency injection overrides for swapping adapters in tests/runtime bootstrap
  • external package contract overrides for generated node-dependency-injection references
  • TypeScript classic moduleResolution: node compatibility
  • Renovate dependency automation and README badges
  • README branch/release positioning without the old stability section

Validation

  • yarn format:check
  • yarn lint
  • yarn typecheck
  • yarn test
  • yarn test:coverage (100% statements, branches, functions and lines)
  • yarn docs:build
  • yarn --cwd example typecheck
  • yarn --cwd example build
  • NODE_ENV=development PORT=0 timeout 8 yarn --cwd example start