@lwc/engine-core 6.3.2 → 6.3.4

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.
@@ -1,6 +1,5 @@
1
1
  import { StylesheetFactory, TemplateStylesheetFactories } from './stylesheet';
2
2
  import { LightningElementConstructor } from './base-lightning-element';
3
- import { VElementData } from './vnodes';
4
3
  type Callback = () => void;
5
4
  export declare const SPACE_CHAR = 32;
6
5
  export declare const EmptyObject: any;
@@ -18,24 +17,5 @@ export declare function cloneAndOmitKey(object: {
18
17
  };
19
18
  export declare function flattenStylesheets(stylesheets: TemplateStylesheetFactories): StylesheetFactory[];
20
19
  export declare function assertNotProd(): void;
21
- export declare function applyTemporaryCompilerV5SlotFix(data: VElementData): VElementData | {
22
- attrs: {
23
- [key: string]: any;
24
- };
25
- slotAssignment: string;
26
- key: import("./vnodes").Key;
27
- external?: boolean | undefined;
28
- ref?: string | undefined;
29
- slotData?: any;
30
- props?: Readonly<Record<string, any>> | undefined;
31
- className?: string | undefined;
32
- style?: string | undefined;
33
- classMap?: Readonly<Record<string, boolean>> | undefined;
34
- styleDecls?: readonly [string, string, boolean][] | undefined;
35
- context?: Readonly<Record<string, Readonly<Record<string, any>>>> | undefined;
36
- on?: Readonly<Record<string, (event: Event) => any>> | undefined;
37
- svg?: boolean | undefined;
38
- renderer?: import("./renderer").RendererAPI | undefined;
39
- };
40
20
  export declare function shouldBeFormAssociated(Ctor: LightningElementConstructor): boolean;
41
21
  export {};
package/dist/index.cjs.js CHANGED
@@ -503,29 +503,6 @@ function assertNotProd() {
503
503
  throw new ReferenceError();
504
504
  }
505
505
  }
506
- // Temporary fix for when the LWC v5 compiler is used in conjunction with a v6+ engine
507
- // The old compiler format used the "slot" attribute in the `data` bag, whereas the new
508
- // format uses the special `slotAssignment` key.
509
- // This should be removed when the LWC v5 compiler is not used anywhere where it could be mismatched
510
- // with another LWC engine version.
511
- // TODO [#3974]: remove temporary logic to support v5 compiler + v6+ engine
512
- function applyTemporaryCompilerV5SlotFix(data) {
513
- if (lwcRuntimeFlags.DISABLE_TEMPORARY_V5_COMPILER_SUPPORT) {
514
- return data;
515
- }
516
- const { attrs } = data;
517
- if (!shared.isUndefined(attrs)) {
518
- const { slot } = attrs;
519
- if (!shared.isUndefined(slot) && !shared.isNull(slot)) {
520
- return {
521
- ...data,
522
- attrs: cloneAndOmitKey(attrs, 'slot'),
523
- slotAssignment: String(slot),
524
- };
525
- }
526
- }
527
- return data;
528
- }
529
506
  function shouldBeFormAssociated(Ctor) {
530
507
  const ctorFormAssociated = Boolean(Ctor.formAssociated);
531
508
  const apiVersion = getComponentAPIVersion(Ctor);
@@ -667,7 +644,6 @@ shared.forEach.call(defaultDefHTMLPropertyNames, (propName) => {
667
644
  * SPDX-License-Identifier: MIT
668
645
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
669
646
  */
670
- /* eslint @lwc/lwc-internal/no-production-assert: "off" */
671
647
  function generateDataDescriptor(options) {
672
648
  return shared.assign({
673
649
  configurable: true,
@@ -4937,8 +4913,6 @@ function h(sel, data, children = EmptyArray) {
4937
4913
  }
4938
4914
  });
4939
4915
  }
4940
- // TODO [#3974]: remove temporary logic to support v5 compiler + v6+ engine
4941
- data = applyTemporaryCompilerV5SlotFix(data);
4942
4916
  const { key, slotAssignment } = data;
4943
4917
  const vnode = {
4944
4918
  type: 2 /* VNodeType.Element */,
@@ -4975,8 +4949,6 @@ function s(slotName, data, children, slotset) {
4975
4949
  }
4976
4950
  const vmBeingRendered = getVMBeingRendered();
4977
4951
  const { renderMode, apiVersion } = vmBeingRendered;
4978
- // TODO [#3974]: remove temporary logic to support v5 compiler + v6+ engine
4979
- data = applyTemporaryCompilerV5SlotFix(data);
4980
4952
  if (!shared.isUndefined(slotset) &&
4981
4953
  !shared.isUndefined(slotset.slotAssignments) &&
4982
4954
  !shared.isUndefined(slotset.slotAssignments[slotName]) &&
@@ -5080,8 +5052,6 @@ function c(sel, Ctor, data, children = EmptyArray) {
5080
5052
  });
5081
5053
  }
5082
5054
  }
5083
- // TODO [#3974]: remove temporary logic to support v5 compiler + v6+ engine
5084
- data = applyTemporaryCompilerV5SlotFix(data);
5085
5055
  const { key, slotAssignment } = data;
5086
5056
  let elm, aChildren, vm;
5087
5057
  const vnode = {
@@ -5920,7 +5890,7 @@ function getWrappedComponentsListener(vm, listener) {
5920
5890
  }
5921
5891
 
5922
5892
  /*
5923
- * Copyright (c) 2023, Salesforce.com, inc.
5893
+ * Copyright (c) 2024, Salesforce, Inc.
5924
5894
  * All rights reserved.
5925
5895
  * SPDX-License-Identifier: MIT
5926
5896
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -6141,14 +6111,13 @@ function computeShadowAndRenderMode(Ctor, renderer) {
6141
6111
  return { renderMode, shadowMode };
6142
6112
  }
6143
6113
  function computeShadowMode(def, owner, renderer, hydrated) {
6114
+ if (
6144
6115
  // Force the shadow mode to always be native. Used for running tests with synthetic shadow patches
6145
6116
  // on, but components running in actual native shadow mode
6146
- if (process.env.NODE_ENV !== 'production' &&
6147
- lwcRuntimeFlags.ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST) {
6148
- return 0 /* ShadowMode.Native */;
6149
- }
6150
- if (shared.isTrue(hydrated)) {
6117
+ (process.env.NODE_ENV === 'test-karma-lwc' &&
6118
+ process.env.FORCE_NATIVE_SHADOW_MODE_FOR_TEST) ||
6151
6119
  // hydration only supports native shadow
6120
+ shared.isTrue(hydrated)) {
6152
6121
  return 0 /* ShadowMode.Native */;
6153
6122
  }
6154
6123
  const { isSyntheticShadowDefined } = renderer;
@@ -7606,5 +7575,5 @@ exports.swapTemplate = swapTemplate;
7606
7575
  exports.track = track;
7607
7576
  exports.unwrap = unwrap;
7608
7577
  exports.wire = wire;
7609
- /** version: 6.3.2 */
7578
+ /** version: 6.3.4 */
7610
7579
  //# sourceMappingURL=index.cjs.js.map