Ts.ED v6.0.0-beta.1 Release Notes

Release Date: 2020-09-28 // over 3 years ago
  • 6.0.0-beta.1 (2020-09-28)

    ๐Ÿ› Bug Fixes

    • common: Fix @useafter and @UseBefore decorators when it was used twice or more on the same class or method (3bd0d32)
    • common: Fix some issues on Platform API (c6348f3)
    • common: Fix typescript issue (db9f93b)
    • common: Refactoring exceptions handlers (dc95357)
    • common: Remove default application/json acceptMimes options (e96d167)
    • common,express,koa: Fix handlers management (4a98feb)
    • koa: fix koa statics middleware (904eb42)
    • swagger: Fix swagger doc rendering (d2188a4)
    • Compilation issues (9ec1d92)
    • ๐Ÿ›  Fix typescript compilation issue (0799255)
    • mongoose,swagger: Fix typings issues (74af7b4)
    • schema,common: Fix issue on @example decorator (aa4fce1)
    • swagger: Remove decorators and refactoring @tsed/swagger module (bb271a6)

    chore

    • common: Refactoring Metadata to use @tsed/schema (a84cd23)
    • common: Remove EndpointMetadata.contentType method (4417db1)
    • common: Remove ExpressRouter, ParseService and RouterService (400d37a)
    • common: Remove Filter features (1de2d72)
    • common: Remove ServerLoader, ExpressApplication, ServerSetting, etc... (c4adf2b)
    • common: Remove ValidationService (20d2a3c)
    • common: Rename ServerSettingsService by PlatformConfiguration (daf137b)
    • common: Update deprecated message (7203f6c)
    • common: Use @tsed/json-mapper (2355e8f)
    • common,di: Remove minor deprecated options or methods (087e5d5)
    • di: Remove aroundInvoke method (c082d01)
    • di,common: Remove OverrideService, OverrideMiddleware and MiddlewareError decorators (b813248)
    • di,common: Remove unused interfaces. (6a91d9b)
    • mongoose: Remove IMDBOptions interface. (cbc9981)
    • multer: Remove @tsed/multipartfiles packages (69afcd8)
    • typeorm: Remove @entityrepository decorator (3e46980)
    • ๐Ÿ”€ Move decorators CaseSensitive, MergeParams, RouterSettings, Strict to @tsed/platform-express (cb47d00)
    • ๐Ÿš€ Prepare alpha, beta, rc release channel (81df462)
    • ๐Ÿ”จ Refactoring PlatformHandler, PlatformContext, (9ee8fb8)
    • โœ‚ Remove @tsed/testing and ts-express-decorators (50ed981)
    • โœ‚ Remove RequestContext class (dd9fe5d)
    • โœ‚ Remove ServeStaticService class (737b191)
    • โœ‚ Remove unused IErrorSettings interface. (5ccb8d6)
    • typeorm: Remove TypeORMService.instances getter (66936bb)

    ๐Ÿ”‹ Features

    • common: Add a way to inject Node/Framework/Platform request or response in endpoint method. (61b30e5)
    • common: Add ErrorFilter and ExceptionFilter to catch errors and send json response (b20f484)
    • common: Add getReq, getRes, getApp on PlatformContext (0caeded)
    • common: Add PlatformViews class to manage views (3ec66e2)
    • common: Manage 404 resource node found with ExceptionFilter instead of let express managing it (d34da0a)
    • common: Multer is now embed in the @tsed/common (1cb4823)
    • common: Refactoring platform architecture. (528b819)
    • core: Add proxyDelegation function to create a Trap with a class (e5bb662)
    • koa: Add @tsed/platform-koa (7a6db5d)

    ๐Ÿ’ฅ BREAKING CHANGES

    • typeorm: EntityRepository have been removed. Use EntityRepository from typeorm directly.
    • common: Remove @ResponseView decorator. Use @view instead.
    • common: If you use UseBefore or UseAfter as following:

      class MyController { @UseBefore(Middleware1) @UseBefore(Middleware2)test(){}}

    You have to inverse the middlewares:

    class MyController { @UseBefore(Middleware2) @UseBefore(Middleware1)test(){}}
    

    The calls order was wrong in v5. v6 fix this problem.

    • multer: @tsed/multipartfiles have been removed. Use @MultipartFile decorator from @tsed/common

    - common: EndpointMetadata.contentType has been removed.

    • OnRequest and OnResponse interface signature have changed

      • โœ‚ Remove PlatformContextMiddleware

    ๐Ÿ”จ chore: Refactoring PlatformContext and

    • ๐Ÿ‘‰ Use PlatformContext instead of RequestContext
    • di,common: - IServerMountDirectories have been removed.

    • ๐Ÿšš ILoggerSettings have been removed.

    • ๐Ÿ‘€ IResponseError have been removed.

    • ๐Ÿšš IHook have been removed.

    • ๐Ÿšš IInterceptorNextHandler have been removed.

    • ๐Ÿšš IInterceptorContext have been removed.

    • ๐Ÿšš IInterceptor have been removed.

    • common: ServerSettingsService have been renamed by PlatformConfiguration

    • ๐Ÿ”€ Decorators CaseSensitive, MergeParams, RouterSettings, Strict must be imported from @tsed/platform-express instead of @tsed/common.

    - ๐Ÿšš ServeStaticService have been removed. PlatformApplication.statics() method instead.

    • remove unused server.errors options.

      • common: - LogIncomingRequest is replaced by PlatformLogMiddleware
      • ๐Ÿšš GlobalErrorHandlerMiddleware have been removed.
      • di: - Remove deprecated aroundInvoke method. Use intercept to create your interceptor.
      • common: - OnServerReady hook has been removed. No replacement available
      • ๐Ÿšš ExpressApplication has been removed. Use PlatformApplication.callback() or PlatformApplication.raw instead of.
      • ๐Ÿšš IServerSettings interface has been removed. Use IDIConfiguration instead of.
      • ๐Ÿ”ง ServerSettings decorator has been removed. Use Configuration decorator instead of.
      • ๐Ÿšš ServerLoader class has been removed. Use Platform API instead of to bootstrap your application.
      • ๐Ÿšš $onMountingMiddlewares has been removed. Use $beforeRoutesInit hook instead of.
      • common: - ExpressRouter class has been removed in favor of PlatformRouter class.
      • ๐Ÿšš RouteService service has been removed in favor of Platform
      • ๐Ÿšš ParseService has been removed. Use getValue or lodash library
      • โœ‚ Remove MvcModule.
      • common: ValidationService has been removed. Override ValidationPipe to change the Validation behavior
      • typeorm: TypeORMService.instances getter has been removed. Use TypeORMService.connectionManager or
        getConnectionManager from TypeORM itself.
      • mongoose: Use new mongoose options based on MDBConnection
      • common,di: - Store.decorate has been removed. Use StoreFn instead of.
      • โœ‚ Remove HandlerMetadata.methodClassName and HandlerMetadata.method
      • ๐Ÿšš req.log has been removed. Use req.ctx.logger instead of.
      • โœ‚ Remove unused interface on HttpServer and HttpsServer
      • ๐Ÿšš ControllerOptions.dependencies option has been removed. Use ControllerOptions.children instead of.
      • โœ‚ Remove ProviderStorable (not used)
      • di,common: - OverrideService decorator has been removed. Use OverrideProvider decorator instead of.
      • ๐Ÿšš OverrideMiddleware decorator has been removed. Use OverrideProvider decorator instead of.
      • ๐Ÿšš MiddlewareError decorator has been removed. Use Middleware decorator instead of.
      • common: Use Pipe feature instead of
      • schema,common: Example accept multiple parameters and create an array examples.
      • swagger: Use @tsed/schema and his decorators to generate your swagger API documentation.
      • ๐Ÿšš @BaseParameter have been removed. No replacement.
      • ๐Ÿ‘‰ Use @Consumes from @tsed/schema
      • ๐Ÿ—„ Use @deprecated from @tsed/schema
      • ๐Ÿ‘‰ Use @description from @tsed/schema
      • ๐Ÿ‘‰ Use @example from @tsed/schema
      • ๐Ÿ‘‰ Use @name from @tsed/schema
      • ๐Ÿ‘‰ Use @operation
      • ๐Ÿ‘‰ Use @produces from @tsed/schema
      • ๐Ÿ‘‰ Use @Responses
      • ๐Ÿ‘‰ Use @returns from @tsed/schema
      • ๐Ÿšš @ReturnsArray have been removed. Use @returns from @tsed/schema.
      • ๐Ÿ”’ Use @Security from @tsed/schema
      • ๐Ÿ‘‰ Use @Summary from @tsed/schema
      • ๐Ÿ‘‰ Use @title from @tsed/schema
      • common: Use @tsed/json-mapper and @JsonMapper decorator to declare a new mapper type
      • common: Use @tsed/schema to describe your models.
      • โœ‚ Remove @tsed/testing and ts-express-decorators packages
      • V6 preparation