Skip to content

fix: do not print bundle warnings into stdout#2525

Open
tatomyr wants to merge 2 commits intomainfrom
fix/change-bundle-visitor-producing-warining-in-stdout
Open

fix: do not print bundle warnings into stdout#2525
tatomyr wants to merge 2 commits intomainfrom
fix/change-bundle-visitor-producing-warining-in-stdout

Conversation

@tatomyr
Copy link
Collaborator

@tatomyr tatomyr commented Jan 30, 2026

What/Why/How?

Fixed an issue where schema name collision warnings appeared in bundle output when using stdout.

Reference

Addresses #661 (comment)

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: 657fd73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Patch
@redocly/cli Patch
@redocly/respect-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.67% (🎯 78%) 6128 / 7789
🔵 Statements 78.1% (🎯 78%) 6332 / 8107
🔵 Functions 82.18% (🎯 81%) 1246 / 1516
🔵 Branches 70.49% (🎯 70%) 4219 / 5985
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/bundle/bundle-visitor.ts 68.33% 63.28% 100% 68.33% 25, 29-37, 42-50, 57, 66, 74, 79-100, 157-169, 186-187, 200-201, 238
Generated in workflow #8445 for commit 657fd73 by the Vitest Coverage Report Action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.844s ± 0.041s ▓ 1.00x (Fastest)
cli-next 3.848s ± 0.029s ▓ 1.00x

@tatomyr tatomyr marked this pull request as ready for review January 30, 2026 12:52
@tatomyr tatomyr requested review from a team as code owners January 30, 2026 12:52
@tatomyr tatomyr self-assigned this Jan 30, 2026
@tatomyr tatomyr requested a review from RomanHotsiy January 30, 2026 12:53
if (!componentsGroup[name]) {
ctx.report({
message: `Two schemas are referenced with the same name but different content. Renamed ${prevName} to ${name}.`,
location: ctx.location,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some reason for changing the report?
No location is needed anymore ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even no report enymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original file names are absolutely correct, and we are right to rename components during bundling too. So it doesn’t look like a bundler problem to me.

The only thing is that it won't show a specific location anymore, but it will still produce the warning in Terminal with the component names, so it's not a big deal to figure it out.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants