refactor: remove deprecated global APIs and ConnectionManager#12098
refactor: remove deprecated global APIs and ConnectionManager#12098michaelbromley merged 7 commits intomasterfrom
Conversation
Remove all deprecated convenience functions from globals.ts (createConnection, getConnection, getManager, getRepository, etc.) leaving only the non-deprecated getMetadataArgsStorage function.
Review Summary by QodoRemove deprecated global APIs and ConnectionManager
WalkthroughsDescription• Remove all deprecated global convenience functions from globals.ts • Remove deprecated ConnectionManager class and its tests • Update documentation to use DataSource methods instead • Document API removals in v1 migration guide Diagramflowchart LR
A["Deprecated Global APIs<br/>createConnection, getRepository, etc."] -->|removed| B["Use DataSource methods<br/>dataSource.getRepository()"]
C["ConnectionManager class"] -->|removed| D["Manage DataSource directly"]
E["Documentation updates"] -->|reflect| F["v1 migration guide"]
File Changes1. src/connection/ConnectionManager.ts
|
Deploying typeorm with
|
| Latest commit: |
97dcf67
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5f300df3.typeorm.pages.dev |
| Branch Preview URL: | https://remove-deprecated-globals.typeorm.pages.dev |
Code Review by Qodo
1. Invalid DataSource QB docs
|
Code Review by Qodo
1. Invalid createQueryBuilder docs
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
b9ef8a8 to
8de35b0
Compare
commit: |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Code Review by Qodo
1. Migration example wrong
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Code Review by Qodo
1. Migration docs omit removed globals
|
Code Review by Qodo
1. Docs still use globals
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Summary
globals.ts(createConnection,getConnection,getManager,getRepository,createQueryBuilder, etc.)ConnectionManagerclass and its testsdataSourcemethodsCloses #12075
BREAKING CHANGE
The following deprecated global functions have been removed:
createConnection,createConnections,getConnection,getConnectionManager,getConnectionOptions,getManager,getMongoManager,getSqljsManager,getRepository,getTreeRepository,getCustomRepository,getMongoRepository,createQueryBuilder. Use the equivalent methods on yourDataSourceinstance instead.The
ConnectionManagerclass has been removed. ManageDataSourceinstances directly.