@vue/compat 3.3.0-beta.4 → 3.3.0-beta.5

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.
@@ -3015,7 +3015,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
3015
3015
  );
3016
3016
  setActiveBranch(suspense, vnode.ssFallback);
3017
3017
  } else {
3018
- suspense.resolve();
3018
+ suspense.resolve(false, true);
3019
3019
  }
3020
3020
  }
3021
3021
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -3174,7 +3174,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
3174
3174
  }
3175
3175
  let hasWarned = false;
3176
3176
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3177
- var _a;
3178
3177
  if (!hasWarned) {
3179
3178
  hasWarned = true;
3180
3179
  console[console.info ? "info" : "log"](
@@ -3189,10 +3188,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3189
3188
  o: { parentNode, remove }
3190
3189
  } = rendererInternals;
3191
3190
  let parentSuspenseId;
3192
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3191
+ const isSuspensible = isVNodeSuspensible(vnode);
3193
3192
  if (isSuspensible) {
3194
3193
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
3195
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
3194
+ parentSuspenseId = parentSuspense.pendingId;
3196
3195
  parentSuspense.deps++;
3197
3196
  }
3198
3197
  }
@@ -3217,7 +3216,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3217
3216
  isHydrating,
3218
3217
  isUnmounted: false,
3219
3218
  effects: [],
3220
- resolve(resume = false) {
3219
+ resolve(resume = false, sync = false) {
3221
3220
  {
3222
3221
  if (!resume && !suspense.pendingBranch) {
3223
3222
  throw new Error(
@@ -3279,7 +3278,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3279
3278
  if (isSuspensible) {
3280
3279
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3281
3280
  parentSuspense.deps--;
3282
- if (parentSuspense.deps === 0) {
3281
+ if (parentSuspense.deps === 0 && !sync) {
3283
3282
  parentSuspense.resolve();
3284
3283
  }
3285
3284
  }
@@ -3489,6 +3488,10 @@ function setActiveBranch(suspense, branch) {
3489
3488
  updateHOCHostEl(parentComponent, el);
3490
3489
  }
3491
3490
  }
3491
+ function isVNodeSuspensible(vnode) {
3492
+ var _a;
3493
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3494
+ }
3492
3495
 
3493
3496
  const legacyDirectiveHookMap = {
3494
3497
  beforeMount: "bind",
@@ -4153,7 +4156,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4153
4156
  }
4154
4157
 
4155
4158
  function defineComponent(options, extraOptions) {
4156
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
4159
+ return isFunction(options) ? (
4160
+ // #8326: extend call and options.name access are considered side-effects
4161
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4162
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4163
+ ) : options;
4157
4164
  }
4158
4165
 
4159
4166
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6183,7 +6190,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6183
6190
  return vm;
6184
6191
  }
6185
6192
  }
6186
- Vue.version = `2.6.14-compat:${"3.3.0-beta.4"}`;
6193
+ Vue.version = `2.6.14-compat:${"3.3.0-beta.5"}`;
6187
6194
  Vue.config = singletonApp.config;
6188
6195
  Vue.use = (p, ...options) => {
6189
6196
  if (p && isFunction(p.install)) {
@@ -10712,7 +10719,7 @@ function isMemoSame(cached, memo) {
10712
10719
  return true;
10713
10720
  }
10714
10721
 
10715
- const version = "3.3.0-beta.4";
10722
+ const version = "3.3.0-beta.5";
10716
10723
  const ssrUtils = null;
10717
10724
  const resolveFilter = resolveFilter$1 ;
10718
10725
  const _compatUtils = {
@@ -10938,14 +10945,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
10938
10945
  el[key] = value == null ? "" : value;
10939
10946
  return;
10940
10947
  }
10941
- if (key === "value" && el.tagName !== "PROGRESS" && // custom elements may use _value internally
10942
- !el.tagName.includes("-")) {
10948
+ const tag = el.tagName;
10949
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
10950
+ !tag.includes("-")) {
10943
10951
  el._value = value;
10952
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
10944
10953
  const newValue = value == null ? "" : value;
10945
- if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to
10946
- // textContent if no value attribute is present. And setting .value for
10947
- // OPTION has no side effect
10948
- el.tagName === "OPTION") {
10954
+ if (oldValue !== newValue) {
10949
10955
  el.value = newValue;
10950
10956
  }
10951
10957
  if (value == null) {
@@ -10987,7 +10993,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
10987
10993
  } catch (e) {
10988
10994
  if (!needRemove) {
10989
10995
  warn(
10990
- `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: value ${value} is invalid.`,
10996
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
10991
10997
  e
10992
10998
  );
10993
10999
  }
@@ -12294,7 +12300,7 @@ function injectCompilerOptionsCheck(app) {
12294
12300
  const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
12295
12301
  - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
12296
12302
  - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
12297
- - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
12303
+ - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
12298
12304
  Object.defineProperty(app.config, "compilerOptions", {
12299
12305
  get() {
12300
12306
  warn(msg);