lwc 2.45.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 +102 -75
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +102 -75
  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 -10
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +99 -73
  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 -10
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +102 -75
  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 -10
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +99 -73
  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 -10
  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 -74
  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 +101 -74
  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
@@ -335,9 +335,9 @@
335
335
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
336
336
  */
337
337
  // Increment whenever the LWC template compiler changes
338
- const LWC_VERSION = "2.45.0";
338
+ const LWC_VERSION = "2.45.1";
339
339
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
340
- /** version: 2.45.0 */
340
+ /** version: 2.45.1 */
341
341
 
342
342
  /**
343
343
  * Copyright (C) 2018 salesforce.com, inc.
@@ -415,7 +415,7 @@
415
415
  setFeatureFlag(name, value);
416
416
  }
417
417
  }
418
- /** version: 2.45.0 */
418
+ /** version: 2.45.1 */
419
419
 
420
420
  /**
421
421
  * Copyright (C) 2018 salesforce.com, inc.
@@ -479,7 +479,7 @@
479
479
  }
480
480
  }
481
481
  }
482
- /** version: 2.45.0 */
482
+ /** version: 2.45.1 */
483
483
 
484
484
  /*
485
485
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1006,8 +1006,9 @@
1006
1006
  get() {
1007
1007
  return originalOuterHTMLDescriptor.get.call(this);
1008
1008
  },
1009
- set(_value) {
1010
- throw new TypeError(`Invalid attempt to set outerHTML on Element.`);
1009
+ set(value) {
1010
+ logError(`Invalid attempt to set outerHTML on Element.`);
1011
+ return originalOuterHTMLDescriptor.set.call(this, value);
1011
1012
  },
1012
1013
  }),
1013
1014
  };
@@ -1092,16 +1093,18 @@
1092
1093
  get() {
1093
1094
  return originalInnerHTMLDescriptor.get.call(this);
1094
1095
  },
1095
- set(_value) {
1096
- throw new TypeError(`Invalid attempt to set innerHTML on ShadowRoot.`);
1096
+ set(value) {
1097
+ logError(`Invalid attempt to set innerHTML on ShadowRoot.`);
1098
+ return originalInnerHTMLDescriptor.set.call(this, value);
1097
1099
  },
1098
1100
  }),
1099
1101
  textContent: generateAccessorDescriptor({
1100
1102
  get() {
1101
1103
  return originalTextContentDescriptor.get.call(this);
1102
1104
  },
1103
- set(_value) {
1104
- throw new TypeError(`Invalid attempt to set textContent on ShadowRoot.`);
1105
+ set(value) {
1106
+ logError(`Invalid attempt to set textContent on ShadowRoot.`);
1107
+ return originalTextContentDescriptor.set.call(this, value);
1105
1108
  },
1106
1109
  }),
1107
1110
  addEventListener: generateDataDescriptor({
@@ -1130,24 +1133,27 @@
1130
1133
  get() {
1131
1134
  return originalInnerHTMLDescriptor.get.call(this);
1132
1135
  },
1133
- set(_value) {
1134
- throw new TypeError(`Invalid attempt to set innerHTML on HTMLElement.`);
1136
+ set(value) {
1137
+ logError(`Invalid attempt to set innerHTML on HTMLElement.`);
1138
+ return originalInnerHTMLDescriptor.set.call(this, value);
1135
1139
  },
1136
1140
  }),
1137
1141
  outerHTML: generateAccessorDescriptor({
1138
1142
  get() {
1139
1143
  return originalOuterHTMLDescriptor.get.call(this);
1140
1144
  },
1141
- set(_value) {
1142
- throw new TypeError(`Invalid attempt to set outerHTML on HTMLElement.`);
1145
+ set(value) {
1146
+ logError(`Invalid attempt to set outerHTML on HTMLElement.`);
1147
+ return originalOuterHTMLDescriptor.set.call(this, value);
1143
1148
  },
1144
1149
  }),
1145
1150
  textContent: generateAccessorDescriptor({
1146
1151
  get() {
1147
1152
  return originalTextContentDescriptor.get.call(this);
1148
1153
  },
1149
- set(_value) {
1150
- throw new TypeError(`Invalid attempt to set textContent on HTMLElement.`);
1154
+ set(value) {
1155
+ logError(`Invalid attempt to set textContent on HTMLElement.`);
1156
+ return originalTextContentDescriptor.set.call(this, value);
1151
1157
  },
1152
1158
  }),
1153
1159
  addEventListener: generateDataDescriptor({
@@ -1163,20 +1169,6 @@
1163
1169
  }),
1164
1170
  };
1165
1171
  }
1166
- function getComponentRestrictionsDescriptors() {
1167
- assertNotProd(); // this method should never leak to prod
1168
- return {
1169
- tagName: generateAccessorDescriptor({
1170
- get() {
1171
- throw new Error(`Usage of property \`tagName\` is disallowed because the component itself does` +
1172
- ` not know which tagName will be used to create the element, therefore writing` +
1173
- ` code that check for that value is error prone.`);
1174
- },
1175
- configurable: true,
1176
- enumerable: false, // no enumerable properties on component
1177
- }),
1178
- };
1179
- }
1180
1172
  function getLightningElementPrototypeRestrictionsDescriptors(proto) {
1181
1173
  assertNotProd(); // this method should never leak to prod
1182
1174
  const originalDispatchEvent = proto.dispatchEvent;
@@ -1209,9 +1201,6 @@
1209
1201
  const elmProto = getPrototypeOf$1(elm);
1210
1202
  setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
1211
1203
  }
1212
- function patchComponentWithRestrictions(cmp) {
1213
- defineProperties(cmp, getComponentRestrictionsDescriptors());
1214
- }
1215
1204
  function patchLightningElementPrototypeWithRestrictions(proto) {
1216
1205
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1217
1206
  }
@@ -1822,16 +1811,10 @@
1822
1811
  function createBridgeToElementDescriptor(propName, descriptor) {
1823
1812
  const { get, set, enumerable, configurable } = descriptor;
1824
1813
  if (!isFunction$1(get)) {
1825
- if (process.env.NODE_ENV !== 'production') {
1826
- assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
1827
- }
1828
- throw new TypeError();
1814
+ throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
1829
1815
  }
1830
1816
  if (!isFunction$1(set)) {
1831
- if (process.env.NODE_ENV !== 'production') {
1832
- assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
1833
- }
1834
- throw new TypeError();
1817
+ throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
1835
1818
  }
1836
1819
  return {
1837
1820
  enumerable,
@@ -1851,10 +1834,18 @@
1851
1834
  const vm = getAssociatedVM(this);
1852
1835
  if (process.env.NODE_ENV !== 'production') {
1853
1836
  const vmBeingRendered = getVMBeingRendered();
1854
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
1855
- 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}`);
1856
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1857
- assert.invariant(!isObject(newValue) || isNull(newValue), `Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
1837
+ if (isInvokingRender) {
1838
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
1839
+ }
1840
+ if (isUpdatingTemplate) {
1841
+ logError(`When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
1842
+ }
1843
+ if (isBeingConstructed(vm)) {
1844
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1845
+ }
1846
+ if (isObject(newValue) && !isNull(newValue)) {
1847
+ logError(`Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
1848
+ }
1858
1849
  }
1859
1850
  updateComponentValue(vm, propName, newValue);
1860
1851
  return set.call(vm.elm, newValue);
@@ -1907,7 +1898,6 @@
1907
1898
  // Adding extra guard rails in DEV mode.
1908
1899
  if (process.env.NODE_ENV !== 'production') {
1909
1900
  patchCustomElementWithRestrictions(elm);
1910
- patchComponentWithRestrictions(component);
1911
1901
  }
1912
1902
  return this;
1913
1903
  };
@@ -1943,9 +1933,15 @@
1943
1933
  const { elm, renderer: { addEventListener }, } = vm;
1944
1934
  if (process.env.NODE_ENV !== 'production') {
1945
1935
  const vmBeingRendered = getVMBeingRendered();
1946
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1947
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1948
- assert.invariant(isFunction$1(listener), `Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
1936
+ if (isInvokingRender) {
1937
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1938
+ }
1939
+ if (isUpdatingTemplate) {
1940
+ logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
1941
+ }
1942
+ if (!isFunction$1(listener)) {
1943
+ logError(`Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
1944
+ }
1949
1945
  }
1950
1946
  const wrappedListener = getWrappedComponentsListener(vm, listener);
1951
1947
  addEventListener(elm, type, wrappedListener, options);
@@ -1995,7 +1991,9 @@
1995
1991
  const vm = getAssociatedVM(this);
1996
1992
  const { elm, renderer: { setAttribute }, } = vm;
1997
1993
  if (process.env.NODE_ENV !== 'production') {
1998
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1994
+ if (isBeingConstructed(vm)) {
1995
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1996
+ }
1999
1997
  }
2000
1998
  unlockAttribute(elm, name);
2001
1999
  setAttribute(elm, name, value);
@@ -2005,7 +2003,9 @@
2005
2003
  const vm = getAssociatedVM(this);
2006
2004
  const { elm, renderer: { setAttribute }, } = vm;
2007
2005
  if (process.env.NODE_ENV !== 'production') {
2008
- assert.isFalse(isBeingConstructed(vm), `Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2006
+ if (isBeingConstructed(vm)) {
2007
+ logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2008
+ }
2009
2009
  }
2010
2010
  unlockAttribute(elm, name);
2011
2011
  setAttribute(elm, name, value, namespace);
@@ -2028,9 +2028,9 @@
2028
2028
  const vm = getAssociatedVM(this);
2029
2029
  const { elm, renderer: { getClassList }, } = vm;
2030
2030
  if (process.env.NODE_ENV !== 'production') {
2031
- // TODO [#1290]: this still fails in dev but works in production, eventually, we should
2032
- // just throw in all modes
2033
- 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.`);
2031
+ if (isBeingConstructed(vm)) {
2032
+ 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.`);
2033
+ }
2034
2034
  }
2035
2035
  return getClassList(elm);
2036
2036
  },
@@ -2536,8 +2536,12 @@
2536
2536
  const vm = getAssociatedVM(this);
2537
2537
  if (process.env.NODE_ENV !== 'production') {
2538
2538
  const vmBeingRendered = getVMBeingRendered();
2539
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2540
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2539
+ if (isInvokingRender) {
2540
+ logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2541
+ }
2542
+ if (isUpdatingTemplate) {
2543
+ logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2544
+ }
2541
2545
  }
2542
2546
  vm.cmpProps[key] = newValue;
2543
2547
  componentValueMutated(vm, key);
@@ -2561,14 +2565,18 @@
2561
2565
  const vm = getAssociatedVM(this);
2562
2566
  if (process.env.NODE_ENV !== 'production') {
2563
2567
  const vmBeingRendered = getVMBeingRendered();
2564
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2565
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2568
+ if (isInvokingRender) {
2569
+ logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2570
+ }
2571
+ if (isUpdatingTemplate) {
2572
+ logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
2573
+ }
2566
2574
  }
2567
2575
  if (set) {
2568
2576
  set.call(this, newValue);
2569
2577
  }
2570
2578
  else if (process.env.NODE_ENV !== 'production') {
2571
- 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.`);
2579
+ logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
2572
2580
  }
2573
2581
  },
2574
2582
  enumerable,
@@ -2602,8 +2610,12 @@
2602
2610
  const vm = getAssociatedVM(this);
2603
2611
  if (process.env.NODE_ENV !== 'production') {
2604
2612
  const vmBeingRendered = getVMBeingRendered();
2605
- assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2606
- assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2613
+ if (isInvokingRender) {
2614
+ logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2615
+ }
2616
+ if (isUpdatingTemplate) {
2617
+ logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2618
+ }
2607
2619
  }
2608
2620
  const reactiveOrAnyValue = getReactiveProxy(newValue);
2609
2621
  updateComponentValue(vm, key, reactiveOrAnyValue);
@@ -3380,13 +3392,20 @@
3380
3392
  const ctorName = Ctor.name;
3381
3393
  // Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
3382
3394
  // assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
3383
- assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
3384
- if (!isUndefined$1(ctorShadowSupportMode)) {
3385
- assert.invariant(ctorShadowSupportMode === "any" /* ShadowSupportMode.Any */ ||
3386
- ctorShadowSupportMode === "reset" /* ShadowSupportMode.Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
3395
+ if (!Ctor.constructor) {
3396
+ // This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
3397
+ // But we keep it here just in case.
3398
+ logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
3399
+ }
3400
+ if (!isUndefined$1(ctorShadowSupportMode) &&
3401
+ ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
3402
+ ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
3403
+ logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
3387
3404
  }
3388
- if (!isUndefined$1(ctorRenderMode)) {
3389
- assert.invariant(ctorRenderMode === 'light' || ctorRenderMode === 'shadow', `Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
3405
+ if (!isUndefined$1(ctorRenderMode) &&
3406
+ ctorRenderMode !== 'light' &&
3407
+ ctorRenderMode !== 'shadow') {
3408
+ logError(`Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
3390
3409
  }
3391
3410
  }
3392
3411
  const decoratorsMeta = getDecoratorsMeta(Ctor);
@@ -5163,7 +5182,7 @@
5163
5182
  return compilerKey + ':' + obj;
5164
5183
  case 'object':
5165
5184
  if (process.env.NODE_ENV !== 'production') {
5166
- assert.fail(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
5185
+ logError(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
5167
5186
  }
5168
5187
  }
5169
5188
  }
@@ -5453,13 +5472,19 @@
5453
5472
  }
5454
5473
  }
5455
5474
  function validateLightDomTemplate(template, vm) {
5456
- if (template === defaultEmptyTemplate)
5475
+ assertNotProd(); // should never leak to prod mode
5476
+ if (template === defaultEmptyTemplate) {
5457
5477
  return;
5478
+ }
5458
5479
  if (vm.renderMode === 0 /* RenderMode.Light */) {
5459
- 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)}.`);
5480
+ if (template.renderMode !== 'light') {
5481
+ 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)}.`);
5482
+ }
5460
5483
  }
5461
5484
  else {
5462
- 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"`);
5485
+ if (!isUndefined$1(template.renderMode)) {
5486
+ 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"`);
5487
+ }
5463
5488
  }
5464
5489
  }
5465
5490
  function buildParseFragmentFn(createFragmentFn) {
@@ -5592,7 +5617,9 @@
5592
5617
  logOperationEnd(1 /* OperationId.Render */, vm);
5593
5618
  });
5594
5619
  if (process.env.NODE_ENV !== 'production') {
5595
- assert.invariant(isArray$1(vnodes), `Compiler should produce html functions that always return an array.`);
5620
+ if (!isArray$1(vnodes)) {
5621
+ logError(`Compiler should produce html functions that always return an array.`);
5622
+ }
5596
5623
  }
5597
5624
  return vnodes;
5598
5625
  }
@@ -7309,7 +7336,7 @@
7309
7336
  }
7310
7337
  return getReadOnlyProxy(obj);
7311
7338
  }
7312
- /* version: 2.45.0 */
7339
+ /* version: 2.45.1 */
7313
7340
 
7314
7341
  /*
7315
7342
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7737,7 +7764,7 @@
7737
7764
  function isNull(obj) {
7738
7765
  return obj === null;
7739
7766
  }
7740
- /** version: 2.45.0 */
7767
+ /** version: 2.45.1 */
7741
7768
 
7742
7769
  /*
7743
7770
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8356,7 +8383,7 @@
8356
8383
  });
8357
8384
  }));
8358
8385
  }
8359
- /* version: 2.45.0 */
8386
+ /* version: 2.45.1 */
8360
8387
 
8361
8388
  exports.LightningElement = LightningElement;
8362
8389
  exports.__unstable__ProfilerControl = profilerControl;