@vue/runtime-core 3.2.11 → 3.2.12

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.
@@ -187,335 +187,6 @@ function devtoolsComponentEmit(component, event, params) {
187
187
  exports.devtools.emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
188
188
  }
189
189
 
190
- const deprecationData = {
191
- ["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
192
- message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
193
- `option have been removed. Use createApp(RootComponent).mount() instead.`,
194
- link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`
195
- },
196
- ["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
197
- message: `Vue detected directives on the mount container. ` +
198
- `In Vue 3, the container is no longer considered part of the template ` +
199
- `and will not be processed/replaced.`,
200
- link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
201
- },
202
- ["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
203
- message: `Vue.extend() has been removed in Vue 3. ` +
204
- `Use defineComponent() instead.`,
205
- link: `https://v3.vuejs.org/api/global-api.html#definecomponent`
206
- },
207
- ["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
208
- message: `Vue.prototype is no longer available in Vue 3. ` +
209
- `Use app.config.globalProperties instead.`,
210
- link: `https://v3.vuejs.org/guide/migration/global-api.html#vue-prototype-replaced-by-config-globalproperties`
211
- },
212
- ["GLOBAL_SET" /* GLOBAL_SET */]: {
213
- message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
214
- `Simply use native JavaScript mutations.`
215
- },
216
- ["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
217
- message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
218
- `Simply use native JavaScript mutations.`
219
- },
220
- ["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
221
- message: `Vue.observable() has been removed. ` +
222
- `Use \`import { reactive } from "vue"\` from Composition API instead.`,
223
- link: `https://v3.vuejs.org/api/basic-reactivity.html`
224
- },
225
- ["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
226
- message: `Vue.util has been removed. Please refactor to avoid its usage ` +
227
- `since it was an internal API even in Vue 2.`
228
- },
229
- ["CONFIG_SILENT" /* CONFIG_SILENT */]: {
230
- message: `config.silent has been removed because it is not good practice to ` +
231
- `intentionally suppress warnings. You can use your browser console's ` +
232
- `filter features to focus on relevant messages.`
233
- },
234
- ["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
235
- message: `config.devtools has been removed. To enable devtools for ` +
236
- `production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
237
- link: `https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags`
238
- },
239
- ["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
240
- message: `config.keyCodes has been removed. ` +
241
- `In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
242
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
243
- },
244
- ["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
245
- message: `config.productionTip has been removed.`,
246
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed`
247
- },
248
- ["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
249
- message: () => {
250
- let msg = `config.ignoredElements has been removed.`;
251
- if (isRuntimeOnly()) {
252
- msg += ` Pass the "isCustomElement" option to @vue/compiler-dom instead.`;
253
- }
254
- else {
255
- msg += ` Use config.isCustomElement instead.`;
256
- }
257
- return msg;
258
- },
259
- link: `https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
260
- },
261
- ["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
262
- // this warning is only relevant in the full build when using runtime
263
- // compilation, so it's put in the runtime compatConfig list.
264
- message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
265
- `"preserve". To suppress this warning, provide an explicit value for ` +
266
- `\`config.compilerOptions.whitespace\`.`
267
- },
268
- ["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
269
- message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
270
- `Use custom merge functions instead.`
271
- },
272
- ["INSTANCE_SET" /* INSTANCE_SET */]: {
273
- message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
274
- `Simply use native JavaScript mutations.`
275
- },
276
- ["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
277
- message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
278
- `Simply use native JavaScript mutations.`
279
- },
280
- ["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
281
- message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
282
- link: `https://v3.vuejs.org/api/application-api.html#unmount`
283
- },
284
- ["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
285
- message: `vm.$on/$once/$off() have been removed. ` +
286
- `Use an external event emitter library instead.`,
287
- link: `https://v3.vuejs.org/guide/migration/events-api.html`
288
- },
289
- ["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
290
- message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
291
- `use the "vnode" prefix instead of "hook:". For example, @${event} ` +
292
- `should be changed to @vnode-${event.slice(5)}. ` +
293
- `From JavaScript, use Composition API to dynamically register lifecycle ` +
294
- `hooks.`,
295
- link: `https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html`
296
- },
297
- ["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
298
- message: `vm.$children has been removed. Consider refactoring your logic ` +
299
- `to avoid relying on direct access to child components.`,
300
- link: `https://v3.vuejs.org/guide/migration/children.html`
301
- },
302
- ["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
303
- message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
304
- `included in vm.$attrs and it is no longer necessary to separately use ` +
305
- `v-on="$listeners" if you are already using v-bind="$attrs". ` +
306
- `(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
307
- link: `https://v3.vuejs.org/guide/migration/listeners-removed.html`
308
- },
309
- ["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
310
- message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
311
- link: `https://v3.vuejs.org/guide/migration/slots-unification.html`
312
- },
313
- ["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
314
- message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
315
- `relying on class/style fallthrough from parent. In Vue 3, class/style ` +
316
- `are now included in $attrs and will no longer fallthrough when ` +
317
- `inheritAttrs is false. If you are already using v-bind="$attrs" on ` +
318
- `component root it should render the same end result. ` +
319
- `If you are binding $attrs to a non-root element and expecting ` +
320
- `class/style to fallthrough on root, you will need to now manually bind ` +
321
- `them on root via :class="$attrs.class".`,
322
- link: `https://v3.vuejs.org/guide/migration/attrs-includes-class-style.html`
323
- },
324
- ["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
325
- message: `The "data" option can no longer be a plain object. ` +
326
- `Always use a function.`,
327
- link: `https://v3.vuejs.org/guide/migration/data-option.html`
328
- },
329
- ["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
330
- message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
331
- `In Vue 3, data keys are merged shallowly and will override one another.`,
332
- link: `https://v3.vuejs.org/guide/migration/data-option.html#mixin-merge-behavior-change`
333
- },
334
- ["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
335
- message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
336
- },
337
- ["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
338
- message: `\`destroyed\` has been renamed to \`unmounted\`.`
339
- },
340
- ["WATCH_ARRAY" /* WATCH_ARRAY */]: {
341
- message: `"watch" option or vm.$watch on an array value will no longer ` +
342
- `trigger on array mutation unless the "deep" option is specified. ` +
343
- `If current usage is intended, you can disable the compat behavior and ` +
344
- `suppress this warning with:` +
345
- `\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
346
- link: `https://v3.vuejs.org/guide/migration/watch.html`
347
- },
348
- ["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
349
- message: (key) => `props default value function no longer has access to "this". The compat ` +
350
- `build only offers access to this.$options.` +
351
- `(found in prop "${key}")`,
352
- link: `https://v3.vuejs.org/guide/migration/props-default-this.html`
353
- },
354
- ["CUSTOM_DIR" /* CUSTOM_DIR */]: {
355
- message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
356
- `Use "${newHook}" instead.`,
357
- link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
358
- },
359
- ["V_FOR_REF" /* V_FOR_REF */]: {
360
- message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
361
- `Consider using function refs or refactor to avoid ref usage altogether.`,
362
- link: `https://v3.vuejs.org/guide/migration/array-refs.html`
363
- },
364
- ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
365
- message: `Using keyCode as v-on modifier is no longer supported. ` +
366
- `Use kebab-case key name modifiers instead.`,
367
- link: `https://v3.vuejs.org/guide/migration/keycode-modifiers.html`
368
- },
369
- ["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
370
- message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
371
- `${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
372
- `use \`null\` or \`undefined\` instead. If the usage is intended, ` +
373
- `you can disable the compat behavior and suppress this warning with:` +
374
- `\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
375
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
376
- },
377
- ["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
378
- message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
379
- `${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
380
- `Always use explicit "true" or "false" values for enumerated attributes. ` +
381
- `If the usage is intended, ` +
382
- `you can disable the compat behavior and suppress this warning with:` +
383
- `\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
384
- link: `https://v3.vuejs.org/guide/migration/attribute-coercion.html`
385
- },
386
- ["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
387
- message: `` // this feature cannot be runtime-detected
388
- },
389
- ["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
390
- message: `<TransitionGroup> no longer renders a root <span> element by ` +
391
- `default if no "tag" prop is specified. If you do not rely on the span ` +
392
- `for styling, you can disable the compat behavior and suppress this ` +
393
- `warning with:` +
394
- `\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
395
- link: `https://v3.vuejs.org/guide/migration/transition-group.html`
396
- },
397
- ["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
398
- message: (comp) => {
399
- const name = getComponentName(comp);
400
- return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
401
- `in Vue 3. Plain functions will be treated as functional components in ` +
402
- `non-compat build. If you have already migrated all async component ` +
403
- `usage and intend to use plain functions for functional components, ` +
404
- `you can disable the compat behavior and suppress this ` +
405
- `warning with:` +
406
- `\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
407
- },
408
- link: `https://v3.vuejs.org/guide/migration/async-components.html`
409
- },
410
- ["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
411
- message: (comp) => {
412
- const name = getComponentName(comp);
413
- return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
414
- `option has been removed. NOTE: Before migrating to use plain ` +
415
- `functions for functional components, first make sure that all async ` +
416
- `components usage have been migrated and its compat behavior has ` +
417
- `been disabled.`);
418
- },
419
- link: `https://v3.vuejs.org/guide/migration/functional-components.html`
420
- },
421
- ["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
422
- message: (comp) => {
423
- const configMsg = `opt-in to ` +
424
- `Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
425
- if (comp.props &&
426
- (shared.isArray(comp.props)
427
- ? comp.props.includes('modelValue')
428
- : shared.hasOwn(comp.props, 'modelValue'))) {
429
- return (`Component delcares "modelValue" prop, which is Vue 3 usage, but ` +
430
- `is running under Vue 2 compat v-model behavior. You can ${configMsg}`);
431
- }
432
- return (`v-model usage on component has changed in Vue 3. Component that expects ` +
433
- `to work with v-model should now use the "modelValue" prop and emit the ` +
434
- `"update:modelValue" event. You can update the usage and then ${configMsg}`);
435
- },
436
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
437
- },
438
- ["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
439
- message: `Vue 3's render function API has changed. ` +
440
- `You can opt-in to the new API with:` +
441
- `\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
442
- `\n (This can also be done per-component via the "compatConfig" option.)`,
443
- link: `https://v3.vuejs.org/guide/migration/render-function-api.html`
444
- },
445
- ["FILTERS" /* FILTERS */]: {
446
- message: `filters have been removed in Vue 3. ` +
447
- `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
448
- `Use method calls or computed properties instead.`,
449
- link: `https://v3.vuejs.org/guide/migration/filters.html`
450
- },
451
- ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
452
- message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
453
- `If you are seeing this warning only due to a dependency, you can ` +
454
- `suppress this warning via { PRIVATE_APIS: 'supress-warning' }.`
455
- }
456
- };
457
- const instanceWarned = Object.create(null);
458
- const warnCount = Object.create(null);
459
- function warnDeprecation(key, instance, ...args) {
460
- instance = instance || getCurrentInstance();
461
- // check user config
462
- const config = getCompatConfigForKey(key, instance);
463
- if (config === 'suppress-warning') {
464
- return;
465
- }
466
- const dupKey = key + args.join('');
467
- let compId = instance && formatComponentName(instance, instance.type);
468
- if (compId === 'Anonymous' && instance) {
469
- compId = instance.uid;
470
- }
471
- // skip if the same warning is emitted for the same component type
472
- const componentDupKey = dupKey + compId;
473
- if (componentDupKey in instanceWarned) {
474
- return;
475
- }
476
- instanceWarned[componentDupKey] = true;
477
- // same warning, but different component. skip the long message and just
478
- // log the key and count.
479
- if (dupKey in warnCount) {
480
- warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
481
- return;
482
- }
483
- warnCount[dupKey] = 0;
484
- const { message, link } = deprecationData[key];
485
- warn(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`);
486
- if (!isCompatEnabled(key, instance, true)) {
487
- console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +
488
- `lead to runtime errors.`);
489
- }
490
- }
491
- const globalCompatConfig = {
492
- MODE: 2
493
- };
494
- function getCompatConfigForKey(key, instance) {
495
- const instanceConfig = instance && instance.type.compatConfig;
496
- if (instanceConfig && key in instanceConfig) {
497
- return instanceConfig[key];
498
- }
499
- return globalCompatConfig[key];
500
- }
501
- function isCompatEnabled(key, instance, enableForBuiltIn = false) {
502
- // skip compat for built-in components
503
- if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
504
- return false;
505
- }
506
- const rawMode = getCompatConfigForKey('MODE', instance) || 2;
507
- const val = getCompatConfigForKey(key, instance);
508
- const mode = shared.isFunction(rawMode)
509
- ? rawMode(instance && instance.type)
510
- : rawMode;
511
- if (mode === 2) {
512
- return val !== false;
513
- }
514
- else {
515
- return val === true || val === 'suppress-warning';
516
- }
517
- }
518
-
519
190
  function emit(instance, event, ...rawArgs) {
520
191
  const props = instance.vnode.props || shared.EMPTY_OBJ;
521
192
  {
@@ -741,12 +412,12 @@ function markAttrsAccessed() {
741
412
  function renderComponentRoot(instance) {
742
413
  const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;
743
414
  let result;
415
+ let fallthroughAttrs;
744
416
  const prev = setCurrentRenderingInstance(instance);
745
417
  {
746
418
  accessedAttrs = false;
747
419
  }
748
420
  try {
749
- let fallthroughAttrs;
750
421
  if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
751
422
  // withProxy is a proxy with a different `has` trap only for
752
423
  // runtime-compiled render functions using `with` block.
@@ -777,97 +448,91 @@ function renderComponentRoot(instance) {
777
448
  ? attrs
778
449
  : getFunctionalFallthrough(attrs);
779
450
  }
780
- // attr merging
781
- // in dev mode, comments are preserved, and it's possible for a template
782
- // to have comments along side the root element which makes it a fragment
783
- let root = result;
784
- let setRoot = undefined;
785
- if (true &&
786
- result.patchFlag > 0 &&
787
- result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
788
- ;
789
- [root, setRoot] = getChildRoot(result);
790
- }
791
- if (fallthroughAttrs && inheritAttrs !== false) {
792
- const keys = Object.keys(fallthroughAttrs);
793
- const { shapeFlag } = root;
794
- if (keys.length) {
795
- if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
796
- if (propsOptions && keys.some(shared.isModelListener)) {
797
- // If a v-model listener (onUpdate:xxx) has a corresponding declared
798
- // prop, it indicates this component expects to handle v-model and
799
- // it should not fallthrough.
800
- // related: #1543, #1643, #1989
801
- fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
802
- }
803
- root = cloneVNode(root, fallthroughAttrs);
804
- }
805
- else if (true && !accessedAttrs && root.type !== Comment) {
806
- const allAttrs = Object.keys(attrs);
807
- const eventAttrs = [];
808
- const extraAttrs = [];
809
- for (let i = 0, l = allAttrs.length; i < l; i++) {
810
- const key = allAttrs[i];
811
- if (shared.isOn(key)) {
812
- // ignore v-model handlers when they fail to fallthrough
813
- if (!shared.isModelListener(key)) {
814
- // remove `on`, lowercase first letter to reflect event casing
815
- // accurately
816
- eventAttrs.push(key[2].toLowerCase() + key.slice(3));
817
- }
818
- }
819
- else {
820
- extraAttrs.push(key);
451
+ }
452
+ catch (err) {
453
+ blockStack.length = 0;
454
+ handleError(err, instance, 1 /* RENDER_FUNCTION */);
455
+ result = createVNode(Comment);
456
+ }
457
+ // attr merging
458
+ // in dev mode, comments are preserved, and it's possible for a template
459
+ // to have comments along side the root element which makes it a fragment
460
+ let root = result;
461
+ let setRoot = undefined;
462
+ if (result.patchFlag > 0 &&
463
+ result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
464
+ [root, setRoot] = getChildRoot(result);
465
+ }
466
+ if (fallthroughAttrs && inheritAttrs !== false) {
467
+ const keys = Object.keys(fallthroughAttrs);
468
+ const { shapeFlag } = root;
469
+ if (keys.length) {
470
+ if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
471
+ if (propsOptions && keys.some(shared.isModelListener)) {
472
+ // If a v-model listener (onUpdate:xxx) has a corresponding declared
473
+ // prop, it indicates this component expects to handle v-model and
474
+ // it should not fallthrough.
475
+ // related: #1543, #1643, #1989
476
+ fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
477
+ }
478
+ root = cloneVNode(root, fallthroughAttrs);
479
+ }
480
+ else if (!accessedAttrs && root.type !== Comment) {
481
+ const allAttrs = Object.keys(attrs);
482
+ const eventAttrs = [];
483
+ const extraAttrs = [];
484
+ for (let i = 0, l = allAttrs.length; i < l; i++) {
485
+ const key = allAttrs[i];
486
+ if (shared.isOn(key)) {
487
+ // ignore v-model handlers when they fail to fallthrough
488
+ if (!shared.isModelListener(key)) {
489
+ // remove `on`, lowercase first letter to reflect event casing
490
+ // accurately
491
+ eventAttrs.push(key[2].toLowerCase() + key.slice(3));
821
492
  }
822
493
  }
823
- if (extraAttrs.length) {
824
- warn(`Extraneous non-props attributes (` +
825
- `${extraAttrs.join(', ')}) ` +
826
- `were passed to component but could not be automatically inherited ` +
827
- `because component renders fragment or text root nodes.`);
828
- }
829
- if (eventAttrs.length) {
830
- warn(`Extraneous non-emits event listeners (` +
831
- `${eventAttrs.join(', ')}) ` +
832
- `were passed to component but could not be automatically inherited ` +
833
- `because component renders fragment or text root nodes. ` +
834
- `If the listener is intended to be a component custom event listener only, ` +
835
- `declare it using the "emits" option.`);
494
+ else {
495
+ extraAttrs.push(key);
836
496
  }
837
497
  }
498
+ if (extraAttrs.length) {
499
+ warn(`Extraneous non-props attributes (` +
500
+ `${extraAttrs.join(', ')}) ` +
501
+ `were passed to component but could not be automatically inherited ` +
502
+ `because component renders fragment or text root nodes.`);
503
+ }
504
+ if (eventAttrs.length) {
505
+ warn(`Extraneous non-emits event listeners (` +
506
+ `${eventAttrs.join(', ')}) ` +
507
+ `were passed to component but could not be automatically inherited ` +
508
+ `because component renders fragment or text root nodes. ` +
509
+ `If the listener is intended to be a component custom event listener only, ` +
510
+ `declare it using the "emits" option.`);
511
+ }
838
512
  }
839
513
  }
840
- if (false &&
841
- isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
842
- vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
843
- root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
844
- // inherit directives
845
- if (vnode.dirs) {
846
- if (true && !isElementRoot(root)) {
847
- warn(`Runtime directive used on component with non-element root node. ` +
848
- `The directives will not function as intended.`);
849
- }
850
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
851
- }
852
- // inherit transition data
853
- if (vnode.transition) {
854
- if (true && !isElementRoot(root)) {
855
- warn(`Component inside <Transition> renders non-element root node ` +
856
- `that cannot be animated.`);
857
- }
858
- root.transition = vnode.transition;
859
- }
860
- if (true && setRoot) {
861
- setRoot(root);
514
+ }
515
+ // inherit directives
516
+ if (vnode.dirs) {
517
+ if (!isElementRoot(root)) {
518
+ warn(`Runtime directive used on component with non-element root node. ` +
519
+ `The directives will not function as intended.`);
862
520
  }
863
- else {
864
- result = root;
521
+ root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
522
+ }
523
+ // inherit transition data
524
+ if (vnode.transition) {
525
+ if (!isElementRoot(root)) {
526
+ warn(`Component inside <Transition> renders non-element root node ` +
527
+ `that cannot be animated.`);
865
528
  }
529
+ root.transition = vnode.transition;
866
530
  }
867
- catch (err) {
868
- blockStack.length = 0;
869
- handleError(err, instance, 1 /* RENDER_FUNCTION */);
870
- result = createVNode(Comment);
531
+ if (setRoot) {
532
+ setRoot(root);
533
+ }
534
+ else {
535
+ result = root;
871
536
  }
872
537
  setCurrentRenderingInstance(prev);
873
538
  return result;
@@ -1402,8 +1067,8 @@ function normalizeSuspenseChildren(vnode) {
1402
1067
  function normalizeSuspenseSlot(s) {
1403
1068
  let block;
1404
1069
  if (shared.isFunction(s)) {
1405
- const isCompiledSlot = s._c;
1406
- if (isCompiledSlot) {
1070
+ const trackBlock = isBlockTreeEnabled && s._c;
1071
+ if (trackBlock) {
1407
1072
  // disableTracking: false
1408
1073
  // allow block tracking for compiled slots
1409
1074
  // (see ./componentRenderContext.ts)
@@ -1411,7 +1076,7 @@ function normalizeSuspenseSlot(s) {
1411
1076
  openBlock();
1412
1077
  }
1413
1078
  s = s();
1414
- if (isCompiledSlot) {
1079
+ if (trackBlock) {
1415
1080
  s._d = true;
1416
1081
  block = currentBlock;
1417
1082
  closeBlock();
@@ -5507,7 +5172,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
5507
5172
  return Component;
5508
5173
  }
5509
5174
  if (warnMissing && !res) {
5510
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}`);
5175
+ const extra = type === COMPONENTS
5176
+ ? `\nIf this is a native custom element, make sure to exclude it from ` +
5177
+ `component resolution via compilerOptions.isCustomElement.`
5178
+ : ``;
5179
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
5511
5180
  }
5512
5181
  return res;
5513
5182
  }
@@ -6362,17 +6031,19 @@ function exposePropsOnRenderContext(instance) {
6362
6031
  function exposeSetupStateOnRenderContext(instance) {
6363
6032
  const { ctx, setupState } = instance;
6364
6033
  Object.keys(reactivity.toRaw(setupState)).forEach(key => {
6365
- if (!setupState.__isScriptSetup && (key[0] === '$' || key[0] === '_')) {
6366
- warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
6367
- `which are reserved prefixes for Vue internals.`);
6368
- return;
6034
+ if (!setupState.__isScriptSetup) {
6035
+ if (key[0] === '$' || key[0] === '_') {
6036
+ warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
6037
+ `which are reserved prefixes for Vue internals.`);
6038
+ return;
6039
+ }
6040
+ Object.defineProperty(ctx, key, {
6041
+ enumerable: true,
6042
+ configurable: true,
6043
+ get: () => setupState[key],
6044
+ set: shared.NOOP
6045
+ });
6369
6046
  }
6370
- Object.defineProperty(ctx, key, {
6371
- enumerable: true,
6372
- configurable: true,
6373
- get: () => setupState[key],
6374
- set: shared.NOOP
6375
- });
6376
6047
  });
6377
6048
  }
6378
6049
 
@@ -7130,11 +6801,18 @@ function flushJobs(seen) {
7130
6801
  // 2. If a component is unmounted during a parent component's update,
7131
6802
  // its update can be skipped.
7132
6803
  queue.sort((a, b) => getId(a) - getId(b));
6804
+ // conditional usage of checkRecursiveUpdate must be determined out of
6805
+ // try ... catch block since Rollup by default de-optimizes treeshaking
6806
+ // inside try-catch. This can leave all warning code unshaked. Although
6807
+ // they would get eventually shaken by a minifier like terser, some minifiers
6808
+ // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
6809
+ const check = (job) => checkRecursiveUpdates(seen, job)
6810
+ ;
7133
6811
  try {
7134
6812
  for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
7135
6813
  const job = queue[flushIndex];
7136
6814
  if (job && job.active !== false) {
7137
- if (true && checkRecursiveUpdates(seen, job)) {
6815
+ if (true && check(job)) {
7138
6816
  continue;
7139
6817
  }
7140
6818
  // console.log(`running:`, job.id)
@@ -7840,7 +7518,7 @@ function isMemoSame(cached, memo) {
7840
7518
  }
7841
7519
 
7842
7520
  // Core API ------------------------------------------------------------------
7843
- const version = "3.2.11";
7521
+ const version = "3.2.12";
7844
7522
  const _ssrUtils = {
7845
7523
  createComponentInstance,
7846
7524
  setupComponent,