@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.
@@ -3097,7 +3097,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
3097
3097
  );
3098
3098
  setActiveBranch(suspense, vnode.ssFallback);
3099
3099
  } else {
3100
- suspense.resolve();
3100
+ suspense.resolve(false, true);
3101
3101
  }
3102
3102
  }
3103
3103
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -3256,7 +3256,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
3256
3256
  }
3257
3257
  let hasWarned = false;
3258
3258
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3259
- var _a;
3260
3259
  if (process.env.NODE_ENV !== "production" && true && !hasWarned) {
3261
3260
  hasWarned = true;
3262
3261
  console[console.info ? "info" : "log"](
@@ -3271,10 +3270,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3271
3270
  o: { parentNode, remove }
3272
3271
  } = rendererInternals;
3273
3272
  let parentSuspenseId;
3274
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3273
+ const isSuspensible = isVNodeSuspensible(vnode);
3275
3274
  if (isSuspensible) {
3276
3275
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
3277
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
3276
+ parentSuspenseId = parentSuspense.pendingId;
3278
3277
  parentSuspense.deps++;
3279
3278
  }
3280
3279
  }
@@ -3299,7 +3298,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3299
3298
  isHydrating,
3300
3299
  isUnmounted: false,
3301
3300
  effects: [],
3302
- resolve(resume = false) {
3301
+ resolve(resume = false, sync = false) {
3303
3302
  if (process.env.NODE_ENV !== "production") {
3304
3303
  if (!resume && !suspense.pendingBranch) {
3305
3304
  throw new Error(
@@ -3361,7 +3360,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
3361
3360
  if (isSuspensible) {
3362
3361
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3363
3362
  parentSuspense.deps--;
3364
- if (parentSuspense.deps === 0) {
3363
+ if (parentSuspense.deps === 0 && !sync) {
3365
3364
  parentSuspense.resolve();
3366
3365
  }
3367
3366
  }
@@ -3571,6 +3570,10 @@ function setActiveBranch(suspense, branch) {
3571
3570
  updateHOCHostEl(parentComponent, el);
3572
3571
  }
3573
3572
  }
3573
+ function isVNodeSuspensible(vnode) {
3574
+ var _a;
3575
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3576
+ }
3574
3577
 
3575
3578
  const legacyDirectiveHookMap = {
3576
3579
  beforeMount: "bind",
@@ -4258,7 +4261,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4258
4261
  }
4259
4262
 
4260
4263
  function defineComponent(options, extraOptions) {
4261
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
4264
+ return isFunction(options) ? (
4265
+ // #8326: extend call and options.name access are considered side-effects
4266
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4267
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4268
+ ) : options;
4262
4269
  }
4263
4270
 
4264
4271
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6296,7 +6303,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6296
6303
  return vm;
6297
6304
  }
6298
6305
  }
6299
- Vue.version = `2.6.14-compat:${"3.3.0-beta.4"}`;
6306
+ Vue.version = `2.6.14-compat:${"3.3.0-beta.5"}`;
6300
6307
  Vue.config = singletonApp.config;
6301
6308
  Vue.use = (p, ...options) => {
6302
6309
  if (p && isFunction(p.install)) {
@@ -10890,7 +10897,7 @@ function isMemoSame(cached, memo) {
10890
10897
  return true;
10891
10898
  }
10892
10899
 
10893
- const version = "3.3.0-beta.4";
10900
+ const version = "3.3.0-beta.5";
10894
10901
  const _ssrUtils = {
10895
10902
  createComponentInstance,
10896
10903
  setupComponent,
@@ -11124,14 +11131,13 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
11124
11131
  el[key] = value == null ? "" : value;
11125
11132
  return;
11126
11133
  }
11127
- if (key === "value" && el.tagName !== "PROGRESS" && // custom elements may use _value internally
11128
- !el.tagName.includes("-")) {
11134
+ const tag = el.tagName;
11135
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11136
+ !tag.includes("-")) {
11129
11137
  el._value = value;
11138
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
11130
11139
  const newValue = value == null ? "" : value;
11131
- if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to
11132
- // textContent if no value attribute is present. And setting .value for
11133
- // OPTION has no side effect
11134
- el.tagName === "OPTION") {
11140
+ if (oldValue !== newValue) {
11135
11141
  el.value = newValue;
11136
11142
  }
11137
11143
  if (value == null) {
@@ -11173,7 +11179,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
11173
11179
  } catch (e) {
11174
11180
  if (process.env.NODE_ENV !== "production" && !needRemove) {
11175
11181
  warn(
11176
- `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: value ${value} is invalid.`,
11182
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
11177
11183
  e
11178
11184
  );
11179
11185
  }
@@ -12521,7 +12527,7 @@ function injectCompilerOptionsCheck(app) {
12521
12527
  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.
12522
12528
  - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
12523
12529
  - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
12524
- - 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`;
12530
+ - 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`;
12525
12531
  Object.defineProperty(app.config, "compilerOptions", {
12526
12532
  get() {
12527
12533
  warn(msg);
@@ -3083,7 +3083,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3083
3083
  );
3084
3084
  setActiveBranch(suspense, vnode.ssFallback);
3085
3085
  } else {
3086
- suspense.resolve();
3086
+ suspense.resolve(false, true);
3087
3087
  }
3088
3088
  }
3089
3089
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -3242,7 +3242,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3242
3242
  }
3243
3243
  let hasWarned = false;
3244
3244
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3245
- var _a;
3246
3245
  if (!hasWarned) {
3247
3246
  hasWarned = true;
3248
3247
  console[console.info ? "info" : "log"](
@@ -3257,10 +3256,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3257
3256
  o: { parentNode, remove }
3258
3257
  } = rendererInternals;
3259
3258
  let parentSuspenseId;
3260
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3259
+ const isSuspensible = isVNodeSuspensible(vnode);
3261
3260
  if (isSuspensible) {
3262
3261
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
3263
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
3262
+ parentSuspenseId = parentSuspense.pendingId;
3264
3263
  parentSuspense.deps++;
3265
3264
  }
3266
3265
  }
@@ -3285,7 +3284,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3285
3284
  isHydrating,
3286
3285
  isUnmounted: false,
3287
3286
  effects: [],
3288
- resolve(resume = false) {
3287
+ resolve(resume = false, sync = false) {
3289
3288
  {
3290
3289
  if (!resume && !suspense.pendingBranch) {
3291
3290
  throw new Error(
@@ -3347,7 +3346,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3347
3346
  if (isSuspensible) {
3348
3347
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
3349
3348
  parentSuspense.deps--;
3350
- if (parentSuspense.deps === 0) {
3349
+ if (parentSuspense.deps === 0 && !sync) {
3351
3350
  parentSuspense.resolve();
3352
3351
  }
3353
3352
  }
@@ -3557,6 +3556,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3557
3556
  updateHOCHostEl(parentComponent, el);
3558
3557
  }
3559
3558
  }
3559
+ function isVNodeSuspensible(vnode) {
3560
+ var _a;
3561
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
3562
+ }
3560
3563
 
3561
3564
  const legacyDirectiveHookMap = {
3562
3565
  beforeMount: "bind",
@@ -4221,7 +4224,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4221
4224
  }
4222
4225
 
4223
4226
  function defineComponent(options, extraOptions) {
4224
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
4227
+ return isFunction(options) ? (
4228
+ // #8326: extend call and options.name access are considered side-effects
4229
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
4230
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
4231
+ ) : options;
4225
4232
  }
4226
4233
 
4227
4234
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6251,7 +6258,7 @@ If this is a native custom element, make sure to exclude it from component resol
6251
6258
  return vm;
6252
6259
  }
6253
6260
  }
6254
- Vue.version = `2.6.14-compat:${"3.3.0-beta.4"}`;
6261
+ Vue.version = `2.6.14-compat:${"3.3.0-beta.5"}`;
6255
6262
  Vue.config = singletonApp.config;
6256
6263
  Vue.use = (p, ...options) => {
6257
6264
  if (p && isFunction(p.install)) {
@@ -10774,7 +10781,7 @@ Component that was made reactive: `,
10774
10781
  return true;
10775
10782
  }
10776
10783
 
10777
- const version = "3.3.0-beta.4";
10784
+ const version = "3.3.0-beta.5";
10778
10785
  const ssrUtils = null;
10779
10786
  const resolveFilter = resolveFilter$1 ;
10780
10787
  const _compatUtils = {
@@ -11000,14 +11007,13 @@ Component that was made reactive: `,
11000
11007
  el[key] = value == null ? "" : value;
11001
11008
  return;
11002
11009
  }
11003
- if (key === "value" && el.tagName !== "PROGRESS" && // custom elements may use _value internally
11004
- !el.tagName.includes("-")) {
11010
+ const tag = el.tagName;
11011
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11012
+ !tag.includes("-")) {
11005
11013
  el._value = value;
11014
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
11006
11015
  const newValue = value == null ? "" : value;
11007
- if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to
11008
- // textContent if no value attribute is present. And setting .value for
11009
- // OPTION has no side effect
11010
- el.tagName === "OPTION") {
11016
+ if (oldValue !== newValue) {
11011
11017
  el.value = newValue;
11012
11018
  }
11013
11019
  if (value == null) {
@@ -11049,7 +11055,7 @@ Component that was made reactive: `,
11049
11055
  } catch (e) {
11050
11056
  if (!needRemove) {
11051
11057
  warn(
11052
- `Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: value ${value} is invalid.`,
11058
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
11053
11059
  e
11054
11060
  );
11055
11061
  }
@@ -12344,7 +12350,7 @@ Component that was made reactive: `,
12344
12350
  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.
12345
12351
  - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
12346
12352
  - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
12347
- - 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`;
12353
+ - 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`;
12348
12354
  Object.defineProperty(app.config, "compilerOptions", {
12349
12355
  get() {
12350
12356
  warn(msg);