Skip to content

Conversation

@aim4ik11
Copy link

@aim4ik11 aim4ik11 commented Dec 3, 2025

What/Why/How?

Currently extends property parser in config accepts not existing refs which causes builder to attempt to resolve those and throw hard error which could be hard to debug for user. I suggest adding more descriptive error message so that builder displays it

Reference

Issue

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

@aim4ik11 aim4ik11 self-assigned this Dec 3, 2025
@aim4ik11 aim4ik11 requested a review from a team as a code owner December 3, 2025 10:28
@changeset-bot
Copy link

changeset-bot bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: e17ae00

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Command Mean [s] Min [s] Max [s] Relative
redocly lint resources/rebilly.yaml 1.441 ± 0.019 1.407 1.472 1.00
redocly-next lint resources/rebilly.yaml 1.457 ± 0.038 1.404 1.537 1.01 ± 0.03

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.4% (🎯 78%) 6193 / 7899
🔵 Statements 77.8% (🎯 78%) 6399 / 8224
🔵 Functions 81.83% (🎯 81%) 1266 / 1547
🔵 Branches 70.16% (🎯 70%) 4244 / 6049
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/lint.ts 94.11% 88.23% 100% 94% 109-120, 143
packages/core/src/bundle/bundle.ts 94.73% 86.66% 100% 94.73% 100
packages/core/src/config/bundle-extends.ts 87.5% 83.33% 100% 87.5% 42, 49
packages/core/src/config/config-resolvers.ts 72.45% 58.28% 93.33% 73.17% 67, 70, 90-93, 143, 184, 250, 261, 270, 283, 293, 296-300, 305-314, 337-339, 349, 352, 355, 358, 361, 374-376, 380, 386, 389, 392-395, 398-401, 404-407, 421-423, 430, 433, 436, 439, 442, 445, 475-486, 491-504
packages/core/src/config/config.ts 65.12% 68.24% 78.04% 65.51% 204-231, 257, 261, 265-283, 315, 333-353, 432-462
packages/core/src/config/load.ts 86.95% 72.41% 100% 90.9% 31, 52, 92
packages/core/src/rules/config/config-no-unresolved-refs.ts 66.66% 55.55% 83.33% 76.47% 13, 18, 29-32, 39
packages/core/src/types/redocly-yaml.ts 90.16% 76.66% 100% 89.65% 358, 360, 412, 415, 418, 426
Generated in workflow #8216 for commit e17ae00 by the Vitest Coverage Report Action

const resolvedExtends = (node.extends || [])
.map((presetItem: string) => {
.map((presetItem, index) => {
if (typeof presetItem !== 'string' || !presetItem.trim()) {
Copy link
Member

Choose a reason for hiding this comment

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

it's missing file path of where it happens


const resolvedExtends = (node.extends || [])
.map((presetItem: string) => {
.map((presetItem, index) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's investigate if we can use reportUnresolvedRef in some place to resolve this issue.
https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/rules/common/no-unresolved-refs.ts

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.

4 participants