fix(runtime-vapor): avoid fast remove for component v-for#14889
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
@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: |
Size ReportBundles
Usages
|
|
Actionable comments posted: 0 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/runtime-vapor/src/apiCreateFor.ts`:
- Around line 768-773: The warning text is inconsistent with the check in the
v-for range code that allows 0 (it tests Number.isInteger(source) and source <
0), so update the warn message invoked in the __DEV__ block (the warn call
referencing source and setting values = []) to state "non-negative integer" (or
"integer greater than or equal to 0") instead of "positive integer" so the
message matches the behavior of the Number.isInteger(source) || source < 0
check; alternatively, if strict positivity is desired, change the condition to
source <= 0 and keep the original message—adjust the warn call surrounding the
variables __DEV__, source, warn, and values accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c426e8dc-8623-446d-b7ef-5cd96671c0c7
⛔ Files ignored due to path filters (2)
packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snapis excluded by!**/*.snappackages/compiler-vapor/__tests__/transforms/__snapshots__/vSlot.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (5)
packages/compiler-vapor/__tests__/transforms/vFor.spec.tspackages/compiler-vapor/__tests__/transforms/vSlot.spec.tspackages/compiler-vapor/src/generators/for.tspackages/runtime-vapor/__tests__/for.spec.tspackages/runtime-vapor/src/apiCreateFor.ts
Summary by CodeRabbit
Bug Fixes
Tests