Skip to content

v4.0.0

Latest
Compare
Choose a tag to compare
@fabioformosa fabioformosa released this 03 Mar 22:31
· 16 commits to master since this release

v4.0.0

BREAKING CHANGE If you use the conversionService with typegoose, you have to import a new dependency and change the import from MetamorphosisNestModule

  npm install --save @fabio.formosa/metamorphosis-typegoose-plugin

and add plugin in MetamorphosisNestModule registration

    import { MetamorphosisNestModule } from '@fabio.formosa/metamorphosis-nest';
    import TypegoosePlugin from '@fabio.formosa/metamorphosis-typegoose-plugin/dist/typegoose-plugin';
    import { MetamorphosisPlugin } from '@fabio.formosa/metamorphosis';

    const typegoosePlugin = new TypegoosePlugin();

    @Module({
      imports: [MetamorphosisModule.register({logger: false, plugins: [typegoosePlugin])],
      ...
    }
    export class MyApp{
    }

v3.0.0

BREAKING CHANGE ConvertionService now returns always a Promise also if all converters are not async. So, you must add await before all conversionService calls.

from

const planet = conversionService.convert(planetDto, Planet);
  or
const carDtos: CarDto[] = this.convertionService.convertAll(cars, CarDto);

to

const planet = <Planet> await conversionService.convert(planetDto, Planet);
  or
const carDtos = <CarDto[]> await this.convertionService.convertAll(cars, CarDto);