fix(compiler-vapor): camelize kebab-case component event handlers#14211
fix(compiler-vapor): camelize kebab-case component event handlers#14211edison1105 merged 1 commit intominorfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
There was a problem hiding this comment.
Pull request overview
This PR fixes the Vapor compiler to properly camelize kebab-case component event handlers, aligning its behavior with the standard Vue compiler. Previously, kebab-case event names like @update-model were incorrectly kept as "onUpdate-model" instead of being converted to onUpdateModel.
Key Changes:
- Apply
camelizetransformation to static event handler keys before converting them to handler format - Update existing test expectations to reflect the corrected behavior
- Add new test case specifically for kebab-case event handler camelization
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/compiler-vapor/src/generators/prop.ts | Imports camelize and applies it to static handler keys before toHandlerKey conversion |
| packages/compiler-vapor/tests/transforms/vOn.spec.ts | Updates test expectation for @update-model to generate camelized onUpdateModel and adds new test for kebab-case camelization |
| packages/compiler-vapor/tests/transforms/snapshots/vOn.spec.ts.snap | Updates snapshots to reflect corrected camelized output for kebab-case handlers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.