@lwc/engine-core 8.20.4 → 8.20.5

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
@@ -611,12 +611,23 @@ function componentValueObserved(vm, key, target = {}) {
611
611
  if (lwcRuntimeFlags.ENABLE_EXPERIMENTAL_SIGNALS &&
612
612
  shared.isObject(target) &&
613
613
  !shared.isNull(target) &&
614
- shared.isTrustedSignal(target) &&
615
614
  process.env.IS_BROWSER &&
616
615
  // Only subscribe if a template is being rendered by the engine
617
616
  tro.isObserving()) {
618
- // Subscribe the template reactive observer's notify method, which will mark the vm as dirty and schedule hydration.
619
- subscribeToSignal(component, target, tro.notify.bind(tro));
617
+ /**
618
+ * The legacy validation behavior was that this check should only
619
+ * be performed for runtimes that have provided a trustedSignals set.
620
+ * However, this resulted in a bug as all object values were
621
+ * being considered signals in environments where the trustedSignals
622
+ * set had not been defined. The runtime flag has been added as a killswitch
623
+ * in case the fix needs to be reverted.
624
+ */
625
+ if (lwcRuntimeFlags.ENABLE_LEGACY_SIGNAL_CONTEXT_VALIDATION
626
+ ? shared.legacyIsTrustedSignal(target)
627
+ : shared.isTrustedSignal(target)) {
628
+ // Subscribe the template reactive observer's notify method, which will mark the vm as dirty and schedule hydration.
629
+ subscribeToSignal(component, target, tro.notify.bind(tro));
630
+ }
620
631
  }
621
632
  }
622
633
  function createReactiveObserver(callback) {
@@ -8741,5 +8752,5 @@ exports.swapTemplate = swapTemplate;
8741
8752
  exports.track = track;
8742
8753
  exports.unwrap = unwrap;
8743
8754
  exports.wire = wire;
8744
- /** version: 8.20.4 */
8755
+ /** version: 8.20.5 */
8745
8756
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Copyright (c) 2025 Salesforce, Inc.
3
3
  */
4
- import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, seal, create, isAPIFeatureEnabled, isFunction as isFunction$1, keys, toString, isString, ArrayFilter, isObject, isArray as isArray$1, getOwnPropertyNames as getOwnPropertyNames$1, getOwnPropertySymbols as getOwnPropertySymbols$1, ArrayIndexOf, ArrayPop, isFalse, isTrustedSignal, hasOwnProperty as hasOwnProperty$1, entries, AriaPropNameToAttrNameMap, getPropertyDescriptor, AriaAttrNameToPropNameMap, forEach, REFLECTIVE_GLOBAL_PROPERTY_SET, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, defineProperties, assign, freeze, assert, KEY__SYNTHETIC_MODE, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArrayMap, isTrue, KEY__SCOPED_CSS, KEY__NATIVE_ONLY_CSS, ArraySplice, flattenStylesheets, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, StringSlice, SVG_NAMESPACE, KEY__SHADOW_STATIC, ArraySome, KEY__SHADOW_RESOLVER, normalizeClass, sanitizeHtmlContent, StringReplace, isNumber, ArraySort, ArrayFrom, StringCharAt, htmlEscape, LOWEST_API_VERSION, getContextKeys, isTrustedContext, ContextEventName, ArrayUnshift, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, KEY__SHADOW_TOKEN, ID_REFERENCING_ATTRIBUTES_SET, StringSplit, arrayEvery, parseStyleText, ArrayCopyWithin, ArrayFill, ArrayReverse, ArrayShift } from '@lwc/shared';
4
+ import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, seal, create, isAPIFeatureEnabled, isFunction as isFunction$1, keys, toString, isString, ArrayFilter, isObject, isArray as isArray$1, getOwnPropertyNames as getOwnPropertyNames$1, getOwnPropertySymbols as getOwnPropertySymbols$1, ArrayIndexOf, ArrayPop, isFalse, legacyIsTrustedSignal, isTrustedSignal, hasOwnProperty as hasOwnProperty$1, entries, AriaPropNameToAttrNameMap, getPropertyDescriptor, AriaAttrNameToPropNameMap, forEach, REFLECTIVE_GLOBAL_PROPERTY_SET, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, defineProperties, assign, freeze, assert, KEY__SYNTHETIC_MODE, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArrayMap, isTrue, KEY__SCOPED_CSS, KEY__NATIVE_ONLY_CSS, ArraySplice, flattenStylesheets, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, StringSlice, SVG_NAMESPACE, KEY__SHADOW_STATIC, ArraySome, KEY__SHADOW_RESOLVER, normalizeClass, sanitizeHtmlContent, StringReplace, isNumber, ArraySort, ArrayFrom, StringCharAt, htmlEscape, LOWEST_API_VERSION, getContextKeys, isTrustedContext, ContextEventName, ArrayUnshift, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, KEY__SHADOW_TOKEN, ID_REFERENCING_ATTRIBUTES_SET, StringSplit, arrayEvery, parseStyleText, ArrayCopyWithin, ArrayFill, ArrayReverse, ArrayShift } from '@lwc/shared';
5
5
  export { addTrustedContext, isTrustedSignal, setContextKeys, setHooks, setTrustedContextSet, setTrustedSignalSet } from '@lwc/shared';
6
6
  export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
7
7
  export { SignalBaseClass } from '@lwc/signals';
@@ -608,12 +608,23 @@ function componentValueObserved(vm, key, target = {}) {
608
608
  if (lwcRuntimeFlags.ENABLE_EXPERIMENTAL_SIGNALS &&
609
609
  isObject(target) &&
610
610
  !isNull(target) &&
611
- isTrustedSignal(target) &&
612
611
  process.env.IS_BROWSER &&
613
612
  // Only subscribe if a template is being rendered by the engine
614
613
  tro.isObserving()) {
615
- // Subscribe the template reactive observer's notify method, which will mark the vm as dirty and schedule hydration.
616
- subscribeToSignal(component, target, tro.notify.bind(tro));
614
+ /**
615
+ * The legacy validation behavior was that this check should only
616
+ * be performed for runtimes that have provided a trustedSignals set.
617
+ * However, this resulted in a bug as all object values were
618
+ * being considered signals in environments where the trustedSignals
619
+ * set had not been defined. The runtime flag has been added as a killswitch
620
+ * in case the fix needs to be reverted.
621
+ */
622
+ if (lwcRuntimeFlags.ENABLE_LEGACY_SIGNAL_CONTEXT_VALIDATION
623
+ ? legacyIsTrustedSignal(target)
624
+ : isTrustedSignal(target)) {
625
+ // Subscribe the template reactive observer's notify method, which will mark the vm as dirty and schedule hydration.
626
+ subscribeToSignal(component, target, tro.notify.bind(tro));
627
+ }
617
628
  }
618
629
  }
619
630
  function createReactiveObserver(callback) {
@@ -8667,5 +8678,5 @@ function readonly(obj) {
8667
8678
  }
8668
8679
 
8669
8680
  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 };
8670
- /** version: 8.20.4 */
8681
+ /** version: 8.20.5 */
8671
8682
  //# 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.20.4",
7
+ "version": "8.20.5",
8
8
  "description": "Core LWC engine APIs.",
9
9
  "keywords": [
10
10
  "lwc"
@@ -46,11 +46,11 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@lwc/features": "8.20.4",
50
- "@lwc/shared": "8.20.4",
51
- "@lwc/signals": "8.20.4"
49
+ "@lwc/features": "8.20.5",
50
+ "@lwc/shared": "8.20.5",
51
+ "@lwc/signals": "8.20.5"
52
52
  },
53
53
  "devDependencies": {
54
54
  "observable-membrane": "2.0.0"
55
55
  }
56
- }
56
+ }