Releases: nestjs/nest
Releases · nestjs/nest
v8.0.0
Features
- common: refactor the built-in console logger class #6142 #5353, separate out
Logger
wrapper class andConsoleLogger
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
andParseEnumPipe
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
supportshttp-errors
(and any other error objects that have thestatusCode
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-inHttpException
) #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 ofrouter.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 ofgrpc
) #4806 - microservices: upgrade NATS to v2 🙌
- platform-socket.io: upgrade Socket.io to v4 🙌
Deprecations
- common: deprecate
HttpModule
to remove hard dependency on theaxios
library.HttpModule
is published as a new@nestjs/axios
package now - core: deprecate the
listenAsync()
(uselisten()
) andstartAllMicroservicesAsync()
(usestartAllMicroservices()
) methods - microservices: deprecate the
listenAsync()
method (uselisten()
instead)
v7.5.0
Features
- common: support conditional cache TTL value (support async factories) #5366
- core: add Server-Sent Events (SSE) support #4842
- core: add
abortOnError
option. When enabled, Nest will rethrow the exception instead of killing the process #5327 - microservices: pass
GrpcCall
reference to call handlers #5143
Improvements
- microservices: update Kafka configuration interfaces, add missing options #5443 #5634 #5638
- microservices: add
persistent
option #5597 and supporturls
object #5609 (RabbitMQ)
Bug fixes
- common:
expectedType
should take precedence overmetatype
in theValidationPipe
#5605 - core: use
.toString()
as functions representation when serialising dynamic modules metadata #5189 - core: fix invalid middleware execution order when request-scoped dependencies are being used by a host middleware #5623
- microservices: await consumer and producer disconnect operations #5422
- microservices: check
replyTo
channel presence (NATS) #5530 - platform-fastify: add missing chaining API to the
inject()
method #5628
v7.4.0
v7.3.0
Features
- core: add the
introspect()
method toModuleRef
andNestApplicationContext
classes - core: add the
registerRequestByContextId()
method toModuleRef
andNestApplicationContext
classes
Improvements
- core: user
InstanceLinksHost
to speed-upget()
andresolve()
methods
v7.1.0
v7.0.0
Features
- common: automatically transform primitives (number, bool) with
ValidationPipe
#4110 - common add
ParseArrayPipe
andParseBoolPipe
#4113 - core: exclude middleware by path #3042
- core: pass
ExecutionContext
to custom decorators #3070
Improvements
- core: make built-in exceptions serializable #3053
- core: standardize http exception schema #4045
- microservices: introduce more descriptive microservices channels #3040
- microservices: more lighweight packets (request/response) #3071
Other
- common: remove deprecated
@ReflectMetadata
decorator - graphql: built-in code-first support + CLI plugin nestjs/graphql#634
BREAKING CHANGES
Read more here https://docs.nestjs.com/migration-guide
v6.11.0
Features
- all: add
tslib
#3748 - common: strongly type custom decorators (
createParamDecorator
) #3356 - common: add static
KEY
property to decorators created through@SetMetadata()
- common: add request cancelation (axios +
HttpModule
) #3777 - core: add hostname matching (HTTP) #2980
- microservices: support multiple gRPC packages at once #3418
- platform: add description to the
listen
method #3786
Bug Fixes
- core: run lifecycle hooks for middleware and injectables #3870
- platform: add application's global prefix to error handlers and global middlewares #3656
- deps: update to
[email protected]
#3765
v6.10.0
v6.9.0
Features
- common: add class-transformer
excludeExtraneousValues
flag #3278 - common: add
applyDecorators
function #3113 - common: add
CacheTTL()
decorator #2943 - core: add
@Ip()
decorator #3249 - core: add
getUrl()
method #3147 - microservices/websockets: support
createParamDecorator
(custom decorators)