Skip to content

Rename connection to dataSource in EntityManager, Repository, QueryBuilder, QueryRunner etc. Create deprecated alias for backwards-compatibility. #12082

Closed

Description

@alumni

Rename connection to dataSource in EntityManager, Repository, QueryBuilder, QueryRunner, EntityMetadata, *Event etc.

Create deprecated getter for backwards-compatibility.

Step 1: Driver, QueryRunner
Step 2: EntityManager, QueryBuilder
Step 3: *Event
Step 4: *Metadata / other internals

Activity

  1. self-assigned this
    on Mar 4, 2026
  2. pkuczynski commented on Mar 12, 2026

    @pkuczynski
    Member

    I don't think we should crate deprecated getter. We are heading to release 1.0 which can have breaking changes. It's the time to do it now...

  3. added this to the 1.0 milestone on Mar 12, 2026
  4. alumni commented on Mar 12, 2026

    @alumni
    CollaboratorAuthor

    I don't think we should crate deprecated getter. We are heading to release 1.0 which can have breaking changes. It's the time to do it now...

    @pkuczynski lesson from ESLint 9/10: if the effort to upgrade is too high, people will migrate to alternatives (in eslint's case it was oxlint/biome).

    Also, TypeORM has not really followed semver, the first stable-quality version was 0.2, after which 0.3 was another stable-quality major release with a lot of changes. We've always seen them as rather 2.0 and 3.0. This upcoming release is just another major, and some minimal backwards-compatibility should be kept to avoid annoying users. This is why I wanted to be more careful with the PRs that we merged lately. ;)

  5. pkuczynski commented on Mar 12, 2026

    @pkuczynski
    Member

    This would be much less of an issue if we provide a codemod, which I was thinking to do anyway. And in this case is super easy change, so I don't think anybody would have a problem with this. And from 0.3 to 1.0 one can expect big changes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions