Skip to content

Conversation

@KazariEX
Copy link
Member

@KazariEX KazariEX commented Oct 3, 2025

🔗 Linked issue

📚 Description

It seems that this property has become obsolete.

@KazariEX KazariEX requested a review from danielroe as a code owner October 3, 2025 11:30
@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 3, 2025

Walkthrough

The changes remove the shortPath property from the Component interface and from runtime construction/usage. scanComponents no longer accepts a srcDir parameter and no longer computes or returns shortPath. The AddComponentOptions type was loosened to no longer exclude shortPath, while normalizeComponent no longer sets a shortPath value. Multiple tests and callers (including the Nuxt module) were updated to drop shortPath usage and to call scanComponents with the new single-argument signature.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly summarises the primary change by indicating removal of the obsolete shortPath property and follows a clear conventional commit style without unnecessary details. It accurately reflects the core refactor performed across code and tests. Consequently, it meets the criteria for a descriptive and concise pull request title.
Description Check ✅ Passed Although brief, the description directly relates to the removal of the obsolete shortPath property and provides the rationale for the change. It is on-topic and references the property under modification without being generic or off-topic. Therefore, it satisfies the lenient relevance criteria for a pull request description.
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 20d61be and c36db2e.

📒 Files selected for processing (4)
  • packages/nuxt/src/components/module.ts (1 hunks)
  • packages/nuxt/src/components/scan.ts (1 hunks)
  • packages/nuxt/test/scan-components.test.ts (1 hunks)
  • packages/schema/src/types/components.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/schema/src/types/components.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/nuxt/src/components/scan.ts
  • packages/nuxt/src/components/module.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

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

Follow standard TypeScript conventions and best practices

Files:

  • packages/nuxt/test/scan-components.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

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

Write unit tests for core functionality using vitest

Files:

  • packages/nuxt/test/scan-components.test.ts
🧬 Code graph analysis (1)
packages/nuxt/test/scan-components.test.ts (1)
packages/nuxt/src/components/scan.ts (1)
  • scanComponents (22-169)
🔇 Additional comments (1)
packages/nuxt/test/scan-components.test.ts (1)

233-233: LGTM! Test correctly updated to match new API.

The function call has been properly updated to use the new single-argument scanComponents(dirs) signature, which aligns with the removal of the obsolete shortPath property. The expected components (lines 86-230) correctly omit shortPath, and the deep equality assertion at line 240 implicitly verifies its absence from the scanned results.


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 3, 2025

Open in StackBlitz

@nuxt/kit

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

nuxt

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

@nuxt/rspack-builder

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

@nuxt/schema

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

@nuxt/vite-builder

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

@nuxt/webpack-builder

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

commit: c36db2e

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 3, 2025

CodSpeed Performance Report

Merging #33384 will not alter performance

Comparing KazariEX:refactor/remove-short-path (c36db2e) with main (94e6fbb)1

Summary

✅ 10 untouched

Footnotes

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

Comment on lines 90 to 91
prefetch: false,
preload: false,
Copy link
Member

Choose a reason for hiding this comment

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

these are also unused (currently)

Copy link
Member Author

@KazariEX KazariEX Oct 7, 2025

Choose a reason for hiding this comment

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

It seems also be used by webpack builder.

Copy link
Member

Choose a reason for hiding this comment

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

you are quite right

// Apply defaults
const component: Component = {
export: opts.export || 'default',
chunkName: 'components/' + kebabCase(opts.name),
Copy link
Member

Choose a reason for hiding this comment

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

this is only used by webpack builder - support could likely be added in vite

@danielroe danielroe merged commit df559ad into nuxt:main Oct 7, 2025
51 checks passed
@KazariEX KazariEX deleted the refactor/remove-short-path branch October 7, 2025 19:57
@github-actions github-actions bot mentioned this pull request Oct 7, 2025
danielroe added a commit that referenced this pull request Oct 9, 2025
@github-actions github-actions bot mentioned this pull request Oct 23, 2025
danielroe added a commit that referenced this pull request Oct 25, 2025
@github-actions github-actions bot mentioned this pull request Oct 25, 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