Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dx(reactivity): warn on nested readonly ref update during unwrapping #12141

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jh-leong
Copy link
Member

@jh-leong jh-leong commented Oct 10, 2024

related to #12138

  1. Warn instead of throwing an error when updating a nested readonly ref, keeping consistency with the readonly API.
  2. Improved error message for better clarity.

Before: TypeError: 'set' on proxy: trap returned falsish for property 'foo'
After: [Vue warn] Set operation on key "foo" failed: target is readonly.

Copy link

github-actions bot commented Oct 10, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 99.7 kB (+1 B) 37.8 kB (+1 B) 34.2 kB (+44 B)
vue.global.prod.js 158 kB (+1 B) 57.7 kB (+2 B) 51.4 kB (+28 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47 kB (+1 B) 18.3 kB 16.8 kB (+45 B)
createApp 55.1 kB (+1 B) 21.3 kB (-2 B) 19.4 kB (-4 B)
createSSRApp 59.1 kB (+1 B) 23 kB (-1 B) 20.9 kB (+1 B)
defineCustomElement 59.9 kB (+1 B) 22.9 kB (-2 B) 20.8 kB
overall 68.9 kB (+1 B) 26.4 kB 24 kB (-14 B)

Copy link

pkg-pr-new bot commented Oct 10, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12141

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12141

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12141

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12141

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12141

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12141

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12141

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12141

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12141

vue

pnpm add https://pkg.pr.new/vue@12141

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12141

commit: 3d986d2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 p1-chore Priority 1: this doesn't change code behavior. ready to merge The PR is ready to be merged. scope: reactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants