Packages

@nestjs/common

12.5.1 · 16 Nov 2026MIT26M / weekRepositoryHomepagenpmAtom feed

Your version

8.0.0

major7 Jul 2021Where it was published

8.4.7 is the newest release of 8.x.

In short

3 deprecated17 new3 fixed3 internal

  • Deprecated

    common: deprecate HttpModule to remove hard dependency on the axios library. HttpModule is published as a new @nestjs/axios package now

  • Deprecated

    core: deprecate the listenAsync() (use listen()) and startAllMicroservicesAsync() (use startAllMicroservices()) methods

  • Deprecated

    microservices: deprecate the listenAsync() method (use listen() instead)

Security

1 advisory affects 8.0.0; 10.4.16 fixes them

Release note

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 #6349

  • 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

Deprecations

  • Deprecated

    common: deprecate HttpModule to remove hard dependency on the axios library. HttpModule is published as a new @nestjs/axios package now

  • Deprecated

    core: deprecate the listenAsync() (use listen()) and startAllMicroservicesAsync() (use startAllMicroservices()) methods

  • Deprecated

    microservices: deprecate the listenAsync() method (use listen() instead)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.