Skip to content

fix: export RelationMetadata - #12789

Merged
alumni merged 1 commit into
typeorm:masterfrom
SchroederSteffen:export-RelationMetadata
Aug 26, 2026
Merged

alumni merged 1 commit into
typeorm:masterfrom
SchroederSteffen:export-RelationMetadata

Conversation

@SchroederSteffen

@SchroederSteffen SchroederSteffen commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Description of change

Add a root-level export of RelationMetadata to avoid having to use deep imports like:

import { RelationMetadata } from 'typeorm/metadata/RelationMetadata';

The deep import doesn't work anymore in TypeScript v6 (without --moduleResolution node):

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links a relevant issue using a closing keyword: N/A
  • There are new or updated tests validating the change (tests/**.test.ts): N/A, no tests for the public API surface
  • Documentation has been updated to reflect this change (docs/docs/**.md): N/A, no docs for the public API surface

Add an root-level export of `RelationMetadata` to avoid having to use deep imports like:
```ts
import { RelationMetadata } from 'typeorm/metadata/RelationMetadata';
```
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. RelationMetadata export undocumented 📘 Rule violation ⚙ Maintainability
Description
This PR adds a new root-level export for RelationMetadata, which is a user-facing public API/usage
change. No corresponding documentation or samples were updated to reflect the new recommended import
path.
Code

src/index.ts[106]

+export * from "./metadata/RelationMetadata"
Evidence
PR Compliance ID 2 requires docs updates for user-facing API/usage changes. The diff shows a new
public export (export * from "./metadata/RelationMetadata") added to the root index, but no
documentation changes accompany it in the provided PR diff.

Rule 2: Docs updated for user-facing changes
src/index.ts[106-106]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new root-level export (`RelationMetadata`) was added, but docs/samples were not updated to reflect the new recommended import path.

## Issue Context
The change is intended to avoid deep imports like `typeorm/metadata/RelationMetadata`, especially for TypeScript v6 users. To keep public API guidance accurate, documentation should mention (or demonstrate) importing `RelationMetadata` from the package root.

## Fix Focus Areas
- src/index.ts[106-106]
- docs/docs/data-source/4-data-source-api.md[80-93]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

  • Author self-review: I have reviewed the code review findings, and addressed the relevant ones.
Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@alumni
alumni merged commit 9694a4a into typeorm:master Aug 26, 2026
4 of 7 checks passed
@github-actions github-actions Bot added this to the 2.0.next milestone Aug 26, 2026
@SchroederSteffen
SchroederSteffen deleted the export-RelationMetadata branch September 14, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compliance violation needs-triage PR needs issue link triage

Development

Successfully merging this pull request may close these issues.

3 participants