Skip to content

Releases: nestjs/nest

v5.0.1

26 May 10:43
Compare
Choose a tag to compare

Bug Fixes

  • common: add missing forbidUnknownValues property (ValidationPipe) #706
  • core: support circular structures in the dynamic module #678
  • core: global prefix and middleware incompatibility #718
  • core: exceptions are not handled in cascade way #729
  • core: validate route path passed in forRoutes() #692
  • websockets: @WebSocketGateway and @SubscribeMessage do not properly handle errors #683
  • testing: fix misssing logger

v5.0.0

13 May 09:11
Compare
Choose a tag to compare

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

v5.0.0-beta.4

28 Apr 13:27
Compare
Choose a tag to compare

5.0.0-beta.4

Bug Fixes

  • core: param pipes aren't working correctly #592
  • microservices: unnecessary modules required #594

Improvements

  • all: upgrade RxJS version (v6.0.0)

v5.0.0-beta.3

22 Apr 10:13
Compare
Choose a tag to compare

5.0.0-beta.3

Bug Fixes

  • core: incorrect ExpressAdapter method wrappers #585
  • core: the fastify-formbody is no longer a required dependency #575
  • core: incorrect createApplication() typings (unable to pass express instance directly) #575

v5.0.0-beta.0

22 Apr 10:13
Compare
Choose a tag to compare

5.0.0-beta.0

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: improve existing transporters (TCP, Redis), provide new strategies: Nats, MQTT, gRPC

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 (make use of pipeable operators)
  • 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)
  • core: deprecate modules: [] property (use imports: [] instead)
  • core: deprecate components: [] property (use providers: [] instead)

Notes

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

v4.6.6

11 Mar 12:52
Compare
Choose a tag to compare

Bug Fixes:

  • common: File(s)Interceptor throws http status code 500 #465
  • core: e2e testing, EXPRESS_REF injector issue #484
  • microservices: NO_PATTERN_MESSAGE bugfix #491

Improvements:

  • common: class-transformer update #483
  • common: HttpService improvements, remove duplicated axios interfaces #470
  • core: far more meaningful exception when not available component is exported (module inconsistency) #479

v4.6.5

01 Mar 21:37
Compare
Choose a tag to compare

Bug Fixes

  • common: File(s)Interceptor does not populate thrown exception #437
  • core: NestFactory.create() returns any
  • core: use ApplicationConfig within ExternalContextCreator #434

Improvements

  • common: HttpException extends Error
  • core: make cors middleware customizable (enableCors(), { cors }) #457
  • microservices: RpcException extends Error
  • websockets: WsException extends Error

v4.6.4

18 Feb 21:55
Compare
Choose a tag to compare

Bug Fixes

  • common: logger overrides custom logger scope #435
  • common: FileInterceptor supports only one options at once #429
  • common: support symbol as a token (NestApplicationContext)
  • core: fix exception handler (exceception thrown in the done() callback) #431
  • core: incorrect HTTP response on SyntaxError #430
  • microservices: can't select/get from context when using NestFactory.createMicroservice #398

v4.6.1

16 Feb 10:21
Compare
Choose a tag to compare

Features

  • common: ValidationPipe improvements #383
  • common: ParseIntPipe improvements #385
  • common: add FileInterceptor, FilesInterceptor, @UploadedFile() and @UploadedFiles() (multer integration)
  • common: add HttpModule that exposes HttpService (axios integration)
  • core: add app.disable() and app.enable() wrappers around express app
  • core: add ability to inject express reference (EXPRESS_REF token)
  • core: enable possibility to extend metadata (inheritance support) #228
  • core: NestFactory.create() now accepts third argument HttpsOptions
  • core: add app.enableCors() to INestApplication (cors integration)
  • core: add @Render() decorator (MVC applications)
  • core: provide Logger.overrideLogger() #247
  • core: [feature] add appOptions property to create[..] methods of NestFactory
  • microservices: add listenAsync() to INestMicroservice instance

Bugfixes

  • core: simplify HTTPS protocol usage
  • core: custom transport strategy - thrown exceptions issue #290
  • core: injector fails silently #287
  • core: secure websockets (wss://) #384
  • core: can't select/get from context when using NestFactory.createMicroservice() #398
  • core: interceptor $stream observable returns another observable instead of the response object #376
  • core: Observable.throw from controller results in unhandled rejection promise #373

Improvements

  • common: create ModuleMetadata interface
  • core: majority of methods (INestApplication, INestMicroservice, and INestApplicationContext) return this instead of void
  • core: remove static dependencies & relationships inside NestFactory