-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Purpose
Implement a drop-in replacement for @nestjs/common's ClassSerializerInterceptor that uses om-data-mapper instead of class-transformer for object serialization.
Benefits
- 17.28x faster serialization performance compared to class-transformer
- Zero-config drop-in replacement for existing NestJS applications
- Full compatibility with existing
@Expose,@Exclude,@Type, and@Transformdecorators - Leverages existing class-transformer compatibility layer in
src/compat/class-transformer/
Scope
- Create new directory:
src/integrations/nestjs/ - Implement
ClassSerializerInterceptoras a thin wrapper over existingclassToPlainfunction - Support all NestJS serialization options and decorators
- Ensure tree-shaking works correctly (NestJS code should not be bundled if not used)
- Add comprehensive tests
- Update documentation with migration guide and usage examples
API Compatibility
Should work as a drop-in replacement - users only need to change the import path:
- FROM:
import { ClassSerializerInterceptor } from '@nestjs/common'; - TO:
import { ClassSerializerInterceptor } from 'om-data-mapper/nestjs';
References
- NestJS Serialization Documentation: https://docs.nestjs.com/techniques/serialization
- Existing class-transformer compatibility layer:
src/compat/class-transformer/
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request