lwc 2.44.0 → 2.45.1

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.
Files changed (64) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +104 -98
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +103 -98
  4. package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
  5. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  6. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +16 -29
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +100 -96
  9. package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
  10. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  11. package/dist/engine-dom/iife/es5/engine-dom_debug.js +17 -29
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +103 -98
  14. package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
  15. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  16. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +16 -29
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +100 -96
  19. package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
  20. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  21. package/dist/engine-dom/umd/es5/engine-dom_debug.js +17 -29
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +101 -103
  24. package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
  25. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  26. package/dist/engine-server/esm/es2017/engine-server.js +102 -103
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  34. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  38. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  39. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  43. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  44. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  46. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  47. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  48. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  49. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  50. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  51. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  52. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  53. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  55. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  57. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  58. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  59. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  61. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  63. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  64. package/package.json +7 -7
@@ -445,9 +445,9 @@ function htmlEscape(str, attrMode = false) {
445
445
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
446
446
  */
447
447
  // Increment whenever the LWC template compiler changes
448
- const LWC_VERSION = "2.44.0";
448
+ const LWC_VERSION = "2.45.1";
449
449
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
450
- /** version: 2.44.0 */
450
+ /** version: 2.45.1 */
451
451
 
452
452
  /**
453
453
  * Copyright (C) 2018 salesforce.com, inc.
@@ -525,7 +525,7 @@ function setFeatureFlagForTest(name, value) {
525
525
  setFeatureFlag(name, value);
526
526
  }
527
527
  }
528
- /** version: 2.44.0 */
528
+ /** version: 2.45.1 */
529
529
 
530
530
  /*
531
531
  * Copyright (c) 2020, salesforce.com, inc.
@@ -621,16 +621,9 @@ function applyAriaReflection(prototype = Element.prototype) {
621
621
  }
622
622
  }
623
623
  }
624
- /** version: 2.44.0 */
624
+ /** version: 2.45.1 */
625
625
 
626
626
  /* proxy-compat-disable */
627
- /**
628
- * Report to the current dispatcher, if there is one.
629
- * @param reportingEventId
630
- * @param payload - data to report
631
- */
632
- function report(reportingEventId, payload) {
633
- }
634
627
 
635
628
  /*
636
629
  * Copyright (c) 2018, salesforce.com, inc.
@@ -941,8 +934,9 @@ function patchElementWithRestrictions(elm, options) {
941
934
  get() {
942
935
  return originalOuterHTMLDescriptor.get.call(this);
943
936
  },
944
- set(_value) {
945
- throw new TypeError(`Invalid attempt to set outerHTML on Element.`);
937
+ set(value) {
938
+ logError(`Invalid attempt to set outerHTML on Element.`);
939
+ return originalOuterHTMLDescriptor.set.call(this, value);
946
940
  },
947
941
  }),
948
942
  };
@@ -1027,16 +1021,18 @@ function getShadowRootRestrictionsDescriptors(sr) {
1027
1021
  get() {
1028
1022
  return originalInnerHTMLDescriptor.get.call(this);
1029
1023
  },
1030
- set(_value) {
1031
- throw new TypeError(`Invalid attempt to set innerHTML on ShadowRoot.`);
1024
+ set(value) {
1025
+ logError(`Invalid attempt to set innerHTML on ShadowRoot.`);
1026
+ return originalInnerHTMLDescriptor.set.call(this, value);
1032
1027
  },
1033
1028
  }),
1034
1029
  textContent: generateAccessorDescriptor({
1035
1030
  get() {
1036
1031
  return originalTextContentDescriptor.get.call(this);
1037
1032
  },
1038
- set(_value) {
1039
- throw new TypeError(`Invalid attempt to set textContent on ShadowRoot.`);
1033
+ set(value) {
1034
+ logError(`Invalid attempt to set textContent on ShadowRoot.`);
1035
+ return originalTextContentDescriptor.set.call(this, value);
1040
1036
  },
1041
1037
  }),
1042
1038
  addEventListener: generateDataDescriptor({
@@ -1065,24 +1061,27 @@ function getCustomElementRestrictionsDescriptors(elm) {
1065
1061
  get() {
1066
1062
  return originalInnerHTMLDescriptor.get.call(this);
1067
1063
  },
1068
- set(_value) {
1069
- throw new TypeError(`Invalid attempt to set innerHTML on HTMLElement.`);
1064
+ set(value) {
1065
+ logError(`Invalid attempt to set innerHTML on HTMLElement.`);
1066
+ return originalInnerHTMLDescriptor.set.call(this, value);
1070
1067
  },
1071
1068
  }),
1072
1069
  outerHTML: generateAccessorDescriptor({
1073
1070
  get() {
1074
1071
  return originalOuterHTMLDescriptor.get.call(this);
1075
1072
  },
1076
- set(_value) {
1077
- throw new TypeError(`Invalid attempt to set outerHTML on HTMLElement.`);
1073
+ set(value) {
1074
+ logError(`Invalid attempt to set outerHTML on HTMLElement.`);
1075
+ return originalOuterHTMLDescriptor.set.call(this, value);
1078
1076
  },
1079
1077
  }),
1080
1078
  textContent: generateAccessorDescriptor({
1081
1079
  get() {
1082
1080
  return originalTextContentDescriptor.get.call(this);
1083
1081
  },
1084
- set(_value) {
1085
- throw new TypeError(`Invalid attempt to set textContent on HTMLElement.`);
1082
+ set(value) {
1083
+ logError(`Invalid attempt to set textContent on HTMLElement.`);
1084
+ return originalTextContentDescriptor.set.call(this, value);
1086
1085
  },
1087
1086
  }),
1088
1087
  addEventListener: generateDataDescriptor({
@@ -1098,20 +1097,6 @@ function getCustomElementRestrictionsDescriptors(elm) {
1098
1097
  }),
1099
1098
  };
1100
1099
  }
1101
- function getComponentRestrictionsDescriptors() {
1102
- assertNotProd(); // this method should never leak to prod
1103
- return {
1104
- tagName: generateAccessorDescriptor({
1105
- get() {
1106
- throw new Error(`Usage of property \`tagName\` is disallowed because the component itself does` +
1107
- ` not know which tagName will be used to create the element, therefore writing` +
1108
- ` code that check for that value is error prone.`);
1109
- },
1110
- configurable: true,
1111
- enumerable: false, // no enumerable properties on component
1112
- }),
1113
- };
1114
- }
1115
1100
  function getLightningElementPrototypeRestrictionsDescriptors(proto) {
1116
1101
  assertNotProd(); // this method should never leak to prod
1117
1102
  const originalDispatchEvent = proto.dispatchEvent;
@@ -1144,9 +1129,6 @@ function patchCustomElementWithRestrictions(elm) {
1144
1129
  const elmProto = getPrototypeOf$1(elm);
1145
1130
  setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
1146
1131
  }
1147
- function patchComponentWithRestrictions(cmp) {
1148
- defineProperties(cmp, getComponentRestrictionsDescriptors());
1149
- }
1150
1132
  function patchLightningElementPrototypeWithRestrictions(proto) {
1151
1133
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1152
1134
  }
@@ -1749,16 +1731,10 @@ function getReactiveProxy(value) {
1749
1731
  function createBridgeToElementDescriptor(propName, descriptor) {
1750
1732
  const { get, set, enumerable, configurable } = descriptor;
1751
1733
  if (!isFunction$1(get)) {
1752
- if (process.env.NODE_ENV !== 'production') {
1753
- assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
1754
- }
1755
- throw new TypeError();
1734
+ throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
1756
1735
  }
1757
1736
  if (!isFunction$1(set)) {
1758
- if (process.env.NODE_ENV !== 'production') {
1759
- assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
1760
- }
1761
- throw new TypeError();
1737
+ throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
1762
1738
  }
1763
1739
  return {
1764
1740
  enumerable,
@@ -1777,10 +1753,18 @@ function createBridgeToElementDescriptor(propName, descriptor) {
1777
1753
  const vm = getAssociatedVM(this);
1778
1754
  if (process.env.NODE_ENV !== 'production') {
1779
1755
  const vmBeingRendered = getVMBeingRendered();
1780
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
1781
- assert.invariant(!isUpdatingTemplate, `When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
1782
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1783
- assert.invariant(!isObject(newValue) || isNull(newValue), `Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
1756
+ if (isInvokingRender) {
1757
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
1758
+ }
1759
+ if (isUpdatingTemplate) {
1760
+ logError(`When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
1761
+ }
1762
+ if (isBeingConstructed(vm)) {
1763
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1764
+ }
1765
+ if (isObject(newValue) && !isNull(newValue)) {
1766
+ logError(`Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
1767
+ }
1784
1768
  }
1785
1769
  updateComponentValue(vm, propName, newValue);
1786
1770
  return set.call(vm.elm, newValue);
@@ -1832,7 +1816,6 @@ const LightningElement = function () {
1832
1816
  // Adding extra guard rails in DEV mode.
1833
1817
  if (process.env.NODE_ENV !== 'production') {
1834
1818
  patchCustomElementWithRestrictions(elm);
1835
- patchComponentWithRestrictions(component);
1836
1819
  }
1837
1820
  return this;
1838
1821
  };
@@ -1868,9 +1851,15 @@ LightningElement.prototype = {
1868
1851
  const { elm, renderer: { addEventListener }, } = vm;
1869
1852
  if (process.env.NODE_ENV !== 'production') {
1870
1853
  const vmBeingRendered = getVMBeingRendered();
1871
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1872
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1873
- assert.invariant(isFunction$1(listener), `Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
1854
+ if (isInvokingRender) {
1855
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1856
+ }
1857
+ if (isUpdatingTemplate) {
1858
+ logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1859
+ }
1860
+ if (!isFunction$1(listener)) {
1861
+ logError(`Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
1862
+ }
1874
1863
  }
1875
1864
  const wrappedListener = getWrappedComponentsListener(vm, listener);
1876
1865
  addEventListener(elm, type, wrappedListener, options);
@@ -1920,7 +1909,9 @@ LightningElement.prototype = {
1920
1909
  const vm = getAssociatedVM(this);
1921
1910
  const { elm, renderer: { setAttribute }, } = vm;
1922
1911
  if (process.env.NODE_ENV !== 'production') {
1923
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1912
+ if (isBeingConstructed(vm)) {
1913
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1914
+ }
1924
1915
  }
1925
1916
  unlockAttribute(elm, name);
1926
1917
  setAttribute(elm, name, value);
@@ -1930,7 +1921,9 @@ LightningElement.prototype = {
1930
1921
  const vm = getAssociatedVM(this);
1931
1922
  const { elm, renderer: { setAttribute }, } = vm;
1932
1923
  if (process.env.NODE_ENV !== 'production') {
1933
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1924
+ if (isBeingConstructed(vm)) {
1925
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1926
+ }
1934
1927
  }
1935
1928
  unlockAttribute(elm, name);
1936
1929
  setAttribute(elm, name, value, namespace);
@@ -1953,9 +1946,9 @@ LightningElement.prototype = {
1953
1946
  const vm = getAssociatedVM(this);
1954
1947
  const { elm, renderer: { getClassList }, } = vm;
1955
1948
  if (process.env.NODE_ENV !== 'production') {
1956
- // TODO [#1290]: this still fails in dev but works in production, eventually, we should
1957
- // just throw in all modes
1958
- assert.isFalse(isBeingConstructed(vm), `Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
1949
+ if (isBeingConstructed(vm)) {
1950
+ logError(`Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
1951
+ }
1959
1952
  }
1960
1953
  return getClassList(elm);
1961
1954
  },
@@ -2446,8 +2439,12 @@ function createPublicPropertyDescriptor(key) {
2446
2439
  const vm = getAssociatedVM(this);
2447
2440
  if (process.env.NODE_ENV !== 'production') {
2448
2441
  const vmBeingRendered = getVMBeingRendered();
2449
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2450
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2442
+ if (isInvokingRender) {
2443
+ logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2444
+ }
2445
+ if (isUpdatingTemplate) {
2446
+ logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2447
+ }
2451
2448
  }
2452
2449
  vm.cmpProps[key] = newValue;
2453
2450
  },
@@ -2470,14 +2467,18 @@ function createPublicAccessorDescriptor(key, descriptor) {
2470
2467
  const vm = getAssociatedVM(this);
2471
2468
  if (process.env.NODE_ENV !== 'production') {
2472
2469
  const vmBeingRendered = getVMBeingRendered();
2473
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2474
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2470
+ if (isInvokingRender) {
2471
+ logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2472
+ }
2473
+ if (isUpdatingTemplate) {
2474
+ logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2475
+ }
2475
2476
  }
2476
2477
  if (set) {
2477
2478
  set.call(this, newValue);
2478
2479
  }
2479
2480
  else if (process.env.NODE_ENV !== 'production') {
2480
- assert.fail(`Invalid attempt to set a new value for property ${toString$1(key)} of ${vm} that does not has a setter decorated with @api.`);
2481
+ logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
2481
2482
  }
2482
2483
  },
2483
2484
  enumerable,
@@ -2510,8 +2511,12 @@ function internalTrackDecorator(key) {
2510
2511
  const vm = getAssociatedVM(this);
2511
2512
  if (process.env.NODE_ENV !== 'production') {
2512
2513
  const vmBeingRendered = getVMBeingRendered();
2513
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2514
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2514
+ if (isInvokingRender) {
2515
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2516
+ }
2517
+ if (isUpdatingTemplate) {
2518
+ logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2519
+ }
2515
2520
  }
2516
2521
  const reactiveOrAnyValue = getReactiveProxy(newValue);
2517
2522
  updateComponentValue(vm, key, reactiveOrAnyValue);
@@ -3185,13 +3190,20 @@ function createComponentDef(Ctor) {
3185
3190
  const ctorName = Ctor.name;
3186
3191
  // Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
3187
3192
  // assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
3188
- assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
3189
- if (!isUndefined$1(ctorShadowSupportMode)) {
3190
- assert.invariant(ctorShadowSupportMode === "any" /* ShadowSupportMode.Any */ ||
3191
- ctorShadowSupportMode === "reset" /* ShadowSupportMode.Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
3193
+ if (!Ctor.constructor) {
3194
+ // This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
3195
+ // But we keep it here just in case.
3196
+ logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
3197
+ }
3198
+ if (!isUndefined$1(ctorShadowSupportMode) &&
3199
+ ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
3200
+ ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
3201
+ logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
3192
3202
  }
3193
- if (!isUndefined$1(ctorRenderMode)) {
3194
- assert.invariant(ctorRenderMode === 'light' || ctorRenderMode === 'shadow', `Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
3203
+ if (!isUndefined$1(ctorRenderMode) &&
3204
+ ctorRenderMode !== 'light' &&
3205
+ ctorRenderMode !== 'shadow') {
3206
+ logError(`Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
3195
3207
  }
3196
3208
  }
3197
3209
  const decoratorsMeta = getDecoratorsMeta(Ctor);
@@ -3421,15 +3433,6 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
3421
3433
  // the stylesheet, while internally, we have a replacement for it.
3422
3434
  stylesheet = getStyleOrSwappedStyle(stylesheet);
3423
3435
  }
3424
- // Check that this stylesheet was generated by our compiler
3425
- if (!isStylesheetRegistered(stylesheet)) {
3426
- if (process.env.NODE_ENV !== 'production') {
3427
- logWarnOnce(`TypeError: Unexpected LWC stylesheet content found for component <${vm.tagName.toLowerCase()}>.`);
3428
- }
3429
- report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
3430
- tagName: vm.tagName.toLowerCase(),
3431
- });
3432
- }
3433
3436
  const isScopedCss = stylesheet[KEY__SCOPED_CSS];
3434
3437
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
3435
3438
  !isScopedCss &&
@@ -3518,18 +3521,6 @@ function createStylesheet(vm, stylesheets) {
3518
3521
  }
3519
3522
  return null;
3520
3523
  }
3521
- const signedStylesheetSet = new Set();
3522
- /**
3523
- * INTERNAL: This function can only be invoked by compiled code. The compiler
3524
- * will prevent this function from being imported by userland code.
3525
- */
3526
- function registerStylesheet(stylesheet) {
3527
- signedStylesheetSet.add(stylesheet);
3528
- return stylesheet;
3529
- }
3530
- function isStylesheetRegistered(stylesheet) {
3531
- return signedStylesheetSet.has(stylesheet);
3532
- }
3533
3524
 
3534
3525
  /*
3535
3526
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4940,7 +4931,7 @@ function k(compilerKey, obj) {
4940
4931
  return compilerKey + ':' + obj;
4941
4932
  case 'object':
4942
4933
  if (process.env.NODE_ENV !== 'production') {
4943
- assert.fail(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
4934
+ logError(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
4944
4935
  }
4945
4936
  }
4946
4937
  }
@@ -5196,13 +5187,19 @@ function validateSlots(vm) {
5196
5187
  }
5197
5188
  }
5198
5189
  function validateLightDomTemplate(template, vm) {
5199
- if (template === defaultEmptyTemplate)
5190
+ assertNotProd(); // should never leak to prod mode
5191
+ if (template === defaultEmptyTemplate) {
5200
5192
  return;
5193
+ }
5201
5194
  if (vm.renderMode === 0 /* RenderMode.Light */) {
5202
- assert.isTrue(template.renderMode === 'light', `Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode="light"' directive to the root template tag of ${getComponentTag(vm)}.`);
5195
+ if (template.renderMode !== 'light') {
5196
+ logError(`Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode="light"' directive to the root template tag of ${getComponentTag(vm)}.`);
5197
+ }
5203
5198
  }
5204
5199
  else {
5205
- assert.isTrue(isUndefined$1(template.renderMode), `Shadow DOM components template can't render light DOM templates. Either remove the 'lwc:render-mode' directive from ${getComponentTag(vm)} or set it to 'lwc:render-mode="shadow"`);
5200
+ if (!isUndefined$1(template.renderMode)) {
5201
+ logError(`Shadow DOM components template can't render light DOM templates. Either remove the 'lwc:render-mode' directive from ${getComponentTag(vm)} or set it to 'lwc:render-mode="shadow"`);
5202
+ }
5206
5203
  }
5207
5204
  }
5208
5205
  function buildParseFragmentFn(createFragmentFn) {
@@ -5330,7 +5327,9 @@ function evaluateTemplate(vm, html) {
5330
5327
  logOperationEnd(1 /* OperationId.Render */, vm);
5331
5328
  });
5332
5329
  if (process.env.NODE_ENV !== 'production') {
5333
- assert.invariant(isArray$1(vnodes), `Compiler should produce html functions that always return an array.`);
5330
+ if (!isArray$1(vnodes)) {
5331
+ logError(`Compiler should produce html functions that always return an array.`);
5332
+ }
5334
5333
  }
5335
5334
  return vnodes;
5336
5335
  }
@@ -6247,7 +6246,7 @@ function readonly(obj) {
6247
6246
  }
6248
6247
  return getReadOnlyProxy(obj);
6249
6248
  }
6250
- /* version: 2.44.0 */
6249
+ /* version: 2.45.1 */
6251
6250
 
6252
6251
  /*
6253
6252
  * Copyright (c) 2020, salesforce.com, inc.
@@ -6828,7 +6827,7 @@ seal(LightningElement.prototype);
6828
6827
  function createElement() {
6829
6828
  throw new Error('createElement is not supported in @lwc/engine-server, only @lwc/engine-dom.');
6830
6829
  }
6831
- /* version: 2.44.0 */
6830
+ /* version: 2.45.1 */
6832
6831
 
6833
- export { LightningElement, api$1 as api, createContextProvider, createElement, freezeTemplate, getComponentDef, isComponentConstructor, parseFragment, parseFragment as parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerStylesheet, registerTemplate, renderComponent, renderer, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
6832
+ export { LightningElement, api$1 as api, createContextProvider, createElement, freezeTemplate, getComponentDef, isComponentConstructor, parseFragment, parseFragment as parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderComponent, renderer, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
6834
6833
  //# sourceMappingURL=engine-server.js.map