Skip to content

fix(compiler-sfc): respect var hoisting in props destructure#14933

Merged
edison1105 merged 1 commit into
mainfrom
edison/fix-issue-14932
Jun 6, 2026
Merged

fix(compiler-sfc): respect var hoisting in props destructure#14933
edison1105 merged 1 commit into
mainfrom
edison/fix-issue-14932

Conversation

@edison1105

@edison1105 edison1105 commented Jun 6, 2026

Copy link
Copy Markdown
Member

close #14932

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed variable shadowing behavior in reactive props destructuring to correctly respect JavaScript function scoping rules when local variables shadow destructured properties.
  • Tests

    • Added comprehensive test coverage for variable shadowing scenarios across different scopes in reactive props destructuring, including nested blocks, loops, and function scopes.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35a794b4-682b-463a-afb8-a2c71a2a19ab

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

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edison/fix-issue-14932

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

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 106 kB 40.1 kB 36 kB
vue.global.prod.js 164 kB 60.1 kB 53.5 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.8 kB 19 kB 17.4 kB
createApp 56.9 kB 22 kB 20.1 kB
createSSRApp 61.2 kB 23.8 kB 21.7 kB
defineCustomElement 63.1 kB 23.9 kB 21.8 kB
overall 71.7 kB 27.4 kB 25 kB

@pkg-pr-new

pkg-pr-new Bot commented Jun 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@14933
npm i https://pkg.pr.new/@vue/compiler-core@14933
yarn add https://pkg.pr.new/@vue/compiler-core@14933.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@14933
npm i https://pkg.pr.new/@vue/compiler-dom@14933
yarn add https://pkg.pr.new/@vue/compiler-dom@14933.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@14933
npm i https://pkg.pr.new/@vue/compiler-sfc@14933
yarn add https://pkg.pr.new/@vue/compiler-sfc@14933.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@14933
npm i https://pkg.pr.new/@vue/compiler-ssr@14933
yarn add https://pkg.pr.new/@vue/compiler-ssr@14933.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@14933
npm i https://pkg.pr.new/@vue/reactivity@14933
yarn add https://pkg.pr.new/@vue/reactivity@14933.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@14933
npm i https://pkg.pr.new/@vue/runtime-core@14933
yarn add https://pkg.pr.new/@vue/runtime-core@14933.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@14933
npm i https://pkg.pr.new/@vue/runtime-dom@14933
yarn add https://pkg.pr.new/@vue/runtime-dom@14933.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@14933
npm i https://pkg.pr.new/@vue/server-renderer@14933
yarn add https://pkg.pr.new/@vue/server-renderer@14933.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@14933
npm i https://pkg.pr.new/@vue/shared@14933
yarn add https://pkg.pr.new/@vue/shared@14933.tgz

vue

pnpm add https://pkg.pr.new/vue@14933
npm i https://pkg.pr.new/vue@14933
yarn add https://pkg.pr.new/vue@14933.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@14933
npm i https://pkg.pr.new/@vue/compat@14933
yarn add https://pkg.pr.new/@vue/compat@14933.tgz

commit: 48ad452

@edison1105 edison1105 merged commit 48ad452 into main Jun 6, 2026
16 checks passed
@edison1105 edison1105 deleted the edison/fix-issue-14932 branch June 6, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compiler-sfc: Reactive Props Destructure rewrites local references to var declaration

1 participant