@lwc/engine-core 8.15.0 → 8.16.0

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,7 @@ 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 (process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2828
+ if (typeof process === 'object' && process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2829
2829
  warned = true; // skip printing out version mismatch errors when env var is set
2830
2830
  return;
2831
2831
  }
@@ -7854,7 +7854,12 @@ function hydrateElement(elm, vnode, renderer) {
7854
7854
  }
7855
7855
  }
7856
7856
  patchElementPropsAndAttrsAndRefs(vnode, renderer);
7857
- 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') {
7858
7863
  const { getFirstChild } = renderer;
7859
7864
  hydrateChildren(getFirstChild(elm), vnode.children, elm, owner, false);
7860
7865
  }
@@ -8517,5 +8522,5 @@ exports.swapTemplate = swapTemplate;
8517
8522
  exports.track = track;
8518
8523
  exports.unwrap = unwrap;
8519
8524
  exports.wire = wire;
8520
- /** version: 8.15.0 */
8525
+ /** version: 8.16.0 */
8521
8526
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -2822,7 +2822,7 @@ 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 (process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2825
+ if (typeof process === 'object' && process.env.SKIP_LWC_VERSION_MISMATCH_CHECK === 'true') {
2826
2826
  warned = true; // skip printing out version mismatch errors when env var is set
2827
2827
  return;
2828
2828
  }
@@ -7851,7 +7851,12 @@ function hydrateElement(elm, vnode, renderer) {
7851
7851
  }
7852
7852
  }
7853
7853
  patchElementPropsAndAttrsAndRefs(vnode, renderer);
7854
- if (!isDomManual) {
7854
+ // When <lwc-style> tags are initially encountered at the time of HTML parse, the <lwc-style> tag is
7855
+ // replaced with an empty <style> tag. Additionally, the styles are attached to the shadow root as a
7856
+ // constructed stylesheet at the same time. So, the shadow will be styled correctly and the only
7857
+ // difference between what's in the DOM and what's in the VDOM is the string content inside the
7858
+ // <style> tag. We can simply ignore that during hyration.
7859
+ if (!isDomManual && vnode.elm.tagName !== 'STYLE') {
7855
7860
  const { getFirstChild } = renderer;
7856
7861
  hydrateChildren(getFirstChild(elm), vnode.children, elm, owner, false);
7857
7862
  }
@@ -8463,5 +8468,5 @@ function readonly(obj) {
8463
8468
  }
8464
8469
 
8465
8470
  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.0 */
8471
+ /** version: 8.16.0 */
8467
8472
  //# 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.0",
7
+ "version": "8.16.0",
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.0",
50
- "@lwc/shared": "8.15.0",
51
- "@lwc/signals": "8.15.0"
49
+ "@lwc/features": "8.16.0",
50
+ "@lwc/shared": "8.16.0",
51
+ "@lwc/signals": "8.16.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "observable-membrane": "2.0.0"