Skip to content

Conversation

@edison1105
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 3, 2025 14:14
@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch edison/fix/slotPropsAlias

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@14165

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@14165

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@14165

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@14165

@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@14165

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@14165

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@14165

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@14165

@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@14165

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@14165

@vue/shared

npm i https://pkg.pr.new/@vue/shared@14165

vue

npm i https://pkg.pr.new/vue@14165

@vue/compat

npm i https://pkg.pr.new/@vue/compat@14165

commit: 7321ad1

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 85.2 kB 29.9 kB 26.4 kB
runtime-dom.global.prod.js 108 kB 40.5 kB 36.4 kB
vue.global.prod.js 166 kB 60.5 kB 53.8 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48 kB 18.8 kB 17.1 kB
createApp 57 kB 21.9 kB 20 kB
createApp + vaporInteropPlugin 95.4 kB 35.2 kB 31.7 kB
createVaporApp 40.6 kB 15.1 kB 13.7 kB
createSSRApp 61.4 kB 23.7 kB 21.6 kB
defineCustomElement 63.1 kB 23.8 kB 21.7 kB
overall 72.1 kB 27.3 kB 24.9 kB

Copilot finished reviewing on behalf of edison1105 December 3, 2025 14:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances v-slot prop destructuring support by refactoring the destructuring logic to be shared between v-for and v-slot implementations. The key improvement is that slot props now use proper accessor paths (dot notation for simple properties, computed access for dynamic keys) instead of always using bracket notation.

  • Extracts parseValueDestructure and buildDestructureIdMap functions from v-for implementation to make them reusable
  • Updates v-slot handling to use the shared destructuring logic, enabling support for nested destructuring, computed keys, rest elements, and default values
  • Changes generated code from bracket notation (_slotProps0["foo"]) to dot notation (_slotProps0.foo) for cleaner output

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/compiler-vapor/src/generators/for.ts Extracts parseValueDestructure and buildDestructureIdMap as exported functions to enable reuse; refactors the v-for implementation to use the new functions
packages/compiler-vapor/src/generators/component.ts Updates slot prop handling to use the shared destructuring functions, removing the simpler bracket-notation-only logic and enabling full destructuring support
packages/compiler-vapor/tests/transforms/vSlot.spec.ts Adds comprehensive test cases for alias, nested, computed key, rest, and default value destructuring; updates existing test expectations to use dot notation
packages/compiler-vapor/tests/transforms/snapshots/vSlot.spec.ts.snap Updates all snapshots to reflect the new dot notation output and adds snapshots for new test cases
packages/compiler-vapor/tests/snapshots/scopeId.spec.ts.snap Updates snapshot to use dot notation for slot prop access
packages/compiler-vapor/tests/snapshots/compile.spec.ts.snap Updates snapshot to use dot notation for slot prop access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@edison1105 edison1105 merged commit 5db15cf into minor Dec 4, 2025
17 checks passed
@edison1105 edison1105 deleted the edison/fix/slotPropsAlias branch December 4, 2025 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode version: minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants