Skip to content

Commit d06eec7

Browse files
committed
chore: bump to vue v3.2.34-beta.1
1 parent 86baba7 commit d06eec7

File tree

3 files changed

+126
-11
lines changed

3 files changed

+126
-11
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"@typescript-eslint/eslint-plugin": "^5.25.0",
3535
"@typescript-eslint/parser": "^5.25.0",
3636
"@vue/babel-plugin-jsx": "^1.1.1",
37-
"@vue/compat": "3.2.33",
38-
"@vue/compiler-dom": "3.2.33",
39-
"@vue/compiler-sfc": "3.2.33",
37+
"@vue/compat": "3.2.34-beta.1",
38+
"@vue/compiler-dom": "3.2.34-beta.1",
39+
"@vue/compiler-sfc": "3.2.34-beta.1",
4040
"@vue/vue3-jest": "27.0.0-alpha.4",
4141
"babel-jest": "27.5.1",
4242
"babel-preset-jest": "28.0.2",
@@ -57,7 +57,7 @@
5757
"tslib": "2.4.0",
5858
"typescript": "4.6.4",
5959
"vitepress": "^0.22.4",
60-
"vue": "3.2.33",
60+
"vue": "3.2.34-beta.1",
6161
"vue-class-component": "^8.0.0-rc.1",
6262
"vue-jest": "^5.0.0-alpha.10",
6363
"vue-router": "^4.0.15",

src/mount.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import {
2525
Prop
2626
} from 'vue'
2727

28+
// workaround until https://github.com/vuejs/core/pull/5947 is merged
29+
declare type ObjectProvideOptions = Record<string | symbol, unknown>
30+
declare type ComponentProvideOptions = ObjectProvideOptions | Function
31+
2832
import { MountingOptions, Slot } from './types'
2933
import {
3034
isFunctionalComponent,
@@ -129,6 +133,8 @@ export function mount<
129133
Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
130134
E extends EmitsOptions = Record<string, any>,
131135
EE extends string = string,
136+
Provide extends ComponentProvideOptions = ComponentProvideOptions,
137+
RawOptions extends {} = {},
132138
PP = PublicProps,
133139
Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>,
134140
Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>
@@ -143,6 +149,8 @@ export function mount<
143149
Extends,
144150
E,
145151
EE,
152+
Provide,
153+
RawOptions,
146154
PP,
147155
Props,
148156
Defaults
@@ -164,6 +172,8 @@ export function mount<
164172
Extends,
165173
E,
166174
EE,
175+
Provide,
176+
RawOptions,
167177
PP,
168178
Props,
169179
Defaults
@@ -273,7 +283,7 @@ export function mount(
273283
inputComponent: any,
274284
options?: MountingOptions<any> & Record<string, any>
275285
): VueWrapper<any> {
276-
// normalise the incoming component
286+
// normalize the incoming component
277287
const originalComponent = unwrapLegacyVueExtendComponent(inputComponent)
278288
let component: ConcreteComponent
279289
const instanceOptions = getInstanceOptions(options ?? {})
@@ -282,7 +292,10 @@ export function mount(
282292
isFunctionalComponent(originalComponent) ||
283293
isLegacyFunctionalComponent(originalComponent)
284294
) {
285-
component = defineComponent({
295+
// TS is not happy if we directly assigned the result of `defineComponent`
296+
// to `component`: it breaks the inference on the setup function
297+
// using a temporary variable fixes the issue, even if this is not pretty
298+
const wrappedComponent = defineComponent({
286299
compatConfig: {
287300
MODE: 3,
288301
INSTANCE_LISTENERS: false,
@@ -298,6 +311,7 @@ export function mount(
298311
h(originalComponent, attrs, slots),
299312
...instanceOptions
300313
})
314+
component = wrappedComponent
301315
addToDoNotStubComponents(originalComponent)
302316
} else if (isObjectComponent(originalComponent)) {
303317
component = { ...originalComponent, ...instanceOptions }

yarn.lock

Lines changed: 106 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,10 +1744,10 @@
17441744
html-tags "^3.1.0"
17451745
svg-tags "^1.0.0"
17461746

1747-
1748-
version "3.2.33"
1749-
resolved "https://registry.yarnpkg.com/@vue/compat/-/compat-3.2.33.tgz#d7080bf24247e730fe9c33e9782ae4fba66ec347"
1750-
integrity sha512-8g2W2Na+vEKq9dhj/OkfesgSdr8kXx7ehC1tPCngGq1MD/Q6Q0ydnpcD0sNaGFP4R/8Zccp0LIpMSnj8qKGXBQ==
1747+
"@vue/[email protected].34-beta.1":
1748+
version "3.2.34-beta.1"
1749+
resolved "https://registry.yarnpkg.com/@vue/compat/-/compat-3.2.34-beta.1.tgz#4c51684cd15256d30c7db7651764c2574037a2cf"
1750+
integrity sha512-MNUDEHJlBKFmuMnP6MqMD+xj5Tm3FglDe2zqj3R13W2dUwKTrEl5J/72FHTMglHpmgchCJXzfJytI/eTKnpVsg==
17511751

17521752
"@vue/[email protected]", "@vue/compiler-core@^3.2.31":
17531753
version "3.2.31"
@@ -1769,6 +1769,16 @@
17691769
estree-walker "^2.0.2"
17701770
source-map "^0.6.1"
17711771

1772+
1773+
version "3.2.34-beta.1"
1774+
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.34-beta.1.tgz#5294f0cfefa387779d5653fc16f6cb51db95136f"
1775+
integrity sha512-OTGP9CNPMOXNChqGOYwxG7PDWwEps8giACqG7yBLWVmUWO2EsEw4cuK8mLzucOoAvKvWLLD1Ea/Ena1itn4mEA==
1776+
dependencies:
1777+
"@babel/parser" "^7.16.4"
1778+
"@vue/shared" "3.2.34-beta.1"
1779+
estree-walker "^2.0.2"
1780+
source-map "^0.6.1"
1781+
17721782
"@vue/[email protected]", "@vue/compiler-dom@^3.2.31":
17731783
version "3.2.31"
17741784
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz#b1b7dfad55c96c8cc2b919cd7eb5fd7e4ddbf00e"
@@ -1785,6 +1795,14 @@
17851795
"@vue/compiler-core" "3.2.33"
17861796
"@vue/shared" "3.2.33"
17871797

1798+
1799+
version "3.2.34-beta.1"
1800+
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.34-beta.1.tgz#fc7a1a34b00ae380f6b36f41b6773faf4454cfe2"
1801+
integrity sha512-VF60DU7TsvSDAP1jEki+ZmI5UG9MWoJxu9dcXwI2SSXECTMjfkVBDDTIWPCPKw8Qmk9OID9k0JBW1mKpR3o+Og==
1802+
dependencies:
1803+
"@vue/compiler-core" "3.2.34-beta.1"
1804+
"@vue/shared" "3.2.34-beta.1"
1805+
17881806
17891807
version "3.2.33"
17901808
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.33.tgz#7ce01dc947a8b76c099811dc6ca58494d4dc773d"
@@ -1801,6 +1819,22 @@
18011819
postcss "^8.1.10"
18021820
source-map "^0.6.1"
18031821

1822+
1823+
version "3.2.34-beta.1"
1824+
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.34-beta.1.tgz#eea268c92b053b67134eab0966361f624dff372c"
1825+
integrity sha512-7IeNFSY6PUubdXiyWVFlRnlDaHGkf7nQ+15KycOxh9iMmVMTrzhWaaXDOn1eISfGDUBAcSHEGGbXXjXG1qZyNA==
1826+
dependencies:
1827+
"@babel/parser" "^7.16.4"
1828+
"@vue/compiler-core" "3.2.34-beta.1"
1829+
"@vue/compiler-dom" "3.2.34-beta.1"
1830+
"@vue/compiler-ssr" "3.2.34-beta.1"
1831+
"@vue/reactivity-transform" "3.2.34-beta.1"
1832+
"@vue/shared" "3.2.34-beta.1"
1833+
estree-walker "^2.0.2"
1834+
magic-string "^0.25.7"
1835+
postcss "^8.1.10"
1836+
source-map "^0.6.1"
1837+
18041838
"@vue/compiler-sfc@^3.2.31":
18051839
version "3.2.31"
18061840
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz#d02b29c3fe34d599a52c5ae1c6937b4d69f11c2f"
@@ -1833,6 +1867,14 @@
18331867
"@vue/compiler-dom" "3.2.33"
18341868
"@vue/shared" "3.2.33"
18351869

1870+
1871+
version "3.2.34-beta.1"
1872+
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.34-beta.1.tgz#640c207dcd22e7efc15b1db8757d2884da551af0"
1873+
integrity sha512-4+GagmxbNJlsJUY26JYTixKMqDuT40RUrbcukK1/ueV7L1E/W1HhAfaWGH3/d1HkRZu3mynhNbkxYWNhlVW8hg==
1874+
dependencies:
1875+
"@vue/compiler-dom" "3.2.34-beta.1"
1876+
"@vue/shared" "3.2.34-beta.1"
1877+
18361878
"@vue/devtools-api@^6.0.0", "@vue/devtools-api@^6.0.0-beta.11":
18371879
version "6.0.12"
18381880
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.12.tgz#7b57cce215ae9f37a86984633b3aa3d595aa5b46"
@@ -1860,13 +1902,31 @@
18601902
estree-walker "^2.0.2"
18611903
magic-string "^0.25.7"
18621904

1905+
1906+
version "3.2.34-beta.1"
1907+
resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.34-beta.1.tgz#9834d6445b447ccc0063198a2ce452a856e3ca66"
1908+
integrity sha512-UhKEid3QakGUhdBpTwiZzT/nOGV+kjPE89kqzRZWrJGvjxZh3cgbRCnJc8F+PiLNrZ5o0bAtIZvG61lDmOhDaA==
1909+
dependencies:
1910+
"@babel/parser" "^7.16.4"
1911+
"@vue/compiler-core" "3.2.34-beta.1"
1912+
"@vue/shared" "3.2.34-beta.1"
1913+
estree-walker "^2.0.2"
1914+
magic-string "^0.25.7"
1915+
18631916
18641917
version "3.2.33"
18651918
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.33.tgz#c84eedb5225138dbfc2472864c151d3efbb4b673"
18661919
integrity sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==
18671920
dependencies:
18681921
"@vue/shared" "3.2.33"
18691922

1923+
1924+
version "3.2.34-beta.1"
1925+
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.34-beta.1.tgz#614b405cc4e1167c86ef35c8be18954bbe7f56b9"
1926+
integrity sha512-ZHiOvoG62ibbqxGG9nZiXoREBBMDKeTklPmaaR97i+hHvzErvABA6ADT6xeXZTnu/xjJbHyuSTd8xprhWPoDOw==
1927+
dependencies:
1928+
"@vue/shared" "3.2.34-beta.1"
1929+
18701930
"@vue/reactivity@^3.2.31":
18711931
version "3.2.31"
18721932
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.31.tgz#fc90aa2cdf695418b79e534783aca90d63a46bbd"
@@ -1882,6 +1942,14 @@
18821942
"@vue/reactivity" "3.2.33"
18831943
"@vue/shared" "3.2.33"
18841944

1945+
1946+
version "3.2.34-beta.1"
1947+
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.34-beta.1.tgz#9af53a42bf2e5c8af36f340e1c30ef3005c35417"
1948+
integrity sha512-Xj2g9mFAhYa9aFeYPF3zAe2NIBXqdAk1MYELEmcxY0ix7XtA/5J9yYq4LmJOostFn+omp+QwpT4tbhVhY252Mg==
1949+
dependencies:
1950+
"@vue/reactivity" "3.2.34-beta.1"
1951+
"@vue/shared" "3.2.34-beta.1"
1952+
18851953
18861954
version "3.2.33"
18871955
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.33.tgz#123b8969247029ea0d9c1983676d4706a962d848"
@@ -1891,6 +1959,15 @@
18911959
"@vue/shared" "3.2.33"
18921960
csstype "^2.6.8"
18931961

1962+
1963+
version "3.2.34-beta.1"
1964+
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.34-beta.1.tgz#1c5dd5d71863d4bf25f711db9a0c889dc91e16c9"
1965+
integrity sha512-CpXebx3vejMBnxsgghIPO8E6mVyJ46xbJuY10dfKTrXQPr6KIUdWYf3xMkhFm3y0H4gdT814QsIQ6e6pObwTpg==
1966+
dependencies:
1967+
"@vue/runtime-core" "3.2.34-beta.1"
1968+
"@vue/shared" "3.2.34-beta.1"
1969+
csstype "^2.6.8"
1970+
18941971
18951972
version "3.2.33"
18961973
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.33.tgz#4b45d6d2ae10ea4e3d2cf8e676804cf60f331979"
@@ -1899,6 +1976,14 @@
18991976
"@vue/compiler-ssr" "3.2.33"
19001977
"@vue/shared" "3.2.33"
19011978

1979+
1980+
version "3.2.34-beta.1"
1981+
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.34-beta.1.tgz#34861b0636a892161ccca41adf9339169f5e5b3e"
1982+
integrity sha512-Nmxu2ERqaf9VHCinvwKv5BaYcBwAojil2S4ZrlffsR/E7FvtEWMCe6XW869vOzSY1uJK9mySJnxDo6lzfRGzzA==
1983+
dependencies:
1984+
"@vue/compiler-ssr" "3.2.34-beta.1"
1985+
"@vue/shared" "3.2.34-beta.1"
1986+
19021987
"@vue/[email protected]", "@vue/shared@^3.2.31":
19031988
version "3.2.31"
19041989
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.31.tgz#c90de7126d833dcd3a4c7534d534be2fb41faa4e"
@@ -1909,6 +1994,11 @@
19091994
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.33.tgz#69a8c99ceb37c1b031d5cc4aec2ff1dc77e1161e"
19101995
integrity sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==
19111996

1997+
1998+
version "3.2.34-beta.1"
1999+
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.34-beta.1.tgz#e4dba35f74146f7fc9f311202c62639d6a0eca72"
2000+
integrity sha512-QqKs6+Hq/Tn+aKtf8l3fQlbzH8Nt2evteMxpp0U68u3nOdrEIpiDio5WcFgIcVqodzGBYbgfpgftu3egX6CTKA==
2001+
19122002
19132003
version "27.0.0-alpha.4"
19142004
resolved "https://registry.yarnpkg.com/@vue/vue3-jest/-/vue3-jest-27.0.0-alpha.4.tgz#eb2e5eba1c7a0ae39e457ba2df7ac891a79a2402"
@@ -5384,7 +5474,18 @@ [email protected]:
53845474
dependencies:
53855475
"@volar/vue-typescript" "0.34.15"
53865476

5387-
[email protected], vue@^3.2.33:
5477+
5478+
version "3.2.34-beta.1"
5479+
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.34-beta.1.tgz#3fb424990d502ffa4b0dd98e8ab6af95f5d3c61a"
5480+
integrity sha512-2ds+R6H21MErzkG8CDUJ6k7Iba7HkYFxZf+5qYlK4vmshxiIxkkQvll+OdSZQWH5kmW0ys9njo49f0BUSILM7w==
5481+
dependencies:
5482+
"@vue/compiler-dom" "3.2.34-beta.1"
5483+
"@vue/compiler-sfc" "3.2.34-beta.1"
5484+
"@vue/runtime-dom" "3.2.34-beta.1"
5485+
"@vue/server-renderer" "3.2.34-beta.1"
5486+
"@vue/shared" "3.2.34-beta.1"
5487+
5488+
vue@^3.2.33:
53885489
version "3.2.33"
53895490
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.33.tgz#7867eb16a3293a28c4d190a837bc447878bd64c2"
53905491
integrity sha512-si1ExAlDUrLSIg/V7D/GgA4twJwfsfgG+t9w10z38HhL/HA07132pUQ2KuwAo8qbCyMJ9e6OqrmWrOCr+jW7ZQ==

0 commit comments

Comments
 (0)