vue 3.2.15 → 3.2.19

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.
@@ -1513,14 +1513,7 @@ const hmrDirtyComponents = new Set();
1513
1513
  // Note: for a component to be eligible for HMR it also needs the __hmrId option
1514
1514
  // to be set so that its instances can be registered / removed.
1515
1515
  {
1516
- const globalObject = typeof global !== 'undefined'
1517
- ? global
1518
- : typeof self !== 'undefined'
1519
- ? self
1520
- : typeof window !== 'undefined'
1521
- ? window
1522
- : {};
1523
- globalObject.__VUE_HMR_RUNTIME__ = {
1516
+ getGlobalThis().__VUE_HMR_RUNTIME__ = {
1524
1517
  createRecord: tryWrap(createRecord),
1525
1518
  rerender: tryWrap(rerender),
1526
1519
  reload: tryWrap(reload)
@@ -7787,9 +7780,11 @@ const isRuntimeOnly = () => !compile;
7787
7780
  function finishComponentSetup(instance, isSSR, skipOptions) {
7788
7781
  const Component = instance.type;
7789
7782
  // template / render function normalization
7783
+ // could be already set when returned from setup()
7790
7784
  if (!instance.render) {
7791
- // could be set from setup()
7792
- if (compile && !Component.render) {
7785
+ // only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
7786
+ // is done by server-renderer
7787
+ if (!isSSR && compile && !Component.render) {
7793
7788
  const template = Component.template;
7794
7789
  if (template) {
7795
7790
  {
@@ -8988,7 +8983,7 @@ function isMemoSame(cached, memo) {
8988
8983
  }
8989
8984
 
8990
8985
  // Core API ------------------------------------------------------------------
8991
- const version = "3.2.15";
8986
+ const version = "3.2.19";
8992
8987
  /**
8993
8988
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
8994
8989
  * @internal
@@ -10610,7 +10605,11 @@ function normalizeContainer(container) {
10610
10605
  warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
10611
10606
  }
10612
10607
  return container;
10613
- }
10608
+ }
10609
+ /**
10610
+ * @internal
10611
+ */
10612
+ const initDirectivesForSSR = NOOP;
10614
10613
 
10615
10614
  var runtimeDom = /*#__PURE__*/Object.freeze({
10616
10615
  __proto__: null,
@@ -10618,6 +10617,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
10618
10617
  hydrate: hydrate,
10619
10618
  createApp: createApp,
10620
10619
  createSSRApp: createSSRApp,
10620
+ initDirectivesForSSR: initDirectivesForSSR,
10621
10621
  defineCustomElement: defineCustomElement,
10622
10622
  defineSSRCustomElement: defineSSRCustomElement,
10623
10623
  VueElement: VueElement,
@@ -12815,7 +12815,7 @@ function createStructuralDirectiveTransform(name, fn) {
12815
12815
  }
12816
12816
 
12817
12817
  const PURE_ANNOTATION = `/*#__PURE__*/`;
12818
- function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
12818
+ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
12819
12819
  const context = {
12820
12820
  mode,
12821
12821
  prefixIdentifiers,
@@ -12825,6 +12825,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
12825
12825
  optimizeImports,
12826
12826
  runtimeGlobalName,
12827
12827
  runtimeModuleName,
12828
+ ssrRuntimeModuleName,
12828
12829
  ssr,
12829
12830
  isTS,
12830
12831
  inSSR,
@@ -12945,7 +12946,7 @@ function generate(ast, options = {}) {
12945
12946
  };
12946
12947
  }
12947
12948
  function genFunctionPreamble(ast, context) {
12948
- const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
12949
+ const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
12949
12950
  const VueBinding = runtimeGlobalName;
12950
12951
  const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
12951
12952
  // Generate const declaration for helpers
@@ -15602,4 +15603,4 @@ function compileToFunction(template, options) {
15602
15603
  }
15603
15604
  registerRuntimeCompiler(compileToFunction);
15604
15605
 
15605
- export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
15606
+ export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };