nest icon indicating copy to clipboard operation
nest copied to clipboard

chore(class-transformer): plainToClass is deprectated and replaced with plainToInstance

Open tomflorentin opened this issue 1 year ago • 3 comments
trafficstars

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [x] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Other... Please describe:

What is the current behavior?

Class transformer depreacted plainToClass and now recommend using plainToInstance. They are the same, just renamed. NestJS uses this deprecated method. Changing it will avoid future problems if class transformer delete it.

Issue Number: N/A

What is the new behavior?

The behaivoir of the code is the same, but

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

tomflorentin avatar May 29 '24 12:05 tomflorentin

Pull Request Test Coverage Report for Build 0e331174-8582-49e9-86b2-db20f61b1e40

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.124%

Totals Coverage Status
Change from base Build 94cfa8c0-2cff-488c-b4b7-6f54fde1b9de: 0.0%
Covered Lines: 6737
Relevant Lines: 7313

💛 - Coveralls

coveralls avatar May 29 '24 12:05 coveralls

up

tomflorentin avatar Jul 15 '24 12:07 tomflorentin

amazing !

BetsaraMarcellin avatar Aug 06 '24 14:08 BetsaraMarcellin