Modernize NestJS from 7.4.2 to 10.4.19 and TypeORM from 0.2.25 to 0.3.20#8
Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
Open
Conversation
…to 0.3.20 - Upgrade all @nestjs/* packages to 10.4.19 (latest stable v10.x) - Update TypeORM to 0.3.20 with new repository patterns - Replace deprecated @entityrepository with @InjectRepository pattern - Update security dependencies: bcrypt, helmet, @nestjs/jwt, passport-jwt - Migrate typeorm-transactional-cls-hooked to typeorm-transactional - Update HttpModule imports to @nestjs/axios - Fix Transform decorator for class-transformer updates - Update TypeORM configuration for DataSource pattern - Centralize ORM config in src/utils/ormconfig.ts - Update migration CLI commands for TypeORM 0.3.x - Add TypeScript compiler options for compatibility - Update all service constructors to use Repository<Entity> pattern Breaking changes addressed: - EntityRepository decorator removal - TypeORM CLI command changes - Security middleware API updates - Module configuration updates for NestJS 10.x Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernize NestJS from 7.4.2 to 10.4.19 and TypeORM from 0.2.25 to 0.3.20
Summary
This PR modernizes the banking application's core dependencies from legacy versions to latest stable releases, addressing security vulnerabilities and enabling access to modern framework features. The upgrade spans multiple breaking changes requiring systematic migration of repository patterns, security middleware, and module configurations.
Key Changes:
Review & Testing Checklist for Human
yarn migration:runandyarn migration:generateto ensure TypeORM CLI changes work properlyRecommended Test Plan:
Diagram
%%{ init : { "theme" : "default" }}%% graph TB subgraph "Core Dependencies" PJ["package.json<br/>Major version bumps"]:::major-edit YL["yarn.lock<br/>Dependency resolution"]:::minor-edit TS["tsconfig.json<br/>Compiler options"]:::minor-edit end subgraph "TypeORM Migration" ORM["src/utils/ormconfig.ts<br/>DataSource pattern"]:::major-edit APP["src/modules/app/index.ts<br/>TypeORM config"]:::major-edit end subgraph "Service Layer" US["src/modules/user/services/<br/>Repository injection"]:::major-edit TS_SVC["src/modules/transaction/services/<br/>Repository injection"]:::major-edit BS["src/modules/bill/services/<br/>Repository injection"]:::major-edit MS["src/modules/message/services/<br/>Repository injection"]:::major-edit end subgraph "Security & Auth" MAIN["src/main.ts<br/>Helmet & rate limiting"]:::major-edit JWT["src/modules/auth/strategies/<br/>JWT strategy"]:::context end PJ --> ORM ORM --> US ORM --> TS_SVC ORM --> BS ORM --> MS MAIN --> JWT subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
Migration Strategy Used:
@EntityRepository→@InjectRepository(Entity)patternRepository<Entity>instead of custom repository classesforwardRef()Potential Breaking Changes:
Testing Limitations:
Session Info: