Skip to content

fix(runtime-core): add dev warning for silent catch in compat mode and fix test description typo#14891

Merged
edison1105 merged 2 commits into
vuejs:mainfrom
oyi77:docs/fix-typos-20260529
Jun 11, 2026
Merged

fix(runtime-core): add dev warning for silent catch in compat mode and fix test description typo#14891
edison1105 merged 2 commits into
vuejs:mainfrom
oyi77:docs/fix-typos-20260529

Conversation

@oyi77

@oyi77 oyi77 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Bug fix: silent error swallowing in compat mode

  • packages/runtime-core/src/compat/global.ts:634 — empty catch (e: any) {} silently swallowed all errors from defineReactiveSimple
  • Added __DEV__ warning to match existing pattern in props.ts:100-108
  • Errors from non-configurable properties are now visible in development

Typo fix

  • packages/vue/__tests__/index.spec.ts:193 — "template is is not found" → "template is not found"

Summary by CodeRabbit

  • Tests

    • Corrected a test description to accurately reflect the expected warning behavior.
  • Bug Fixes (development)

    • Improved runtime diagnostics: when setting up reactive properties fails, a warning with error details is emitted in development builds (may surface additional dev-time warnings).

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Test description in the Vue package is corrected; separately, compat defineReactive now reports exceptions from nested-property reactivity by calling warn with the property key and caught error in development builds.

Changes

Test Description Correction

Layer / File(s) Summary
Template not found warning test description
packages/vue/__tests__/index.spec.ts
Test description string corrected to should warn when template is not found; test body and expectations unchanged.

Compat defineReactive error reporting

Layer / File(s) Summary
defineReactive nested property error handling
packages/runtime-core/src/compat/global.ts
When making nested object properties reactive, exceptions from defineReactiveSimple are now reported in __DEV__ by calling warn with the property key and the caught error instead of being silently ignored.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I’m a rabbit with a test to mend,
A doubled "is" I deftly end.
Then in compat’s reactive lair,
I whisper warnings to the air.
Hopping off with fixes done! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes both main changes: adding a dev warning for silent catch in compat mode and fixing a test description typo, matching the changeset contents.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

- compat/global.ts: add __DEV__ warning when defineReactiveSimple fails
  (previously silently swallowed all errors)
- vue/__tests__/index.spec.ts: "is is" → "is" in test description
@oyi77 oyi77 changed the title fix: remove duplicate 'is' in test description fix: add dev warning for silent catch in compat mode May 29, 2026
@oyi77 oyi77 changed the title fix: add dev warning for silent catch in compat mode fix: add dev warning for silent catch in compat mode and fix test description typo Jun 2, 2026
@edison1105 edison1105 added ready to merge The PR is ready to be merged. 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 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 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 69acbcc

@edison1105 edison1105 changed the title fix: add dev warning for silent catch in compat mode and fix test description typo fix(runtime-core): add dev warning for silent catch in compat mode and fix test description typo Jun 11, 2026
@edison1105

Copy link
Copy Markdown
Member

/ecosystem-ci run

@vue-bot

vue-bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📝 Ran ecosystem CI: Open

suite result latest scheduled
pinia success success
primevue success success
radix-vue failure failure
quasar success success
language-tools success success
vue-simple-compiler success failure
nuxt success success
vite-plugin-vue success success
vue-macros success failure
test-utils success success
vue-i18n success failure
vuetify success failure
vant success success
vitepress success success
vueuse success failure
router success failure

@edison1105 edison1105 merged commit db3e117 into vuejs:main Jun 11, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants