Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9k
fix(compiler-vapor): camelize kebab-case component event handlers#14211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
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/sharedvue@vue/compatcommit: |
There was a problem hiding this 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 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 toonUpdateModel.
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 | Importscamelize and applies it to static handler keys beforetoHandlerKey conversion |
| packages/compiler-vapor/tests/transforms/vOn.spec.ts | Updates test expectation for@update-model to generate camelizedonUpdateModel 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.
b205408 intominorUh oh!
There was an error while loading.Please reload this page.
No description provided.