Skip to content

Conversation

@btea
Copy link

@btea btea commented Oct 23, 2025

There is relevant judgment logic inside the function, and we can make the warning information clearer.

Summary by CodeRabbit

  • Refactor
    • Improved the deprecation warning mechanism to provide more accurate component context information.

@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for vue-router canceled.

Name Link
🔨 Latest commit 3938a7d
🔍 Latest deploy log https://app.netlify.com/projects/vue-router/deploys/68f99798c51e180009034da1

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

The warning message in warnDeprecatedUsage function is refactored to dynamically interpolate the parent component tag using a computed variable instead of hard-coding references to <transition> and <keep-alive>. Message content remains unchanged.

Changes

Cohort / File(s) Summary
Dynamic warning message
packages/router/src/RouterView.ts
Updated deprecated usage warning to interpolate parent component tag via computed variable rather than hard-coded component references

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A warning message, once rigid and plain,
Now dances with variables, breaking its chain,
The comp takes the stage with computational grace,
Making deprecations more fitting in place!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "chore: make warnDeprecatedUsage warn info more explicit" directly aligns with the primary change in the changeset. The modification updates the warning message in warnDeprecatedUsage to interpolate the parent component tag dynamically via a computed comp variable rather than using hard-coded references to <transition> and <keep-alive>. This change makes the warning information clearer and more explicit, which is precisely what the title communicates. The title is concise, specific enough to convey the main objective to a reviewer scanning the history, and avoids vague or misleading language.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f420992 and 3938a7d.

📒 Files selected for processing (1)
  • packages/router/src/RouterView.ts (1 hunks)
🔇 Additional comments (1)
packages/router/src/RouterView.ts (1)

252-260: LGTM! Warning message is now more specific and helpful.

The dynamic interpolation of the parent component tag makes the deprecation warning clearer by showing users exactly which wrapper component is causing the issue, rather than listing both possibilities. The example code will now accurately reflect their specific situation.


Comment @coderabbitai help to get the list of available commands and usage tips.

@btea btea changed the title chore: mark warnDeprecatedUsage warn info more explicit chore: make warnDeprecatedUsage warn info more explicit Oct 23, 2025
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.

1 participant