@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.
@@ -3032,7 +3032,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
3032
3032
  );
3033
3033
  setActiveBranch(suspense, vnode.ssFallback);
3034
3034
  } else {
3035
- suspense.resolve();
3035
+ suspense.resolve(false, true);
3036
3036
  }
3037
3037
  }
3038
3038
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -3191,7 +3191,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
3191
3191
  }
3192
3192
  let hasWarned = false;
3193
3193
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3194
- var _a;
3195
3194
  if (process.env.NODE_ENV !== "production" && true && !hasWarned) {
3196
3195
  hasWarned = true;
3197
3196
  console[console.info ? "info" : "log"](
@@ -3206,10 +3205,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3206
3205
  o: { parentNode, remove }
3207
3206
  } = rendererInternals;
3208
3207
  let parentSuspenseId;
3209
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3208
+ const isSuspensible = isVNodeSuspensible(vnode);
3210
3209
  if (isSuspensible) {
3211
3210
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
3212
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
3211
+ parentSuspenseId = parentSuspense.pendingId;
3213
3212
  parentSuspense.deps++;
3214
3213
  }
3215
3214
  }
@@ -3234,7 +3233,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3234
3233
  isHydrating,
3235
3234
  isUnmounted: false,
3236
3235
  effects: [],
3237
- resolve(resume = false) {
3236
+ resolve(resume = false, sync = false) {
3238
3237
  if (process.env.NODE_ENV !== "production") {
3239
3238
  if (!resume && !suspense.pendingBranch) {
3240
3239
  throw new Error(
@@ -3296,7 +3295,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3296
3295
  if (isSuspensible) {
3297
3296
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3298
3297
  parentSuspense.deps--;
3299
- if (parentSuspense.deps === 0) {
3298
+ if (parentSuspense.deps === 0 && !sync) {
3300
3299
  parentSuspense.resolve();
3301
3300
  }
3302
3301
  }
@@ -3506,6 +3505,10 @@ function setActiveBranch(suspense, branch) {
3506
3505
  updateHOCHostEl(parentComponent, el);
3507
3506
  }
3508
3507
  }
3508
+ function isVNodeSuspensible(vnode) {
3509
+ var _a;
3510
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3511
+ }
3509
3512
 
3510
3513
  const legacyDirectiveHookMap = {
3511
3514
  beforeMount: "bind",
@@ -4193,7 +4196,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4193
4196
  }
4194
4197
 
4195
4198
  function defineComponent(options, extraOptions) {
4196
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
4199
+ return isFunction(options) ? (
4200
+ // #8326: extend call and options.name access are considered side-effects
4201
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4202
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4203
+ ) : options;
4197
4204
  }
4198
4205
 
4199
4206
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6231,7 +6238,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6231
6238
  return vm;
6232
6239
  }
6233
6240
  }
6234
- Vue.version = `2.6.14-compat:${"3.3.0-beta.4"}`;
6241
+ Vue.version = `2.6.14-compat:${"3.3.0-beta.5"}`;
6235
6242
  Vue.config = singletonApp.config;
6236
6243
  Vue.use = (p, ...options) => {
6237
6244
  if (p && isFunction(p.install)) {
@@ -10825,7 +10832,7 @@ function isMemoSame(cached, memo) {
10825
10832
  return true;
10826
10833
  }
10827
10834
 
10828
- const version = "3.3.0-beta.4";
10835
+ const version = "3.3.0-beta.5";
10829
10836
  const _ssrUtils = {
10830
10837
  createComponentInstance,
10831
10838
  setupComponent,
@@ -11059,14 +11066,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
11059
11066
  el[key] = value == null ? "" : value;
11060
11067
  return;
11061
11068
  }
11062
- if (key === "value" && el.tagName !== "PROGRESS" && // custom elements may use _value internally
11063
- !el.tagName.includes("-")) {
11069
+ const tag = el.tagName;
11070
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11071
+ !tag.includes("-")) {
11064
11072
  el._value = value;
11073
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
11065
11074
  const newValue = value == null ? "" : value;
11066
- if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to
11067
- // textContent if no value attribute is present. And setting .value for
11068
- // OPTION has no side effect
11069
- el.tagName === "OPTION") {
11075
+ if (oldValue !== newValue) {
11070
11076
  el.value = newValue;
11071
11077
  }
11072
11078
  if (value == null) {
@@ -11108,7 +11114,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
11108
11114
  } catch (e) {
11109
11115
  if (process.env.NODE_ENV !== "production" && !needRemove) {
11110
11116
  warn(
11111
- `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: value ${value} is invalid.`,
11117
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
11112
11118
  e
11113
11119
  );
11114
11120
  }
@@ -12456,7 +12462,7 @@ function injectCompilerOptionsCheck(app) {
12456
12462
  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.
12457
12463
  - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
12458
12464
  - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
12459
- - 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`;
12465
+ - 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`;
12460
12466
  Object.defineProperty(app.config, "compilerOptions", {
12461
12467
  get() {
12462
12468
  warn(msg);
@@ -3018,7 +3018,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3018
3018
  );
3019
3019
  setActiveBranch(suspense, vnode.ssFallback);
3020
3020
  } else {
3021
- suspense.resolve();
3021
+ suspense.resolve(false, true);
3022
3022
  }
3023
3023
  }
3024
3024
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -3177,7 +3177,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3177
3177
  }
3178
3178
  let hasWarned = false;
3179
3179
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3180
- var _a;
3181
3180
  if (!hasWarned) {
3182
3181
  hasWarned = true;
3183
3182
  console[console.info ? "info" : "log"](
@@ -3192,10 +3191,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3192
3191
  o: { parentNode, remove }
3193
3192
  } = rendererInternals;
3194
3193
  let parentSuspenseId;
3195
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3194
+ const isSuspensible = isVNodeSuspensible(vnode);
3196
3195
  if (isSuspensible) {
3197
3196
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
3198
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
3197
+ parentSuspenseId = parentSuspense.pendingId;
3199
3198
  parentSuspense.deps++;
3200
3199
  }
3201
3200
  }
@@ -3220,7 +3219,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3220
3219
  isHydrating,
3221
3220
  isUnmounted: false,
3222
3221
  effects: [],
3223
- resolve(resume = false) {
3222
+ resolve(resume = false, sync = false) {
3224
3223
  {
3225
3224
  if (!resume && !suspense.pendingBranch) {
3226
3225
  throw new Error(
@@ -3282,7 +3281,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3282
3281
  if (isSuspensible) {
3283
3282
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3284
3283
  parentSuspense.deps--;
3285
- if (parentSuspense.deps === 0) {
3284
+ if (parentSuspense.deps === 0 && !sync) {
3286
3285
  parentSuspense.resolve();
3287
3286
  }
3288
3287
  }
@@ -3492,6 +3491,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3492
3491
  updateHOCHostEl(parentComponent, el);
3493
3492
  }
3494
3493
  }
3494
+ function isVNodeSuspensible(vnode) {
3495
+ var _a;
3496
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3497
+ }
3495
3498
 
3496
3499
  const legacyDirectiveHookMap = {
3497
3500
  beforeMount: "bind",
@@ -4156,7 +4159,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4156
4159
  }
4157
4160
 
4158
4161
  function defineComponent(options, extraOptions) {
4159
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
4162
+ return isFunction(options) ? (
4163
+ // #8326: extend call and options.name access are considered side-effects
4164
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4165
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4166
+ ) : options;
4160
4167
  }
4161
4168
 
4162
4169
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6186,7 +6193,7 @@ If this is a native custom element, make sure to exclude it from component resol
6186
6193
  return vm;
6187
6194
  }
6188
6195
  }
6189
- Vue.version = `2.6.14-compat:${"3.3.0-beta.4"}`;
6196
+ Vue.version = `2.6.14-compat:${"3.3.0-beta.5"}`;
6190
6197
  Vue.config = singletonApp.config;
6191
6198
  Vue.use = (p, ...options) => {
6192
6199
  if (p && isFunction(p.install)) {
@@ -10709,7 +10716,7 @@ Component that was made reactive: `,
10709
10716
  return true;
10710
10717
  }
10711
10718
 
10712
- const version = "3.3.0-beta.4";
10719
+ const version = "3.3.0-beta.5";
10713
10720
  const ssrUtils = null;
10714
10721
  const resolveFilter = resolveFilter$1 ;
10715
10722
  const _compatUtils = {
@@ -10935,14 +10942,13 @@ Component that was made reactive: `,
10935
10942
  el[key] = value == null ? "" : value;
10936
10943
  return;
10937
10944
  }
10938
- if (key === "value" && el.tagName !== "PROGRESS" && // custom elements may use _value internally
10939
- !el.tagName.includes("-")) {
10945
+ const tag = el.tagName;
10946
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
10947
+ !tag.includes("-")) {
10940
10948
  el._value = value;
10949
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
10941
10950
  const newValue = value == null ? "" : value;
10942
- if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to
10943
- // textContent if no value attribute is present. And setting .value for
10944
- // OPTION has no side effect
10945
- el.tagName === "OPTION") {
10951
+ if (oldValue !== newValue) {
10946
10952
  el.value = newValue;
10947
10953
  }
10948
10954
  if (value == null) {
@@ -10984,7 +10990,7 @@ Component that was made reactive: `,
10984
10990
  } catch (e) {
10985
10991
  if (!needRemove) {
10986
10992
  warn(
10987
- `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: value ${value} is invalid.`,
10993
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
10988
10994
  e
10989
10995
  );
10990
10996
  }
@@ -12279,7 +12285,7 @@ Component that was made reactive: `,
12279
12285
  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.
12280
12286
  - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
12281
12287
  - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
12282
- - 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`;
12288
+ - 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`;
12283
12289
  Object.defineProperty(app.config, "compilerOptions", {
12284
12290
  get() {
12285
12291
  warn(msg);