npm @nestjs/microservices 5.0.0
v5.0.0

latest releases: 10.3.8, 10.3.7, 10.3.6...
5 years ago

Features

  • core: support async lifecycle hooks (OnModuleInit and OnModuleDestroy) #569
  • core: HTTP server independence, fastify integration (FastifyAdapter)
  • core: allow binding global interceptors, filters, pipes, and guards from any module. Example:
{
  provide: APP_INTERCEPTOR,
  useClass: LoggerInterceptor,
}
  • core: @UseGuards(), @UsePipes(), @UseFilters(), and @UseInterceptors() extend metadata, instead of overriding existing one
  • core: dependency injection everywhere (pipes, filters, interceptors, and guards)
  • core: pass ArgumentsHost to exception filters (ability to access each argument)
  • core: pass enhanced ExecutionContext to both interceptors and guards (ability to access each argument and execution context)
  • microservices: rewrite existing transporters (TCP, Redis), provide new strategies: Nats, MQTT, gRPC
  • all: improve execution context performance (http, ws, microservices)

Bug Fixes

  • common: incorrent multer dependency #532
  • core: hanging NestApplicationContext process #503
  • microservices: concurrency issues (both TCP and Redis transporters) #505

Improvements

  • all: remove reflect-metadata peer dependency #563
  • all: upgrade RxJS to 6.0.0
  • all: move to Node.js >= 8.9.0 (TypeScript target es2017)
  • core: more descriptive exceptions (circular dependency) #493
  • core: Nest container compatible with useContainer() (class-validator and typeorm packages) #528
  • core: remove static dependencies (webpack compatibility)
  • websockets: @WebSocketGateway() takes options argument that is passed to socket.io instance #508

Deprecations

  • common: deprecate @Component(), @Middleware(), @Interceptor(), @Pipe(), and @Guard() decorators (use @Injectable() instead)
  • common: removed ExpressMiddleware (use MiddlewareFunction)
  • core: deprecate modules: [] property (use imports: [] instead)
  • core: deprecate components: [] property (use providers: [] instead)
  • core: removed MiddlewaresConsumer (use MiddlewareConsumer)

Notes

  • move from traditional express middleware model: each middleware is solely bounded to a particular path, regardless of the request method

Migration guide: https://docs.nestjs.com/migration-guide

Don't miss a new microservices release

NewReleases is sending notifications on new releases.