@vue/compat 3.2.35 → 3.2.36

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.
@@ -7179,7 +7179,7 @@ function createCompatVue(createApp, createSingletonApp) {
7179
7179
  return vm;
7180
7180
  }
7181
7181
  }
7182
- Vue.version = `2.6.14-compat:${"3.2.35"}`;
7182
+ Vue.version = `2.6.14-compat:${"3.2.36"}`;
7183
7183
  Vue.config = singletonApp.config;
7184
7184
  Vue.use = (p, ...options) => {
7185
7185
  if (p && isFunction(p.install)) {
@@ -7346,9 +7346,11 @@ function installLegacyAPIs(app) {
7346
7346
  });
7347
7347
  }
7348
7348
  function applySingletonAppMutations(app) {
7349
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
7349
+ // copy over asset registries and deopt flag
7350
+ app._context.mixins = [...singletonApp._context.mixins];
7351
+ ['components', 'directives', 'filters'].forEach(key => {
7350
7352
  // @ts-ignore
7351
- app._context[key] = singletonApp._context[key];
7353
+ app._context[key] = Object.create(singletonApp._context[key]);
7352
7354
  });
7353
7355
  // copy over global config mutations
7354
7356
  isCopyingConfig = true;
@@ -7361,7 +7363,7 @@ function applySingletonAppMutations(app) {
7361
7363
  }
7362
7364
  const val = singletonApp.config[key];
7363
7365
  // @ts-ignore
7364
- app.config[key] = val;
7366
+ app.config[key] = isObject(val) ? Object.create(val) : val;
7365
7367
  // compat for runtime ignoredElements -> isCustomElement
7366
7368
  if (key === 'ignoredElements' &&
7367
7369
  isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
@@ -11250,7 +11252,7 @@ function isMemoSame(cached, memo) {
11250
11252
  }
11251
11253
 
11252
11254
  // Core API ------------------------------------------------------------------
11253
- const version = "3.2.35";
11255
+ const version = "3.2.36";
11254
11256
  const _ssrUtils = {
11255
11257
  createComponentInstance,
11256
11258
  setupComponent,
@@ -11615,7 +11617,7 @@ const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
11615
11617
  // if the low-res timestamp which is bigger than the event timestamp
11616
11618
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11617
11619
  // and we need to use the hi-res version for event listeners as well.
11618
- _getNow = () => performance.now();
11620
+ _getNow = performance.now.bind(performance);
11619
11621
  }
11620
11622
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11621
11623
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -12167,9 +12169,8 @@ function resolveTransitionProps(rawProps) {
12167
12169
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12168
12170
  done && done();
12169
12171
  };
12170
- let isLeaving = false;
12171
12172
  const finishLeave = (el, done) => {
12172
- isLeaving = false;
12173
+ el._isLeaving = false;
12173
12174
  removeTransitionClass(el, leaveFromClass);
12174
12175
  removeTransitionClass(el, leaveToClass);
12175
12176
  removeTransitionClass(el, leaveActiveClass);
@@ -12212,7 +12213,7 @@ function resolveTransitionProps(rawProps) {
12212
12213
  onEnter: makeEnterHook(false),
12213
12214
  onAppear: makeEnterHook(true),
12214
12215
  onLeave(el, done) {
12215
- isLeaving = true;
12216
+ el._isLeaving = true;
12216
12217
  const resolve = () => finishLeave(el, done);
12217
12218
  addTransitionClass(el, leaveFromClass);
12218
12219
  if (legacyClassEnabled) {
@@ -12222,7 +12223,7 @@ function resolveTransitionProps(rawProps) {
12222
12223
  forceReflow();
12223
12224
  addTransitionClass(el, leaveActiveClass);
12224
12225
  nextFrame(() => {
12225
- if (!isLeaving) {
12226
+ if (!el._isLeaving) {
12226
12227
  // cancelled
12227
12228
  return;
12228
12229
  }
@@ -14968,6 +14969,14 @@ function getConstantType(node, context) {
14968
14969
  // static then they don't need to be blocks since there will be no
14969
14970
  // nested updates.
14970
14971
  if (codegenNode.isBlock) {
14972
+ // except set custom directives.
14973
+ for (let i = 0; i < node.props.length; i++) {
14974
+ const p = node.props[i];
14975
+ if (p.type === 7 /* DIRECTIVE */) {
14976
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
14977
+ return 0 /* NOT_CONSTANT */;
14978
+ }
14979
+ }
14971
14980
  context.removeHelper(OPEN_BLOCK);
14972
14981
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
14973
14982
  codegenNode.isBlock = false;
@@ -7111,7 +7111,7 @@ var Vue = (function () {
7111
7111
  return vm;
7112
7112
  }
7113
7113
  }
7114
- Vue.version = `2.6.14-compat:${"3.2.35"}`;
7114
+ Vue.version = `2.6.14-compat:${"3.2.36"}`;
7115
7115
  Vue.config = singletonApp.config;
7116
7116
  Vue.use = (p, ...options) => {
7117
7117
  if (p && isFunction(p.install)) {
@@ -7277,9 +7277,11 @@ var Vue = (function () {
7277
7277
  });
7278
7278
  }
7279
7279
  function applySingletonAppMutations(app) {
7280
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
7280
+ // copy over asset registries and deopt flag
7281
+ app._context.mixins = [...singletonApp._context.mixins];
7282
+ ['components', 'directives', 'filters'].forEach(key => {
7281
7283
  // @ts-ignore
7282
- app._context[key] = singletonApp._context[key];
7284
+ app._context[key] = Object.create(singletonApp._context[key]);
7283
7285
  });
7284
7286
  // copy over global config mutations
7285
7287
  isCopyingConfig = true;
@@ -7292,7 +7294,7 @@ var Vue = (function () {
7292
7294
  }
7293
7295
  const val = singletonApp.config[key];
7294
7296
  // @ts-ignore
7295
- app.config[key] = val;
7297
+ app.config[key] = isObject(val) ? Object.create(val) : val;
7296
7298
  // compat for runtime ignoredElements -> isCustomElement
7297
7299
  if (key === 'ignoredElements' &&
7298
7300
  isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
@@ -11095,7 +11097,7 @@ var Vue = (function () {
11095
11097
  }
11096
11098
 
11097
11099
  // Core API ------------------------------------------------------------------
11098
- const version = "3.2.35";
11100
+ const version = "3.2.36";
11099
11101
  /**
11100
11102
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11101
11103
  * @internal
@@ -11451,7 +11453,7 @@ var Vue = (function () {
11451
11453
  // if the low-res timestamp which is bigger than the event timestamp
11452
11454
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11453
11455
  // and we need to use the hi-res version for event listeners as well.
11454
- _getNow = () => performance.now();
11456
+ _getNow = performance.now.bind(performance);
11455
11457
  }
11456
11458
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11457
11459
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -11989,9 +11991,8 @@ var Vue = (function () {
11989
11991
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
11990
11992
  done && done();
11991
11993
  };
11992
- let isLeaving = false;
11993
11994
  const finishLeave = (el, done) => {
11994
- isLeaving = false;
11995
+ el._isLeaving = false;
11995
11996
  removeTransitionClass(el, leaveFromClass);
11996
11997
  removeTransitionClass(el, leaveToClass);
11997
11998
  removeTransitionClass(el, leaveActiveClass);
@@ -12034,7 +12035,7 @@ var Vue = (function () {
12034
12035
  onEnter: makeEnterHook(false),
12035
12036
  onAppear: makeEnterHook(true),
12036
12037
  onLeave(el, done) {
12037
- isLeaving = true;
12038
+ el._isLeaving = true;
12038
12039
  const resolve = () => finishLeave(el, done);
12039
12040
  addTransitionClass(el, leaveFromClass);
12040
12041
  if (legacyClassEnabled) {
@@ -12044,7 +12045,7 @@ var Vue = (function () {
12044
12045
  forceReflow();
12045
12046
  addTransitionClass(el, leaveActiveClass);
12046
12047
  nextFrame(() => {
12047
- if (!isLeaving) {
12048
+ if (!el._isLeaving) {
12048
12049
  // cancelled
12049
12050
  return;
12050
12051
  }
@@ -14735,6 +14736,14 @@ var Vue = (function () {
14735
14736
  // static then they don't need to be blocks since there will be no
14736
14737
  // nested updates.
14737
14738
  if (codegenNode.isBlock) {
14739
+ // except set custom directives.
14740
+ for (let i = 0; i < node.props.length; i++) {
14741
+ const p = node.props[i];
14742
+ if (p.type === 7 /* DIRECTIVE */) {
14743
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
14744
+ return 0 /* NOT_CONSTANT */;
14745
+ }
14746
+ }
14738
14747
  context.removeHelper(OPEN_BLOCK);
14739
14748
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
14740
14749
  codegenNode.isBlock = false;