@lwc/engine-core 8.10.0 → 8.10.2
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/framework/utils.d.ts +1 -0
- package/dist/index.cjs.js +15 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 Salesforce, Inc.
|
|
3
3
|
*/
|
|
4
4
|
import { noop, isNull, ArrayPush as ArrayPush$1, StringToLowerCase, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, seal, create, isAPIFeatureEnabled, isFunction as isFunction$1, keys, toString as toString$1, 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, defineProperties, assign, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, KEY__SYNTHETIC_MODE, freeze, assert, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, isTrue, KEY__SCOPED_CSS, KEY__NATIVE_ONLY_CSS, ArrayMap, ArraySplice, flattenStylesheets, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, StringSlice, KEY__SHADOW_RESOLVER, ArraySome, SVG_NAMESPACE, KEY__SHADOW_STATIC, StringTrim, sanitizeHtmlContent, StringReplace, isNumber, ArraySort, ArrayFrom, StringCharAt, htmlEscape, LOWEST_API_VERSION, 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 { setHooks, setTrustedSignalSet } from '@lwc/shared';
|
|
@@ -248,6 +248,16 @@ function shouldBeFormAssociated(Ctor) {
|
|
|
248
248
|
}
|
|
249
249
|
return ctorFormAssociated && apiFeatureEnabled;
|
|
250
250
|
}
|
|
251
|
+
// check if a property is in an object, and if the object throws an error merely because we are
|
|
252
|
+
// checking if the property exists, return false
|
|
253
|
+
function safeHasProp(obj, prop) {
|
|
254
|
+
try {
|
|
255
|
+
return prop in obj;
|
|
256
|
+
}
|
|
257
|
+
catch (_err) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
251
261
|
|
|
252
262
|
/*
|
|
253
263
|
* Copyright (c) 2024, Salesforce, Inc.
|
|
@@ -588,14 +598,14 @@ function componentValueObserved(vm, key, target = {}) {
|
|
|
588
598
|
valueObserved(component, key);
|
|
589
599
|
}
|
|
590
600
|
// The portion of reactivity that's exposed to signals is to subscribe a callback to re-render the VM (templates).
|
|
591
|
-
// We check
|
|
601
|
+
// We check the following to ensure re-render is subscribed at the correct time.
|
|
592
602
|
// 1. The template is currently being rendered (there is a template reactive observer)
|
|
593
603
|
// 2. There was a call to a getter to access the signal (happens during vnode generation)
|
|
594
604
|
if (lwcRuntimeFlags.ENABLE_EXPERIMENTAL_SIGNALS &&
|
|
595
605
|
isObject(target) &&
|
|
596
606
|
!isNull(target) &&
|
|
597
|
-
'value'
|
|
598
|
-
'subscribe'
|
|
607
|
+
safeHasProp(target, 'value') &&
|
|
608
|
+
safeHasProp(target, 'subscribe') &&
|
|
599
609
|
isFunction$1(target.subscribe) &&
|
|
600
610
|
isTrustedSignal(target) &&
|
|
601
611
|
// Only subscribe if a template is being rendered by the engine
|
|
@@ -8545,5 +8555,5 @@ function readonly(obj) {
|
|
|
8545
8555
|
}
|
|
8546
8556
|
|
|
8547
8557
|
export { 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 };
|
|
8548
|
-
/** version: 8.10.
|
|
8558
|
+
/** version: 8.10.2 */
|
|
8549
8559
|
//# sourceMappingURL=index.js.map
|