---
title: "@nestjs/typeorm 12.0.3 Breaking Changes on npm | Since.dev"
description: "What each @nestjs/typeorm release removed, renamed or changed: 21 breaking changes in 7 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@nestjs/typeorm
last_updated: 2026-12-04
---

# @nestjs/typeorm breaking changes

@nestjs/typeorm 12.0.3 (November 6, 2026) is its newest release with breaking changes, 10 of them. The first: Signature changed getDataSourceName. Every breaking API change we have recorded in @nestjs/typeorm on npm: 21 breaking changes in 7 versions. Below, its 7 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `12.0.3`, released November 6, 2026. [Source repository](https://github.com/nestjs/typeorm)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [11.0.2](#v-11-0-2) to [12.0.3](#v-12-0-3): 15 breaking changes in 3 versions.
- From [10.0.1](#v-10-0-1) to [12.0.3](#v-12-0-3): 20 breaking changes in 6 versions.

## @nestjs/typeorm 12.0.3 breaking changes

@nestjs/typeorm 12.0.3, released November 6, 2026: 10 breaking changes.

- **Signature changed** `getDataSourceName`  

Was function getDataSourceName(options: {name?: string;}): string; now function getDataSourceName(dataSource?: DataSourceRef | {name?: string;}): string. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `getDataSourcePrefix`  

Was function getDataSourcePrefix(dataSource?: DataSource | DataSourceOptions | string): string; now function getDataSourcePrefix(dataSource?: DataSourceRef): string. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `getDataSourceToken`  

Was function getDataSourceToken(dataSource?: DataSource | DataSourceOptions | string): string | Function | Type\<DataSource>; now function getDataSourceToken(dataSource?: DataSourceRef): string | Function | Type\<DataSource>. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `getEntityManagerToken`  

Was function getEntityManagerToken(dataSource?: DataSource | DataSourceOptions | string): string | Function; now function getEntityManagerToken(dataSource?: DataSourceRef): string | Function. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `getRepositoryToken`  

Was function getRepositoryToken(entity: EntityClassOrSchema, dataSource?: DataSource | DataSourceOptions | string): Function | string; now function getRepositoryToken(entity: EntityClassOrSchema, dataSource?: DataSourceRef): Function |... [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `InjectConnection`  

Was const InjectConnection: (dataSource?: DataSource | DataSourceOptions | string) => ReturnType\<typeof Inject>; now const InjectConnection: (dataSource?: DataSourceRef) => ReturnType\<typeof Inject>. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `InjectDataSource`  

Was const InjectDataSource: (dataSource?: DataSource | DataSourceOptions | string) => ReturnType\<typeof Inject>; now const InjectDataSource: (dataSource?: DataSourceRef) => ReturnType\<typeof Inject>. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `InjectEntityManager`  

Was const InjectEntityManager: (dataSource?: DataSource | DataSourceOptions | string) => ReturnType\<typeof Inject>; now const InjectEntityManager: (dataSource?: DataSourceRef) => ReturnType\<typeof Inject>. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `InjectRepository`  

Was const InjectRepository: (entity: EntityClassOrSchema, dataSource?: string) => ReturnType\<typeof Inject>; now const InjectRepository: (entity: EntityClassOrSchema, dataSource?: DataSourceRef) => ReturnType\<typeof Inject>. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)
- **Signature changed** `TypeOrmModule.forFeature`  

Was static forFeature(entities?: EntityClassOrSchema\[\], dataSource?: DataSource | DataSourceOptions | string): DynamicModule; now static forFeature(entities?: EntityClassOrSchema\[\], dataSource?: DataSourceRef): DynamicModule. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/12.0.3)

## @nestjs/typeorm 12.0.2 breaking changes

@nestjs/typeorm 12.0.2, released September 28, 2026: 1 breaking change.

- **Behavior changed** `getRepositoryToken`  

getRepositoryToken now throws for an EntitySchema that lacks both a target and a name. Code that relied on such schemas being accepted must provide a target or name. [github.com](https://github.com/nestjs/typeorm/releases/tag/12.0.2)

## @nestjs/typeorm 12.0.0 breaking changes

@nestjs/typeorm 12.0.0, released August 27, 2026: 4 breaking changes.

- **Removed**  

Imports that reach into the package's build internals will fail. Import everything from the package root. [github.com](https://github.com/nestjs/typeorm/releases/tag/12.0.0)
- **Removed**  

The root index.js and index.d.ts shim files no longer exist. Code that loads those files directly must import from the package root instead. [github.com](https://github.com/nestjs/typeorm/releases/tag/12.0.0)
- **Behavior changed**  

The package is published as a native ES module with an exports map. Code that relies on the CommonJS build may need to switch to ESM imports or use require(esm) on a supported Node.js version. [github.com](https://github.com/nestjs/typeorm/releases/tag/12.0.0)
- **Behavior changed**  

The package now requires Node.js 20.19.0 or later. Users on older Node.js versions must upgrade before installing this release. [github.com](https://github.com/nestjs/typeorm/releases/tag/12.0.0)

## @nestjs/typeorm 11.0.2 breaking changes

@nestjs/typeorm 11.0.2, released June 16, 2026: 1 breaking change.

- **Signature changed** `TypeOrmModule.forRoot`  

Was static forRoot(options?: TypeOrmModuleOptions): DynamicModule; now static forRoot(options?: TypeOrmModuleOptions, name?: string): DynamicModule. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/11.0.2)

## @nestjs/typeorm 11.0.1 breaking changes

@nestjs/typeorm 11.0.1, released April 3, 2026: 2 breaking changes.

- **Signature changed** `getDataSourceName`  

Was function getDataSourceName(options: DataSourceOptions): string; now function getDataSourceName(options: {name?: string;}): string. [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/11.0.1)
- **Signature changed** `TypeOrmModuleOptions`  

Was type TypeOrmModuleOptions = {retryAttempts?: number; retryDelay?: number; toRetry?: (err: any) => boolean; autoLoadEntities?: boolean; verboseRetryLog?: boolean; manualInitialization?: boolean;} & Partial\<DataSourceOptions>; now type... [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/11.0.1)

## @nestjs/typeorm 11.0.0 breaking changes

@nestjs/typeorm 11.0.0, released January 17, 2025: 2 breaking changes.

- **Removed** `keepConnectionAlive`  

The deprecated keepConnectionAlive option was removed in this release. Code that passes it should stop doing so. [github.com](https://github.com/nestjs/typeorm/releases/tag/11.0.0)
- **Signature changed** `TypeOrmModuleOptions`  

Was type TypeOrmModuleOptions = {retryAttempts?: number; retryDelay?: number; toRetry?: (err: any) => boolean; autoLoadEntities?: boolean; keepConnectionAlive?: boolean; verboseRetryLog?: boolean; manualInitialization?: boolean;} &... [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/11.0.0)

## Older versions

1 older version.

### @nestjs/typeorm 10.0.1 breaking changes

@nestjs/typeorm 10.0.1, released November 15, 2023: 1 breaking change.

- **Signature changed** `TypeOrmModuleOptions`  

Was type TypeOrmModuleOptions = {retryAttempts?: number; retryDelay?: number; toRetry?: (err: any) => boolean; autoLoadEntities?: boolean; keepConnectionAlive?: boolean; verboseRetryLog?: boolean;} & Partial\<DataSourceOptions>; now type... [npmjs.com](https://www.npmjs.com/package/@nestjs/typeorm/v/10.0.1)

## Related packages

- [@nestjs/cli](https://since.dev/packages/npm/@nestjs/cli.md)
- [@nestjs/common](https://since.dev/packages/npm/@nestjs/common.md)
- [@nestjs/config](https://since.dev/packages/npm/@nestjs/config.md)
- [@nestjs/core](https://since.dev/packages/npm/@nestjs/core.md)
- [@nestjs/jwt](https://since.dev/packages/npm/@nestjs/jwt.md)
- [@nestjs/mapped-types](https://since.dev/packages/npm/@nestjs/mapped-types.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
