core
core copied to clipboard
fix(runtime-core): use separate emits caches for components and mixins
This seems to be the same issue as https://github.com/vuejs/core/pull/11350, except that in this case, the emits cache is being reused by both mixins and components, which could lead to the emit validation being applied in the wrong context.
However, the fix here is the same: separate the emits cache from the appContext
Size Report
Bundles
| File | Size | Gzip | Brotli |
|---|---|---|---|
| runtime-dom.global.prod.js | 100 kB (+24 B) | 37.9 kB (+7 B) | 34.2 kB (-11 B) |
| vue.global.prod.js | 158 kB (+24 B) | 57.8 kB (+4 B) | 51.5 kB (+59 B) |
Usages
| Name | Size | Gzip | Brotli |
|---|---|---|---|
| createApp (CAPI only) | 47.2 kB | 18.3 kB | 16.8 kB |
| createApp | 55.3 kB (+39 B) | 21.4 kB (+8 B) | 19.5 kB (-8 B) |
| createSSRApp | 59.3 kB (+39 B) | 23.1 kB (+12 B) | 21 kB (+4 B) |
| defineCustomElement | 60.1 kB (+41 B) | 22.9 kB (+4 B) | 20.9 kB (+2 B) |
| overall | 69.1 kB (+39 B) | 26.5 kB (+15 B) | 24.1 kB (-6 B) |
@vue/compiler-core
pnpm add https://pkg.pr.new/@vue/compiler-core@11661
@vue/compiler-dom
pnpm add https://pkg.pr.new/@vue/compiler-dom@11661
@vue/compiler-ssr
pnpm add https://pkg.pr.new/@vue/compiler-ssr@11661
@vue/compiler-sfc
pnpm add https://pkg.pr.new/@vue/compiler-sfc@11661
@vue/reactivity
pnpm add https://pkg.pr.new/@vue/reactivity@11661
@vue/runtime-core
pnpm add https://pkg.pr.new/@vue/runtime-core@11661
@vue/runtime-dom
pnpm add https://pkg.pr.new/@vue/runtime-dom@11661
@vue/server-renderer
pnpm add https://pkg.pr.new/@vue/server-renderer@11661
@vue/shared
pnpm add https://pkg.pr.new/@vue/shared@11661
vue
pnpm add https://pkg.pr.new/vue@11661
@vue/compat
pnpm add https://pkg.pr.new/@vue/compat@11661
commit: 00b5ef6
/ecosystem-ci run
📝 Ran ecosystem CI: Open
| suite | result | latest scheduled |
|---|---|---|
| language-tools | :x: failure | :x: failure |
| nuxt | :white_check_mark: success | :white_check_mark: success |
| pinia | :white_check_mark: success | :white_check_mark: success |
| primevue | :white_check_mark: success | :white_check_mark: success |
| quasar | :white_check_mark: success | :white_check_mark: success |
| radix-vue | :white_check_mark: success | :white_check_mark: success |
| router | :white_check_mark: success | :white_check_mark: success |
| test-utils | :white_check_mark: success | :white_check_mark: success |
| vant | :white_check_mark: success | :white_check_mark: success |
| vite-plugin-vue | :white_check_mark: success | :white_check_mark: success |
| vitepress | :white_check_mark: success | :white_check_mark: success |
| vue-i18n | :white_check_mark: success | :white_check_mark: success |
| vue-macros | :white_check_mark: success | :white_check_mark: success |
| vuetify | :white_check_mark: success | :white_check_mark: success |
| vueuse | :white_check_mark: success | :white_check_mark: success |
| vue-simple-compiler | :white_check_mark: success | :white_check_mark: success |
The fix looks good to me. I've made some suggestions for the tests.
@skirtles-code Thank you for your review !
I have adjusted the testing code according to your suggestions. Please take a look at it when you have time.