npm / typeorm
typeorm
What changed in typeorm 0.3 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
3 breaking2 security3 new APIs and options2 performance24 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittypeorm 133 changes
Breaking changes 3
The inverse foreign key defaults to CASCADE.
Invalid where values now default to throwing on the write path.
Rejects empty where criteria for update and delete operations.
Security 1
TypeORM: migration:generate template-literal code injection
New APIs and options 3
DateUtils is exported from the package entry point.
RelationMetadata is exported for package consumers.
Adds support for distinct count.
Performance 2
sqljs measures query execution time after the statement runs.
Avoids quadratic grouping when raw results are selected without primary keys.
Fixes and other changes 24
Reads closure-table primary values through column metadata.
Releases all query runners before closing the pool.
Prevents composite primary key collisions during hydration.
Prevents connection leaks during initialization.
Handles schema and table names correctly in generated columns in the metadata table.
Compares spatial columns against their default feature type and SRID for Postgres and CockroachDB.
Keeps the STI discriminator index on entities with embeddeds.
Child joins are nested only when outer join semantics require it.
Postgres reads coord_dimension when loading spatial columns.
Returns undefined when the requested path is missing.
Function defaults are evaluated before enum or string normalization.
Metadata access is guarded for raw-table upserts.
Relation values for join columns inside embedded entities are resolved correctly.
Junction rows are kept when the relation is not loaded.
better-sqlite3 awaits query event subscribers and reports failed queries.
Query runners created by clear and getFromCache are released.
Versions of unequal length are compared correctly.
Fixes normalization of FindOptionsWhere criteria containing arrays and Buffers.
Validates where criteria in increment and decrement operations.
Correctly wraps inner joins nested under left joins.
Fixes multiple problems with recursive common table expressions.
Columns marked select false are preserved on the in-memory entity after save().
Releases the query runner when an error occurs while storing a query result in the cache.
Improves normalizeDatetimeFunction handling for the PostgreSQL tstzrange data type.
typeorm 0.31 changes
Security 1
TypeORM: SQL Injection in UpdateQueryBuilder/SoftDeleteQueryBuilder orderBy (MySQL/MariaDB)