@vue/compat 3.2.12 → 3.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1426,7 +1426,8 @@ class ComputedRefImpl {
1426
1426
  function computed(getterOrOptions, debugOptions) {
1427
1427
  let getter;
1428
1428
  let setter;
1429
- if (isFunction(getterOrOptions)) {
1429
+ const onlyGetter = isFunction(getterOrOptions);
1430
+ if (onlyGetter) {
1430
1431
  getter = getterOrOptions;
1431
1432
  setter = (process.env.NODE_ENV !== 'production')
1432
1433
  ? () => {
@@ -1438,7 +1439,7 @@ function computed(getterOrOptions, debugOptions) {
1438
1439
  getter = getterOrOptions.get;
1439
1440
  setter = getterOrOptions.set;
1440
1441
  }
1441
- const cRef = new ComputedRefImpl(getter, setter, isFunction(getterOrOptions) || !getterOrOptions.set);
1442
+ const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter);
1442
1443
  if ((process.env.NODE_ENV !== 'production') && debugOptions) {
1443
1444
  cRef.effect.onTrack = debugOptions.onTrack;
1444
1445
  cRef.effect.onTrigger = debugOptions.onTrigger;
@@ -1893,7 +1894,7 @@ const deprecationData = {
1893
1894
  ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
1894
1895
  message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
1895
1896
  `If you are seeing this warning only due to a dependency, you can ` +
1896
- `suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`
1897
+ `suppress this warning via { PRIVATE_APIS: 'suppress-warning' }.`
1897
1898
  }
1898
1899
  };
1899
1900
  const instanceWarned = Object.create(null);
@@ -5227,7 +5228,7 @@ function createCompatVue(createApp, createSingletonApp) {
5227
5228
  return vm;
5228
5229
  }
5229
5230
  }
5230
- Vue.version = "3.2.12";
5231
+ Vue.version = "3.2.13";
5231
5232
  Vue.config = singletonApp.config;
5232
5233
  Vue.use = (p, ...options) => {
5233
5234
  if (p && isFunction(p.install)) {
@@ -5763,7 +5764,7 @@ function createAppAPI(render, hydrate) {
5763
5764
  app._instance = vnode.component;
5764
5765
  devtoolsInitApp(app, version);
5765
5766
  }
5766
- return vnode.component.proxy;
5767
+ return getExposeProxy(vnode.component) || vnode.component.proxy;
5767
5768
  }
5768
5769
  else if ((process.env.NODE_ENV !== 'production')) {
5769
5770
  warn$1(`App has already been mounted.\n` +
@@ -5974,14 +5975,14 @@ function createHydrationFunctions(rendererInternals) {
5974
5975
  for (const key in props) {
5975
5976
  if ((forcePatchValue && key.endsWith('value')) ||
5976
5977
  (isOn(key) && !isReservedProp(key))) {
5977
- patchProp(el, key, null, props[key]);
5978
+ patchProp(el, key, null, props[key], false, undefined, parentComponent);
5978
5979
  }
5979
5980
  }
5980
5981
  }
5981
5982
  else if (props.onClick) {
5982
5983
  // Fast path for click listeners (which is most often) to avoid
5983
5984
  // iterating through props.
5984
- patchProp(el, 'onClick', null, props.onClick);
5985
+ patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent);
5985
5986
  }
5986
5987
  }
5987
5988
  // vnode / directive hooks
@@ -10466,7 +10467,7 @@ function createPathGetter(ctx, path) {
10466
10467
  return cur;
10467
10468
  };
10468
10469
  }
10469
- function traverse(value, seen = new Set()) {
10470
+ function traverse(value, seen) {
10470
10471
  if (!isObject(value) || value["__v_skip" /* SKIP */]) {
10471
10472
  return value;
10472
10473
  }
@@ -10882,7 +10883,7 @@ function isMemoSame(cached, memo) {
10882
10883
  }
10883
10884
 
10884
10885
  // Core API ------------------------------------------------------------------
10885
- const version = "3.2.12";
10886
+ const version = "3.2.13";
10886
10887
  const _ssrUtils = {
10887
10888
  createComponentInstance,
10888
10889
  setupComponent,
@@ -1413,7 +1413,8 @@ var Vue = (function () {
1413
1413
  function computed(getterOrOptions, debugOptions) {
1414
1414
  let getter;
1415
1415
  let setter;
1416
- if (isFunction(getterOrOptions)) {
1416
+ const onlyGetter = isFunction(getterOrOptions);
1417
+ if (onlyGetter) {
1417
1418
  getter = getterOrOptions;
1418
1419
  setter = () => {
1419
1420
  console.warn('Write operation failed: computed value is readonly');
@@ -1424,7 +1425,7 @@ var Vue = (function () {
1424
1425
  getter = getterOrOptions.get;
1425
1426
  setter = getterOrOptions.set;
1426
1427
  }
1427
- const cRef = new ComputedRefImpl(getter, setter, isFunction(getterOrOptions) || !getterOrOptions.set);
1428
+ const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter);
1428
1429
  if (debugOptions) {
1429
1430
  cRef.effect.onTrack = debugOptions.onTrack;
1430
1431
  cRef.effect.onTrigger = debugOptions.onTrigger;
@@ -1879,7 +1880,7 @@ var Vue = (function () {
1879
1880
  ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
1880
1881
  message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
1881
1882
  `If you are seeing this warning only due to a dependency, you can ` +
1882
- `suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`
1883
+ `suppress this warning via { PRIVATE_APIS: 'suppress-warning' }.`
1883
1884
  }
1884
1885
  };
1885
1886
  const instanceWarned = Object.create(null);
@@ -5200,7 +5201,7 @@ var Vue = (function () {
5200
5201
  return vm;
5201
5202
  }
5202
5203
  }
5203
- Vue.version = "3.2.12";
5204
+ Vue.version = "3.2.13";
5204
5205
  Vue.config = singletonApp.config;
5205
5206
  Vue.use = (p, ...options) => {
5206
5207
  if (p && isFunction(p.install)) {
@@ -5731,7 +5732,7 @@ var Vue = (function () {
5731
5732
  app._instance = vnode.component;
5732
5733
  devtoolsInitApp(app, version);
5733
5734
  }
5734
- return vnode.component.proxy;
5735
+ return getExposeProxy(vnode.component) || vnode.component.proxy;
5735
5736
  }
5736
5737
  else {
5737
5738
  warn$1(`App has already been mounted.\n` +
@@ -5940,14 +5941,14 @@ var Vue = (function () {
5940
5941
  for (const key in props) {
5941
5942
  if ((forcePatchValue && key.endsWith('value')) ||
5942
5943
  (isOn(key) && !isReservedProp(key))) {
5943
- patchProp(el, key, null, props[key]);
5944
+ patchProp(el, key, null, props[key], false, undefined, parentComponent);
5944
5945
  }
5945
5946
  }
5946
5947
  }
5947
5948
  else if (props.onClick) {
5948
5949
  // Fast path for click listeners (which is most often) to avoid
5949
5950
  // iterating through props.
5950
- patchProp(el, 'onClick', null, props.onClick);
5951
+ patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent);
5951
5952
  }
5952
5953
  }
5953
5954
  // vnode / directive hooks
@@ -10353,7 +10354,7 @@ var Vue = (function () {
10353
10354
  return cur;
10354
10355
  };
10355
10356
  }
10356
- function traverse(value, seen = new Set()) {
10357
+ function traverse(value, seen) {
10357
10358
  if (!isObject(value) || value["__v_skip" /* SKIP */]) {
10358
10359
  return value;
10359
10360
  }
@@ -10764,7 +10765,7 @@ var Vue = (function () {
10764
10765
  }
10765
10766
 
10766
10767
  // Core API ------------------------------------------------------------------
10767
- const version = "3.2.12";
10768
+ const version = "3.2.13";
10768
10769
  /**
10769
10770
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
10770
10771
  * @internal