Skip to content

Conversation

@KazariEX
Copy link
Member

🔗 Linked issue

📚 Description

It prevents client only component names from appearing twice.

@KazariEX KazariEX requested a review from danielroe as a code owner September 28, 2025 17:59
@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 Sep 28, 2025

Walkthrough

The change replaces an array-based accumulation of component names with a Set while iterating over app.components to enforce deduplication during collection. Items are added via Set.add, and the Set is converted to an array at the end for export/serialisation. The exported value remains an array of strings. No changes to exported/public declarations or error handling are introduced.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “fix(nuxt): dedupe generated component names” succinctly describes the primary change of the pull request, namely deduplicating component names in Nuxt, and follows conventional commit prefix conventions without unnecessary detail or noise.
Description Check ✅ Passed The description clearly states that the change prevents client-only component names from appearing twice, directly reflecting the deduplication logic introduced in the code and aligning with the pull request’s purpose.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • 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 57a965f and e0f2687.

📒 Files selected for processing (1)
  • packages/nuxt/src/components/templates.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Follow standard TypeScript conventions and best practices

Files:

  • packages/nuxt/src/components/templates.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: code
🔇 Additional comments (1)
packages/nuxt/src/components/templates.ts (1)

68-75: Set-based dedupe keeps output stable while removing duplicates

Switching to a Set removes duplicate entries without disturbing first-seen ordering, so the generated array stays deterministic while fixing the client-only duplication issue.


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 Sep 28, 2025

Open in StackBlitz

@nuxt/kit

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

nuxt

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

@nuxt/rspack-builder

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

@nuxt/schema

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

@nuxt/vite-builder

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

@nuxt/webpack-builder

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

commit: e0f2687

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 28, 2025

CodSpeed Performance Report

Merging #33346 will not alter performance

Comparing KazariEX:fix/dedupe-component-names (e0f2687) with main (57a965f)

Summary

✅ 10 untouched

@danielroe danielroe merged commit 9016c0d into nuxt:main Sep 29, 2025
83 of 85 checks passed
@danielroe
Copy link
Member

thank you! ❤️

@KazariEX KazariEX deleted the fix/dedupe-component-names branch September 29, 2025 10:59
@github-actions github-actions bot mentioned this pull request Sep 29, 2025
@github-actions github-actions bot mentioned this pull request Oct 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.

2 participants