Repository navigation
Closed
Milestone
Description
This plan tracks our work towards version 1.0.
We aim a release in the first half of 2026.
Plan Items
| Mark | Description |
|---|---|
| π | work in progress |
| β | blocked task |
| πͺ | stretch goal for this iteration |
Breaking changes
- Drop support for node 16 and 18 feat!: drop support for node 16 and 18Β #11382
- Remove all deprecated APIs Remove APIs marked as deprecated in v0.3.0Β #11603
- Drop support for old client libraries Drop support for un-maintained/deprecated driver librariesΒ #11692
-
redisolder than v5 (remove code handling older versions) feat(redis)!: remove support for legacy redis client versionsΒ #12057 - Remove old
sqlite3client and driver feat(sqlite)!: drop support for sqlite3 and default to better-sqlite3Β #11836 - Remove old
mysqlclient feat(mysql)!: drop support for mysql package and default to mysql2Β #11766 - Remove old Expo driver Remove old Expo driverΒ #11854
-
- MySQL: Disable legacy spatial support by default MySQL: legacy spatial support disabled by defaultΒ #12008
- MongoDB: Fix mongo types leaking feat(mongo)!: remove exported internal typesΒ #12037
- Rename
connectiontodataSourceinEntityManager,Repository,QueryBuilder,QueryRunneretc. Create deprecated alias for backwards-compatibility.Β #12082 - Change default for null/undefined handling in
FindOptionsfeat(invalid-where-values-behavior): make throw the defaultΒ #11710 - Replace
globwithtinyglobbyrefactor!: replace node-glob with tinyglobby, remove rimrafΒ #11699
Features
- Explicit resource management for
QueryRunnerfeat: support explicit resource management in QueryRunnerΒ #11701
Technical
- Replace
npmwithpnpmci: setup pnpmΒ #11881 - Upgrade to
prettierv3 chore: update prettier to v3Β #11702 - Replace
sha.jswith built-innode:cryptoand provide fallback for other platforms (needs fixing our own SHA1 hashing function) refactor: remove shajsΒ #11864 - Replace
uuidwith Crypto WebAPI and provider fallback for non-supported platforms (e.g. ReactNative) Drop dependencies in favour of native crypto functionalityΒ #11693
Documentation
- Multi-version documentation:
0.3.xreleases, development (masterbranch), and later for the1.xreleases (published and indexed from GitHub Actions) docs: add version dropdown (stable/dev) to masterΒ #11862
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
michaelbromley commentedon Mar 13, 2026
TypeORM v1.0.0 Migration β Executive Summary
Upgrade Path
0.3.211.0.0-nightly.20260313Results at a Glance
Breaking Changes Found
Compilation (9 categories)
Connectionclass removedcreateConnection()function removedconnection.close()removedconnection.isConnectedremoved"sqlite"driver type removed*ConnectionOptionstypes renamedBaseConnectionOptionsremovedQuery.parametersnow optionalSchemaBuilder.log()usersany)Runtime (3 issues)
DataSource.nameproperty removeddataSource.namegetsundefined@nestjs/typeormv11 incompatiblesetEntityValuemerge regressionrelationLoadStrategy: 'query'+ JOIN users (silent data loss)Recommended Migration Guide Sections
1. Rename
ConnectiontoDataSource(HIGH β everyone hits this)The
Connectionclass,createConnection(), and related APIs have been removed:This is the most common change. In our codebase it accounted for the majority of the 26+ compilation errors.
2. Replace
"sqlite"with"better-sqlite3"(MEDIUM β SQLite users)The
"sqlite"driver type (based on thesqlite3npm package) has been removed from theDatabaseTypeunion. Use"better-sqlite3"instead:3. Rename
*ConnectionOptionsto*DataSourceOptions(MEDIUM)All driver-specific options types have been renamed:
MysqlConnectionOptionsβMysqlDataSourceOptionsPostgresConnectionOptionsβPostgresDataSourceOptionsSqliteConnectionOptionsβBetterSqlite3DataSourceOptions4.
DataSource.nameremoved (LOW-MEDIUM β silent breakage)The top-level
nameproperty no longer exists onDataSource. Code readingdataSource.namewill getundefinedinstead of'default'. The name is still accessible viadataSource.options.name, but there is no implicit'default'fallback:This is a silent breakage β no compilation error, no runtime crash. Code that branches on the connection name (e.g. multi-tenancy setups, logging) will silently misbehave.
5.
Query.parametersis now optional (LOW)The
parametersfield on theQuerytype returned bySchemaBuilder.log()is now optional. Code accessingquery.parameterswithout a null check will need updating.Ecosystem Compatibility
@nestjs/typeormv11 β CRITICAL BLOCKER@nestjs/[email protected]is not compatible with TypeORM v1.0.0. It attempts to register the removedConnectionclass as a NestJS provider, causing a hard crash at application startup:This is the #1 blocker for TypeORM v1.0.0 adoption. NestJS is one of the largest TypeORM consumers, and every NestJS+TypeORM project will hit this on day one. A new version of
@nestjs/typeormthat drops theConnectionprovider is needed before v1.0.0 can be adopted.Workaround: Patch
@nestjs/typeorm'stypeorm-core.module.jsto guardConnectionregistration:setEntityValuemerge regression β HIGH (silent data loss)Commit
2d8c5158d(#11267) changedRelationMetadata.setEntityValue()to merge instead of replace when the target property already holds an object. However,OrmUtils.mergeDeepdelegates toOrmUtils.merge, which checksisPlainObject()β and entity class instances fail this check (theirconstructor !== Object). The merge is therefore a complete no-op for entity instances.What breaks: When using
relationLoadStrategy: 'query', TypeORM loads relations via separate queries after the main query. If the same relation was also populated by a JOIN in the main query (e.g. viainnerJoinAndSelect), the query-strategy-loaded entity (which includes eager sub-relations) should overwrite the JOIN-loaded one (which doesn't include eager sub-relations). In v1, the overwrite silently fails, and the stale, incomplete entity is kept.Impact: Any codebase that combines
innerJoinAndSelectwithrelationLoadStrategy: 'query'for the same relation may silently lose eager sub-relation data. This is particularly dangerous because it produces no errors β the relation appears to be loaded, but nested eager relations are missing.Workaround: Avoid combining
innerJoinAndSelectwithrelationLoadStrategy: 'query'for the same relation. Either:innerJoin(without Select) so the relation isn't hydrated by the JOIN, or'join'load strategy instead of'query'Suggested fix: The merge-vs-replace change in
setEntityValueshould be reverted or scoped more narrowly. The query strategy code path needs to replace the existing value, not merge into it. Options:2d8c5158dand find a more targeted fix for fix: prevent eager-loaded entities from overwriting manual relationsΒ #11267replaceflag tosetEntityValueand use it in the query strategy code pathOverall Assessment
The TypeORM v1.0.0 migration is straightforward for compilation fixes β all changes are mechanical renames that can be automated with find-and-replace or a codemod. After fixing compilation errors, 100% of e2e tests pass across all 3 database drivers (sqljs, PostgreSQL, MariaDB) with only two runtime workarounds needed.
Two issues require attention before v1.0.0 release:
@nestjs/typeormecosystem dependency β NestJS is one of the largest TypeORM consumers, and@nestjs/typeorm@11will crash with TypeORM v1.0.0. Coordinating a compatible release is essential for a smooth v1.0.0 launch.setEntityValuemerge regression (commit2d8c5158d) β The change to merge instead of replace is a no-op for entity class instances and breaksrelationLoadStrategy: 'query'when combined with JOINs. This causes silent data loss and should be reverted or scoped more narrowly before release.Neither issue is insurmountable. The compilation migration path is clean and well-defined, and the runtime behaviour is highly compatible. With these two issues addressed, TypeORM v1.0.0 should be a smooth upgrade for most codebases.