Skip to content
Compare
Choose a tag to compare

v8.0.0

@kamilmysliwiec kamilmysliwiec released this
· 1543 commits to master since this release
8b9b0df
Compare
Choose a tag to compare

Features

  • common: refactor the built-in console logger class #6142 #5353, separate out Logger wrapper class and ConsoleLogger class, add buffering logs feature (buffer init logs and flush them out when a custom logger is assigned), add log level output #6172, support log levels feature nestjs/docs.nestjs.com#1613
  • common: add StreamableFile class for streaming files from controller routes (cross-platform) #5278
  • common: add ParseFloatPipe and ParseEnumPipe classes #6232
  • core: add lazy module loader class #6386
  • core: add RouterModule for defining per-module controller prefixes
  • core: add the ability to exclude certain routes from the global prefix #5291
  • core: API versioning feature #6278
  • microservices: support multiple event subscribers (@EventPattern() can be applied to multiple methods) #6334
  • microservices: support passing a property key to the @Payload() decorator #5975
  • websockets: support passing a property key to the @MessageBody() decorator
  • websockets: (WsAdapter) support registering gateways on different paths and let them share the same HTTP server #6321

Improvements

  • core: sort modules topologically when invoking lifecycle hooks #6236
  • core: use class references as providers/controllers/injectables keys instead of their names
  • #6141 fixes #5591 and #789
  • core: BaseExceptionFilter supports http-errors (and any other error objects that have the statusCode property specified) out of the box now cdd51b0
  • core: set Error.name property to the name of the class (all exceptions that inherit from the built-in HttpException) #5859

Bug fixes

  • common: add a missing type argument to mixin() function #6216
  • core: use router.all() method for routes annotated with the @All() decorator (instead of router.use()) #6237
  • core: reject on server bind failures (listen()) #3360
  • websockets: specify @nestjs/platform-socket.io as an optional peer dependency to support PnP mode #6217

Dependencies

  • microservices: update to use @grpc/grpc-js package (instead of grpc) #4806
  • microservices: upgrade NATS to v2 馃檶
  • platform-socket.io: upgrade Socket.io to v4 馃檶

Deprecations

  • common: deprecate HttpModule to remove hard dependency on the axios library. HttpModule is published as a new @nestjs/axios package now
  • core: deprecate the listenAsync() (use listen()) and startAllMicroservicesAsync() (use startAllMicroservices()) methods
  • microservices: deprecate the listenAsync() method (use listen() instead)