@lwc/engine-core 8.15.1 → 8.16.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.
package/dist/index.cjs.js CHANGED
@@ -2825,7 +2825,10 @@ if (process.env.NODE_ENV === 'test-karma-lwc') {
2825
2825
  function checkVersionMismatch(func, type) {
2826
2826
  const versionMatcher = func.toString().match(shared.LWC_VERSION_COMMENT_REGEX);
2827
2827
  if (!shared.isNull(versionMatcher) && !warned) {
2828
- if (typeof process === 'object' && process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2828
+ if (typeof process === 'object' &&
2829
+ typeof process?.env === 'object' &&
2830
+ process.env &&
2831
+ process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2829
2832
  warned = true; // skip printing out version mismatch errors when env var is set
2830
2833
  return;
2831
2834
  }
@@ -7854,7 +7857,12 @@ function hydrateElement(elm, vnode, renderer) {
7854
7857
  }
7855
7858
  }
7856
7859
  patchElementPropsAndAttrsAndRefs(vnode, renderer);
7857
- if (!isDomManual) {
7860
+ // When <lwc-style> tags are initially encountered at the time of HTML parse, the <lwc-style> tag is
7861
+ // replaced with an empty <style> tag. Additionally, the styles are attached to the shadow root as a
7862
+ // constructed stylesheet at the same time. So, the shadow will be styled correctly and the only
7863
+ // difference between what's in the DOM and what's in the VDOM is the string content inside the
7864
+ // <style> tag. We can simply ignore that during hyration.
7865
+ if (!isDomManual && vnode.elm.tagName !== 'STYLE') {
7858
7866
  const { getFirstChild } = renderer;
7859
7867
  hydrateChildren(getFirstChild(elm), vnode.children, elm, owner, false);
7860
7868
  }
@@ -8517,5 +8525,5 @@ exports.swapTemplate = swapTemplate;
8517
8525
  exports.track = track;
8518
8526
  exports.unwrap = unwrap;
8519
8527
  exports.wire = wire;
8520
- /** version: 8.15.1 */
8528
+ /** version: 8.16.1 */
8521
8529
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -2822,7 +2822,10 @@ if (process.env.NODE_ENV === 'test-karma-lwc') {
2822
2822
  function checkVersionMismatch(func, type) {
2823
2823
  const versionMatcher = func.toString().match(LWC_VERSION_COMMENT_REGEX);
2824
2824
  if (!isNull(versionMatcher) && !warned) {
2825
- if (typeof process === 'object' && process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2825
+ if (typeof process === 'object' &&
2826
+ typeof process?.env === 'object' &&
2827
+ process.env &&
2828
+ process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2826
2829
  warned = true; // skip printing out version mismatch errors when env var is set
2827
2830
  return;
2828
2831
  }
@@ -7851,7 +7854,12 @@ function hydrateElement(elm, vnode, renderer) {
7851
7854
  }
7852
7855
  }
7853
7856
  patchElementPropsAndAttrsAndRefs(vnode, renderer);
7854
- if (!isDomManual) {
7857
+ // When <lwc-style> tags are initially encountered at the time of HTML parse, the <lwc-style> tag is
7858
+ // replaced with an empty <style> tag. Additionally, the styles are attached to the shadow root as a
7859
+ // constructed stylesheet at the same time. So, the shadow will be styled correctly and the only
7860
+ // difference between what's in the DOM and what's in the VDOM is the string content inside the
7861
+ // <style> tag. We can simply ignore that during hyration.
7862
+ if (!isDomManual && vnode.elm.tagName !== 'STYLE') {
7855
7863
  const { getFirstChild } = renderer;
7856
7864
  hydrateChildren(getFirstChild(elm), vnode.children, elm, owner, false);
7857
7865
  }
@@ -8463,5 +8471,5 @@ function readonly(obj) {
8463
8471
  }
8464
8472
 
8465
8473
  export { BaseBridgeElement, LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
8466
- /** version: 8.15.1 */
8474
+ /** version: 8.16.1 */
8467
8475
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
5
5
  ],
6
6
  "name": "@lwc/engine-core",
7
- "version": "8.15.1",
7
+ "version": "8.16.1",
8
8
  "description": "Core LWC engine APIs.",
9
9
  "keywords": [
10
10
  "lwc"
@@ -46,9 +46,9 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@lwc/features": "8.15.1",
50
- "@lwc/shared": "8.15.1",
51
- "@lwc/signals": "8.15.1"
49
+ "@lwc/features": "8.16.1",
50
+ "@lwc/shared": "8.16.1",
51
+ "@lwc/signals": "8.16.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "observable-membrane": "2.0.0"