Skip to content

Commit 4ae97e3

Browse files
authored
chore: bump to vue v3.2.32 (#1418)
* chore: bump to vue v3.2.32 * fix(mount): shallowMount with Vue v3.2.32 v3.2.32 changed how the root component is used in `createApp` vuejs/core@d121a9b The root component is now copied before usage. This broke how we stub components, as we used to add the root component to the list of component to not stub. As the component is now no longer the same, all tests using shallowMount are failing. The fix is to register the copy of the component created by Vue in `createApp` (which is available as `app._component`)
1 parent a93225c commit 4ae97e3

File tree

3 files changed

+116
-11
lines changed

3 files changed

+116
-11
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"@typescript-eslint/eslint-plugin": "^5.19.0",
2626
"@typescript-eslint/parser": "^5.19.0",
2727
"@vue/babel-plugin-jsx": "^1.1.1",
28-
"@vue/compat": "3.2.31",
29-
"@vue/compiler-dom": "3.2.31",
30-
"@vue/compiler-sfc": "3.2.31",
28+
"@vue/compat": "3.2.32",
29+
"@vue/compiler-dom": "3.2.32",
30+
"@vue/compiler-sfc": "3.2.32",
3131
"@vue/vue3-jest": "27.0.0-alpha.4",
3232
"babel-jest": "27.5.1",
3333
"babel-preset-jest": "27.5.1",
@@ -48,7 +48,7 @@
4848
"tslib": "2.3.1",
4949
"typescript": "4.6.3",
5050
"vitepress": "^0.22.3",
51-
"vue": "3.2.31",
51+
"vue": "3.2.32",
5252
"vue-class-component": "^8.0.0-rc.1",
5353
"vue-jest": "^5.0.0-alpha.10",
5454
"vue-router": "^4.0.14",

src/mount.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ export function mount(
397397
return h(component, props, slots)
398398
}
399399
})
400-
addToDoNotStubComponents(Parent)
401400

402401
const setProps = (newProps: Record<string, unknown>) => {
403402
for (const [k, v] of Object.entries(newProps)) {
@@ -409,6 +408,11 @@ export function mount(
409408

410409
// create the app
411410
const app = createApp(Parent)
411+
// the Parent type must not be stubbed
412+
// but we can't add it directly, as createApp creates a copy
413+
// and store it in app._component (since v3.2.32)
414+
// So we store this one instead
415+
addToDoNotStubComponents(app._component)
412416

413417
// add tracking for emitted events
414418
// this must be done after `createApp`: https://github.com/vuejs/test-utils/issues/436
@@ -503,7 +507,7 @@ export function mount(
503507
// mount the app!
504508
const vm = app.mount(el)
505509

506-
// Ingore Avoid app logic that relies on enumerating keys on a component instance... warning
510+
// Ignore "Avoid app logic that relies on enumerating keys on a component instance..." warning
507511
const warnSave = console.warn
508512
console.warn = () => {}
509513

yarn.lock

Lines changed: 106 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,10 +1736,10 @@
17361736
html-tags "^3.1.0"
17371737
svg-tags "^1.0.0"
17381738

1739-
1740-
version "3.2.31"
1741-
resolved "https://registry.yarnpkg.com/@vue/compat/-/compat-3.2.31.tgz#9c8bdf265eeba1777e5edb56cda73581e351a648"
1742-
integrity sha512-hhwJk/SRwpT2OADctj+t7QZCRIgh04AcelGpe6gdj0OxA75xpHnPrG+fmG37U3Z6WDrNHZpGvu2eXBzWXM4OVA==
1739+
1740+
version "3.2.32"
1741+
resolved "https://registry.yarnpkg.com/@vue/compat/-/compat-3.2.32.tgz#8b341535af99e77316447809fc75a57d93a2f4a5"
1742+
integrity sha512-IlGiUFidAmpUpM6xvBpPn9jI3m1Czv5/g+pCMZfcS/ebpHD4D0ptW+ipsAyIRQBDSmQMLUUYKaDSNo7lGNjEaQ==
17431743

17441744
"@vue/[email protected]", "@vue/compiler-core@^3.2.31":
17451745
version "3.2.31"
@@ -1751,6 +1751,16 @@
17511751
estree-walker "^2.0.2"
17521752
source-map "^0.6.1"
17531753

1754+
1755+
version "3.2.32"
1756+
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.32.tgz#a0be08214c55ae48092b413d8b552c0573e3a883"
1757+
integrity sha512-bRQ8Rkpm/aYFElDWtKkTPHeLnX5pEkNxhPUcqu5crEJIilZH0yeFu/qUAcV4VfSE2AudNPkQSOwMZofhnuutmA==
1758+
dependencies:
1759+
"@babel/parser" "^7.16.4"
1760+
"@vue/shared" "3.2.32"
1761+
estree-walker "^2.0.2"
1762+
source-map "^0.6.1"
1763+
17541764
"@vue/[email protected]", "@vue/compiler-dom@^3.2.31":
17551765
version "3.2.31"
17561766
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz#b1b7dfad55c96c8cc2b919cd7eb5fd7e4ddbf00e"
@@ -1759,6 +1769,14 @@
17591769
"@vue/compiler-core" "3.2.31"
17601770
"@vue/shared" "3.2.31"
17611771

1772+
1773+
version "3.2.32"
1774+
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.32.tgz#8ddae1ee463c18c5c3353c4716ec7c84ee29e5ad"
1775+
integrity sha512-maa3PNB/NxR17h2hDQfcmS02o1f9r9QIpN1y6fe8tWPrS1E4+q8MqrvDDQNhYVPd84rc3ybtyumrgm9D5Rf/kg==
1776+
dependencies:
1777+
"@vue/compiler-core" "3.2.32"
1778+
"@vue/shared" "3.2.32"
1779+
17621780
"@vue/[email protected]", "@vue/compiler-sfc@^3.2.31":
17631781
version "3.2.31"
17641782
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz#d02b29c3fe34d599a52c5ae1c6937b4d69f11c2f"
@@ -1775,6 +1793,22 @@
17751793
postcss "^8.1.10"
17761794
source-map "^0.6.1"
17771795

1796+
1797+
version "3.2.32"
1798+
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.32.tgz#63e09762812b985aa97876fb5cc3265ba8990a8a"
1799+
integrity sha512-uO6+Gh3AVdWm72lRRCjMr8nMOEqc6ezT9lWs5dPzh1E9TNaJkMYPaRtdY9flUv/fyVQotkfjY/ponjfR+trPSg==
1800+
dependencies:
1801+
"@babel/parser" "^7.16.4"
1802+
"@vue/compiler-core" "3.2.32"
1803+
"@vue/compiler-dom" "3.2.32"
1804+
"@vue/compiler-ssr" "3.2.32"
1805+
"@vue/reactivity-transform" "3.2.32"
1806+
"@vue/shared" "3.2.32"
1807+
estree-walker "^2.0.2"
1808+
magic-string "^0.25.7"
1809+
postcss "^8.1.10"
1810+
source-map "^0.6.1"
1811+
17781812
17791813
version "3.2.31"
17801814
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz#4fa00f486c9c4580b40a4177871ebbd650ecb99c"
@@ -1783,6 +1817,14 @@
17831817
"@vue/compiler-dom" "3.2.31"
17841818
"@vue/shared" "3.2.31"
17851819

1820+
1821+
version "3.2.32"
1822+
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.32.tgz#06cf7539c483ba4a25b30bd6741e440c222d4c02"
1823+
integrity sha512-ZklVUF/SgTx6yrDUkaTaBL/JMVOtSocP+z5Xz/qIqqLdW/hWL90P+ob/jOQ0Xc/om57892Q7sRSrex0wujOL2Q==
1824+
dependencies:
1825+
"@vue/compiler-dom" "3.2.32"
1826+
"@vue/shared" "3.2.32"
1827+
17861828
"@vue/devtools-api@^6.0.0", "@vue/devtools-api@^6.0.0-beta.11":
17871829
version "6.0.12"
17881830
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.12.tgz#7b57cce215ae9f37a86984633b3aa3d595aa5b46"
@@ -1799,13 +1841,31 @@
17991841
estree-walker "^2.0.2"
18001842
magic-string "^0.25.7"
18011843

1844+
1845+
version "3.2.32"
1846+
resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.32.tgz#974fd2a1e682e962fbc5840be8432ac4ab8650d3"
1847+
integrity sha512-CW1W9zaJtE275tZSWIfQKiPG0iHpdtSlmTqYBu7Y62qvtMgKG5yOxtvBs4RlrZHlaqFSE26avLAgQiTp4YHozw==
1848+
dependencies:
1849+
"@babel/parser" "^7.16.4"
1850+
"@vue/compiler-core" "3.2.32"
1851+
"@vue/shared" "3.2.32"
1852+
estree-walker "^2.0.2"
1853+
magic-string "^0.25.7"
1854+
18021855
"@vue/[email protected]", "@vue/reactivity@^3.2.31":
18031856
version "3.2.31"
18041857
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.31.tgz#fc90aa2cdf695418b79e534783aca90d63a46bbd"
18051858
integrity sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==
18061859
dependencies:
18071860
"@vue/shared" "3.2.31"
18081861

1862+
1863+
version "3.2.32"
1864+
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.32.tgz#a859c8ab28a297d14a46cbd450bf70b3f6f87fac"
1865+
integrity sha512-4zaDumuyDqkuhbb63hRd+YHFGopW7srFIWesLUQ2su/rJfWrSq3YUvoKAJE8Eu1EhZ2Q4c1NuwnEreKj1FkDxA==
1866+
dependencies:
1867+
"@vue/shared" "3.2.32"
1868+
18091869
18101870
version "3.2.31"
18111871
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.31.tgz#9d284c382f5f981b7a7b5971052a1dc4ef39ac7a"
@@ -1814,6 +1874,14 @@
18141874
"@vue/reactivity" "3.2.31"
18151875
"@vue/shared" "3.2.31"
18161876

1877+
1878+
version "3.2.32"
1879+
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.32.tgz#8f8875dc032f99991bafb72070327ae5584a08dd"
1880+
integrity sha512-uKKzK6LaCnbCJ7rcHvsK0azHLGpqs+Vi9B28CV1mfWVq1F3Bj8Okk3cX+5DtD06aUh4V2bYhS2UjjWiUUKUF0w==
1881+
dependencies:
1882+
"@vue/reactivity" "3.2.32"
1883+
"@vue/shared" "3.2.32"
1884+
18171885
18181886
version "3.2.31"
18191887
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz#79ce01817cb3caf2c9d923f669b738d2d7953eff"
@@ -1823,6 +1891,15 @@
18231891
"@vue/shared" "3.2.31"
18241892
csstype "^2.6.8"
18251893

1894+
1895+
version "3.2.32"
1896+
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.32.tgz#53a8be5c9d72105faf4d11d10202063e9a29c39c"
1897+
integrity sha512-AmlIg+GPqjkNoADLjHojEX5RGcAg+TsgXOOcUrtDHwKvA8mO26EnLQLB8nylDjU6AMJh2CIYn8NEgyOV5ZIScQ==
1898+
dependencies:
1899+
"@vue/runtime-core" "3.2.32"
1900+
"@vue/shared" "3.2.32"
1901+
csstype "^2.6.8"
1902+
18261903
18271904
version "3.2.31"
18281905
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.31.tgz#201e9d6ce735847d5989403af81ef80960da7141"
@@ -1831,11 +1908,24 @@
18311908
"@vue/compiler-ssr" "3.2.31"
18321909
"@vue/shared" "3.2.31"
18331910

1911+
1912+
version "3.2.32"
1913+
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.32.tgz#432e0cb766feabe3b97956ae37b8f75c239f2c37"
1914+
integrity sha512-TYKpZZfRJpGTTiy/s6bVYwQJpAUx3G03z4G7/3O18M11oacrMTVHaHjiPuPqf3xQtY8R4LKmQ3EOT/DRCA/7Wg==
1915+
dependencies:
1916+
"@vue/compiler-ssr" "3.2.32"
1917+
"@vue/shared" "3.2.32"
1918+
18341919
"@vue/[email protected]", "@vue/shared@^3.2.31":
18351920
version "3.2.31"
18361921
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.31.tgz#c90de7126d833dcd3a4c7534d534be2fb41faa4e"
18371922
integrity sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==
18381923

1924+
1925+
version "3.2.32"
1926+
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.32.tgz#1ca0c3b8c03a5e24129156e171df736b2c1d645f"
1927+
integrity sha512-bjcixPErUsAnTQRQX4Z5IQnICYjIfNCyCl8p29v1M6kfVzvwOICPw+dz48nNuWlTOOx2RHhzHdazJibE8GSnsw==
1928+
18391929
18401930
version "27.0.0-alpha.4"
18411931
resolved "https://registry.yarnpkg.com/@vue/vue3-jest/-/vue3-jest-27.0.0-alpha.4.tgz#eb2e5eba1c7a0ae39e457ba2df7ac891a79a2402"
@@ -5242,7 +5332,18 @@ [email protected]:
52425332
dependencies:
52435333
"@volar/vue-typescript" "0.34.5"
52445334

5245-
[email protected], vue@^3.2.31:
5335+
5336+
version "3.2.32"
5337+
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.32.tgz#a09840e237384c673f421ff7280c4469714f2ac0"
5338+
integrity sha512-6L3jKZApF042OgbCkh+HcFeAkiYi3Lovi8wNhWqIK98Pi5efAMLZzRHgi91v+60oIRxdJsGS9sTMsb+yDpY8Eg==
5339+
dependencies:
5340+
"@vue/compiler-dom" "3.2.32"
5341+
"@vue/compiler-sfc" "3.2.32"
5342+
"@vue/runtime-dom" "3.2.32"
5343+
"@vue/server-renderer" "3.2.32"
5344+
"@vue/shared" "3.2.32"
5345+
5346+
vue@^3.2.31:
52465347
version "3.2.31"
52475348
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.31.tgz#e0c49924335e9f188352816788a4cca10f817ce6"
52485349
integrity sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==

0 commit comments

Comments
 (0)