npm @nestjs/platform-node 12.6.3
v12.6.3

56 minutes ago

v12.6.3 (2026-11-26)

Notable changes

Testing

  • Test.createTestingModule() accepts the instrument option, like NestFactory.create(). Its instanceDecorator decorates the module's providers, overridden ones included, and the applications and microservices created from the module use it unless their own options set one. Tests can now run an app instrumented as it is in production. With NestJS Observe, for example, gateway tests no longer log that the instrument option is missing – #18743
  • Instances that an application context creates through resolve() (request-scoped and transient providers) are passed to the instrument instance decorator, in a testing module and in NestFactory.createApplicationContext() – #18743

Behaviour changes

  • Route conflict detection compares paths the way the router matches them. On Express, which matches paths in any case, GET /users and GET /Users are reported as the same route, so duplicate: 'error' aborts bootstrap. The same holds on Fastify with caseSensitive: false. Nothing changes where the router is case-sensitive: Fastify by default, the Node adapter, and Express with case sensitive routing enabled – #18721
  • A path excluded without a version, in MiddlewareConsumer.exclude() or in the exclude option of enableCsrfProtection(), also covers the routes of the default version(s), as forRoutes() does – #18601
  • @Body('key') with a falsy primitive body ("", 0, false) yields undefined, like any other primitive body. It used to receive the whole body – #18720
  • ParseDatePipe rejects a day past the end of its month in a numeric date without a year (2/30, 4/31; as in new Date(), such a date is in 2001, so 2/29 is rejected too), and in a year-first month-name date after a weekday (Thu 2024 Sept 31) – #18724, #18727
  • GrpcExceptionFilter logs an exception that isn't an RpcException before answering UNKNOWN, as BaseRpcExceptionFilter does. It used to answer without a trace on the server – #18722
  • Security headers: an undefined entry in referrerPolicy.policy is rejected like any other invalid value – #18729

Performance

  • The 404 that Nest throws for an unmatched route is created without a stack trace. Server CPU time per 404 drops by 28 to 29% on Express, Fastify and Node (21.9 µs to 15.5 µs on Express) – #18730

Fastify

  • httpAdapter.render() works on the raw response that middleware and their exception filters receive. It used to throw response.view is not a function – #18719
  • app.listen(port, host, backlog) passes the backlog to Fastify. It used to be passed as the callback – #18736
  • A StreamableFile sent with a 304 status is not read, and the 304 goes out without a body – #18723
  • A request aborted by the client mid-body becomes a 400 HttpException, instead of an unexpected error – #18726

WebSockets

  • Gateways whose path is spelled differently (events, /events/) share one server. The second one used to get its own server, which never received a client – #18728
  • With gateways that share a socket.io server, each disconnect is handled once, also when a handleDisconnect hook disconnects other clients – #18745

Features

Enhancements

Bug fixes

Committers: 7

Don't miss a new platform-node release

NewReleases is sending notifications on new releases.