Skip to content

Conversation

@te19oishi
Copy link
Contributor

@te19oishi te19oishi commented Oct 31, 2025

🔗 Linked issue

resolves #33616

📚 Description

Swap argument order in checkPropConflicts to match actual implementation behavior.

The warning message now correctly states that prefetch will be ignored when both prefetch and noPrefetch are used together, which matches the actual implementation where noPrefetch takes priority.

Swap argument order in checkPropConflicts to match actual implementation behavior.

The warning message now correctly states that `prefetch` will be ignored
when both `prefetch` and `noPrefetch` are used together, which matches
the actual implementation where `noPrefetch` takes priority.

Fixes nuxt#33616
@te19oishi te19oishi requested a review from danielroe as a code owner October 31, 2025 02:26
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Walkthrough

The pull request modifies the client-side prefetch conflict check in the Nuxt link component. The change swaps the parameter order in a checkPropConflicts function call from ('prefetch', 'noPrefetch') to ('noPrefetch', 'prefetch'). This reordering designates which property is treated as primary versus secondary for conflict warnings. The underlying conflict detection mechanism remains functionally equivalent, though the warning message emitted will reflect the reversed parameter sequence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Single-file change affecting one function call
  • Parameter reordering with minimal cognitive load
  • Verify the rationale for swapping parameter order (whether this reflects a deliberate priority change or is a correction to existing logic)
  • Confirm the change aligns with intended warning message semantics

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "fix(nuxt): correct warning message for prefetch/noPrefetch conflict" accurately describes the main change in the changeset. The pull request swaps the argument order in the checkPropConflicts function to correct the warning message so it accurately reflects that noPrefetch takes priority and prefetch will be ignored when both props are used together. The title is specific, concise, and clearly communicates the primary purpose of the change without being vague or misleading.
Description Check ✅ Passed The PR description clearly relates to the changeset by explaining that the argument order in checkPropConflicts is being swapped to correct the warning message and match actual implementation behaviour where noPrefetch takes priority. The description is specific and meaningful, providing context about the motivation behind the change (correcting the warning message) and directly addressing what was modified in the code. The description links to the related issue and conveys concrete information about the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 31, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@33617

nuxt

npm i https://pkg.pr.new/nuxt@33617

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@33617

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@33617

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@33617

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@33617

commit: 0fdfd60

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 31, 2025

CodSpeed Performance Report

Merging #33617 will improve performances by 11.45%

Comparing te19oishi:patch-1 (0fdfd60) with main (2a08781)1

Summary

⚡ 1 improvement
✅ 9 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
writeTypes in the basic-types fixture 89.1 ms 79.9 ms +11.45%

Footnotes

  1. No successful run was found on main (96c6605) during the generation of this report, so 2a08781 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@te19oishi te19oishi changed the title fix(nuxt-link): correct warning message for prefetch/noPrefetch conflict fix(nuxt): correct warning message for prefetch/noPrefetch conflict Oct 31, 2025
@danielroe danielroe merged commit 456cc36 into nuxt:main Oct 31, 2025
55 of 58 checks passed
@github-actions github-actions bot mentioned this pull request Oct 31, 2025
@github-actions github-actions bot mentioned this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NuxtLink] Warning message for prefetch/noPrefetch conflict contradicts actual implementation

3 participants