@lwc/engine-core 8.12.6-alpha.0 → 8.12.6
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/profiler.d.ts +4 -3
- package/dist/index.cjs.js +25 -17
- package/dist/index.js +25 -17
- package/package.json +5 -5
- package/dist/framework/attributes.d.ts +0 -1
- package/dist/framework/overridable-hooks.d.ts +0 -6
- package/dist/libs/aria-reflection/aria-reflection.d.ts +0 -1
- package/dist/libs/aria-reflection/attr-reflection.d.ts +0 -2
|
@@ -9,10 +9,11 @@ export declare const enum OperationId {
|
|
|
9
9
|
RenderedCallback = 4,
|
|
10
10
|
DisconnectedCallback = 5,
|
|
11
11
|
ErrorCallback = 6,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
GlobalRender = 7,
|
|
13
|
+
GlobalRerender = 8,
|
|
14
|
+
GlobalSsrHydrate = 9
|
|
14
15
|
}
|
|
15
|
-
type GlobalOperationId = OperationId.
|
|
16
|
+
type GlobalOperationId = OperationId.GlobalRender | OperationId.GlobalRerender | OperationId.GlobalSsrHydrate;
|
|
16
17
|
declare const enum Phase {
|
|
17
18
|
Start = 0,
|
|
18
19
|
Stop = 1
|
package/dist/index.cjs.js
CHANGED
|
@@ -5824,8 +5824,9 @@ const operationIdNameMapping = [
|
|
|
5824
5824
|
'renderedCallback',
|
|
5825
5825
|
'disconnectedCallback',
|
|
5826
5826
|
'errorCallback',
|
|
5827
|
-
'lwc-
|
|
5828
|
-
'lwc-
|
|
5827
|
+
'lwc-render',
|
|
5828
|
+
'lwc-rerender',
|
|
5829
|
+
'lwc-ssr-hydrate',
|
|
5829
5830
|
];
|
|
5830
5831
|
const operationTooltipMapping = [
|
|
5831
5832
|
// constructor
|
|
@@ -5842,10 +5843,12 @@ const operationTooltipMapping = [
|
|
|
5842
5843
|
'component disconnectedCallback()',
|
|
5843
5844
|
// errorCallback
|
|
5844
5845
|
'component errorCallback()',
|
|
5845
|
-
// lwc-
|
|
5846
|
+
// lwc-render
|
|
5846
5847
|
'component first rendered',
|
|
5847
|
-
// lwc-
|
|
5848
|
+
// lwc-rerender
|
|
5848
5849
|
'component re-rendered',
|
|
5850
|
+
// lwc-ssr-hydrate
|
|
5851
|
+
'component hydrated from server-rendered HTML',
|
|
5849
5852
|
];
|
|
5850
5853
|
// Even if all the browser the engine supports implements the UserTiming API, we need to guard the measure APIs.
|
|
5851
5854
|
// JSDom (used in Jest) for example doesn't implement the UserTiming APIs.
|
|
@@ -5899,13 +5902,14 @@ function getProperties(vm) {
|
|
|
5899
5902
|
function getColor(opId) {
|
|
5900
5903
|
// As of Sept 2024: primary (dark blue), secondary (light blue), tertiary (green)
|
|
5901
5904
|
switch (opId) {
|
|
5902
|
-
//
|
|
5903
|
-
case 7 /* OperationId.
|
|
5905
|
+
// GlobalSsrHydrate, GlobalRender, and Constructor tend to occur at the top level
|
|
5906
|
+
case 7 /* OperationId.GlobalRender */:
|
|
5907
|
+
case 9 /* OperationId.GlobalSsrHydrate */:
|
|
5904
5908
|
case 0 /* OperationId.Constructor */:
|
|
5905
5909
|
return 'primary';
|
|
5906
|
-
//
|
|
5910
|
+
// GlobalRerender also occurs at the top level, but we want to use tertiary (green) because it's easier to
|
|
5907
5911
|
// distinguish from primary, and at a glance you should be able to easily tell re-renders from first renders.
|
|
5908
|
-
case 8 /* OperationId.
|
|
5912
|
+
case 8 /* OperationId.GlobalRerender */:
|
|
5909
5913
|
return 'tertiary';
|
|
5910
5914
|
// Everything else (patch/render/callbacks)
|
|
5911
5915
|
default:
|
|
@@ -6110,7 +6114,7 @@ function getVMBeingRendered() {
|
|
|
6110
6114
|
function setVMBeingRendered(vm) {
|
|
6111
6115
|
vmBeingRendered = vm;
|
|
6112
6116
|
}
|
|
6113
|
-
const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_
|
|
6117
|
+
const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_]+$/;
|
|
6114
6118
|
// See W-16614556
|
|
6115
6119
|
// TODO [#2826]: freeze the template object
|
|
6116
6120
|
function isValidScopeToken(token) {
|
|
@@ -6478,7 +6482,7 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6478
6482
|
// the "instanceof" operator would not work here since Locker Service provides its own
|
|
6479
6483
|
// implementation of LightningElement, so we indirectly check if the base constructor is
|
|
6480
6484
|
// invoked by accessing the component on the vm.
|
|
6481
|
-
const isInvalidConstructor = lwcRuntimeFlags.
|
|
6485
|
+
const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
|
|
6482
6486
|
? vmBeingConstructed.component !== result
|
|
6483
6487
|
: !(result instanceof LightningElement);
|
|
6484
6488
|
if (isInvalidConstructor) {
|
|
@@ -6667,10 +6671,10 @@ function connectRootElement(elm) {
|
|
|
6667
6671
|
const vm = getAssociatedVM(elm);
|
|
6668
6672
|
if (process.env.NODE_ENV !== 'production') {
|
|
6669
6673
|
// Flush any logs for this VM so that the initial properties from the constructor don't "count"
|
|
6670
|
-
// in subsequent re-renders (lwc-
|
|
6674
|
+
// in subsequent re-renders (lwc-rerender). Right now we're at the first render (lwc-hydrate).
|
|
6671
6675
|
flushMutationLogsForVM(vm);
|
|
6672
6676
|
}
|
|
6673
|
-
logGlobalOperationStartWithVM(7 /* OperationId.
|
|
6677
|
+
logGlobalOperationStartWithVM(7 /* OperationId.GlobalRender */, vm);
|
|
6674
6678
|
// Usually means moving the element from one place to another, which is observable via
|
|
6675
6679
|
// life-cycle hooks.
|
|
6676
6680
|
if (vm.state === 1 /* VMState.connected */) {
|
|
@@ -6678,7 +6682,7 @@ function connectRootElement(elm) {
|
|
|
6678
6682
|
}
|
|
6679
6683
|
runConnectedCallback(vm);
|
|
6680
6684
|
rehydrate(vm);
|
|
6681
|
-
logGlobalOperationEndWithVM(7 /* OperationId.
|
|
6685
|
+
logGlobalOperationEndWithVM(7 /* OperationId.GlobalRender */, vm);
|
|
6682
6686
|
}
|
|
6683
6687
|
function disconnectRootElement(elm) {
|
|
6684
6688
|
const vm = getAssociatedVM(elm);
|
|
@@ -6987,7 +6991,7 @@ function flushRehydrationQueue() {
|
|
|
6987
6991
|
// Gather the logs before rehydration starts so they can be reported at the end of rehydration.
|
|
6988
6992
|
// Note that we also clear all existing logs at this point so that subsequent re-renders start from a clean slate.
|
|
6989
6993
|
const mutationLogs = process.env.NODE_ENV === 'production' ? undefined : getAndFlushMutationLogs();
|
|
6990
|
-
logGlobalOperationStart(8 /* OperationId.
|
|
6994
|
+
logGlobalOperationStart(8 /* OperationId.GlobalRerender */);
|
|
6991
6995
|
if (process.env.NODE_ENV !== 'production') {
|
|
6992
6996
|
shared.assert.invariant(rehydrateQueue.length, `If rehydrateQueue was scheduled, it is because there must be at least one VM on this pending queue instead of ${rehydrateQueue}.`);
|
|
6993
6997
|
}
|
|
@@ -7007,13 +7011,13 @@ function flushRehydrationQueue() {
|
|
|
7007
7011
|
shared.ArrayUnshift.apply(rehydrateQueue, shared.ArraySlice.call(vms, i + 1));
|
|
7008
7012
|
}
|
|
7009
7013
|
// we need to end the measure before throwing.
|
|
7010
|
-
logGlobalOperationEnd(8 /* OperationId.
|
|
7014
|
+
logGlobalOperationEnd(8 /* OperationId.GlobalRerender */, mutationLogs);
|
|
7011
7015
|
// re-throwing the original error will break the current tick, but since the next tick is
|
|
7012
7016
|
// already scheduled, it should continue patching the rest.
|
|
7013
7017
|
throw error;
|
|
7014
7018
|
}
|
|
7015
7019
|
}
|
|
7016
|
-
logGlobalOperationEnd(8 /* OperationId.
|
|
7020
|
+
logGlobalOperationEnd(8 /* OperationId.GlobalRerender */, mutationLogs);
|
|
7017
7021
|
}
|
|
7018
7022
|
function runConnectedCallback(vm) {
|
|
7019
7023
|
const { state } = vm;
|
|
@@ -7619,6 +7623,7 @@ const EMPTY_SET = new Set();
|
|
|
7619
7623
|
let hasMismatch = false;
|
|
7620
7624
|
function hydrateRoot(vm) {
|
|
7621
7625
|
hasMismatch = false;
|
|
7626
|
+
logGlobalOperationStartWithVM(9 /* OperationId.GlobalSsrHydrate */, vm);
|
|
7622
7627
|
runConnectedCallback(vm);
|
|
7623
7628
|
hydrateVM(vm);
|
|
7624
7629
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7631,6 +7636,7 @@ function hydrateRoot(vm) {
|
|
|
7631
7636
|
logHydrationWarning('Hydration completed with errors.');
|
|
7632
7637
|
}
|
|
7633
7638
|
}
|
|
7639
|
+
logGlobalOperationEndWithVM(9 /* OperationId.GlobalSsrHydrate */, vm);
|
|
7634
7640
|
}
|
|
7635
7641
|
function hydrateVM(vm) {
|
|
7636
7642
|
const children = renderComponent(vm);
|
|
@@ -7638,7 +7644,9 @@ function hydrateVM(vm) {
|
|
|
7638
7644
|
// reset the refs; they will be set during `hydrateChildren`
|
|
7639
7645
|
resetRefVNodes(vm);
|
|
7640
7646
|
const { renderRoot: parentNode, renderer: { getFirstChild }, } = vm;
|
|
7647
|
+
logOperationStart(2 /* OperationId.Patch */, vm);
|
|
7641
7648
|
hydrateChildren(getFirstChild(parentNode), children, parentNode, vm, false);
|
|
7649
|
+
logOperationEnd(2 /* OperationId.Patch */, vm);
|
|
7642
7650
|
runRenderedCallback(vm);
|
|
7643
7651
|
}
|
|
7644
7652
|
function hydrateNode(node, vnode, renderer) {
|
|
@@ -8480,5 +8488,5 @@ exports.swapTemplate = swapTemplate;
|
|
|
8480
8488
|
exports.track = track;
|
|
8481
8489
|
exports.unwrap = unwrap;
|
|
8482
8490
|
exports.wire = wire;
|
|
8483
|
-
/** version: 8.12.
|
|
8491
|
+
/** version: 8.12.6 */
|
|
8484
8492
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
|
@@ -5821,8 +5821,9 @@ const operationIdNameMapping = [
|
|
|
5821
5821
|
'renderedCallback',
|
|
5822
5822
|
'disconnectedCallback',
|
|
5823
5823
|
'errorCallback',
|
|
5824
|
-
'lwc-
|
|
5825
|
-
'lwc-
|
|
5824
|
+
'lwc-render',
|
|
5825
|
+
'lwc-rerender',
|
|
5826
|
+
'lwc-ssr-hydrate',
|
|
5826
5827
|
];
|
|
5827
5828
|
const operationTooltipMapping = [
|
|
5828
5829
|
// constructor
|
|
@@ -5839,10 +5840,12 @@ const operationTooltipMapping = [
|
|
|
5839
5840
|
'component disconnectedCallback()',
|
|
5840
5841
|
// errorCallback
|
|
5841
5842
|
'component errorCallback()',
|
|
5842
|
-
// lwc-
|
|
5843
|
+
// lwc-render
|
|
5843
5844
|
'component first rendered',
|
|
5844
|
-
// lwc-
|
|
5845
|
+
// lwc-rerender
|
|
5845
5846
|
'component re-rendered',
|
|
5847
|
+
// lwc-ssr-hydrate
|
|
5848
|
+
'component hydrated from server-rendered HTML',
|
|
5846
5849
|
];
|
|
5847
5850
|
// Even if all the browser the engine supports implements the UserTiming API, we need to guard the measure APIs.
|
|
5848
5851
|
// JSDom (used in Jest) for example doesn't implement the UserTiming APIs.
|
|
@@ -5896,13 +5899,14 @@ function getProperties(vm) {
|
|
|
5896
5899
|
function getColor(opId) {
|
|
5897
5900
|
// As of Sept 2024: primary (dark blue), secondary (light blue), tertiary (green)
|
|
5898
5901
|
switch (opId) {
|
|
5899
|
-
//
|
|
5900
|
-
case 7 /* OperationId.
|
|
5902
|
+
// GlobalSsrHydrate, GlobalRender, and Constructor tend to occur at the top level
|
|
5903
|
+
case 7 /* OperationId.GlobalRender */:
|
|
5904
|
+
case 9 /* OperationId.GlobalSsrHydrate */:
|
|
5901
5905
|
case 0 /* OperationId.Constructor */:
|
|
5902
5906
|
return 'primary';
|
|
5903
|
-
//
|
|
5907
|
+
// GlobalRerender also occurs at the top level, but we want to use tertiary (green) because it's easier to
|
|
5904
5908
|
// distinguish from primary, and at a glance you should be able to easily tell re-renders from first renders.
|
|
5905
|
-
case 8 /* OperationId.
|
|
5909
|
+
case 8 /* OperationId.GlobalRerender */:
|
|
5906
5910
|
return 'tertiary';
|
|
5907
5911
|
// Everything else (patch/render/callbacks)
|
|
5908
5912
|
default:
|
|
@@ -6107,7 +6111,7 @@ function getVMBeingRendered() {
|
|
|
6107
6111
|
function setVMBeingRendered(vm) {
|
|
6108
6112
|
vmBeingRendered = vm;
|
|
6109
6113
|
}
|
|
6110
|
-
const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_
|
|
6114
|
+
const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_]+$/;
|
|
6111
6115
|
// See W-16614556
|
|
6112
6116
|
// TODO [#2826]: freeze the template object
|
|
6113
6117
|
function isValidScopeToken(token) {
|
|
@@ -6475,7 +6479,7 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6475
6479
|
// the "instanceof" operator would not work here since Locker Service provides its own
|
|
6476
6480
|
// implementation of LightningElement, so we indirectly check if the base constructor is
|
|
6477
6481
|
// invoked by accessing the component on the vm.
|
|
6478
|
-
const isInvalidConstructor = lwcRuntimeFlags.
|
|
6482
|
+
const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
|
|
6479
6483
|
? vmBeingConstructed.component !== result
|
|
6480
6484
|
: !(result instanceof LightningElement);
|
|
6481
6485
|
if (isInvalidConstructor) {
|
|
@@ -6664,10 +6668,10 @@ function connectRootElement(elm) {
|
|
|
6664
6668
|
const vm = getAssociatedVM(elm);
|
|
6665
6669
|
if (process.env.NODE_ENV !== 'production') {
|
|
6666
6670
|
// Flush any logs for this VM so that the initial properties from the constructor don't "count"
|
|
6667
|
-
// in subsequent re-renders (lwc-
|
|
6671
|
+
// in subsequent re-renders (lwc-rerender). Right now we're at the first render (lwc-hydrate).
|
|
6668
6672
|
flushMutationLogsForVM(vm);
|
|
6669
6673
|
}
|
|
6670
|
-
logGlobalOperationStartWithVM(7 /* OperationId.
|
|
6674
|
+
logGlobalOperationStartWithVM(7 /* OperationId.GlobalRender */, vm);
|
|
6671
6675
|
// Usually means moving the element from one place to another, which is observable via
|
|
6672
6676
|
// life-cycle hooks.
|
|
6673
6677
|
if (vm.state === 1 /* VMState.connected */) {
|
|
@@ -6675,7 +6679,7 @@ function connectRootElement(elm) {
|
|
|
6675
6679
|
}
|
|
6676
6680
|
runConnectedCallback(vm);
|
|
6677
6681
|
rehydrate(vm);
|
|
6678
|
-
logGlobalOperationEndWithVM(7 /* OperationId.
|
|
6682
|
+
logGlobalOperationEndWithVM(7 /* OperationId.GlobalRender */, vm);
|
|
6679
6683
|
}
|
|
6680
6684
|
function disconnectRootElement(elm) {
|
|
6681
6685
|
const vm = getAssociatedVM(elm);
|
|
@@ -6984,7 +6988,7 @@ function flushRehydrationQueue() {
|
|
|
6984
6988
|
// Gather the logs before rehydration starts so they can be reported at the end of rehydration.
|
|
6985
6989
|
// Note that we also clear all existing logs at this point so that subsequent re-renders start from a clean slate.
|
|
6986
6990
|
const mutationLogs = process.env.NODE_ENV === 'production' ? undefined : getAndFlushMutationLogs();
|
|
6987
|
-
logGlobalOperationStart(8 /* OperationId.
|
|
6991
|
+
logGlobalOperationStart(8 /* OperationId.GlobalRerender */);
|
|
6988
6992
|
if (process.env.NODE_ENV !== 'production') {
|
|
6989
6993
|
assert.invariant(rehydrateQueue.length, `If rehydrateQueue was scheduled, it is because there must be at least one VM on this pending queue instead of ${rehydrateQueue}.`);
|
|
6990
6994
|
}
|
|
@@ -7004,13 +7008,13 @@ function flushRehydrationQueue() {
|
|
|
7004
7008
|
ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, i + 1));
|
|
7005
7009
|
}
|
|
7006
7010
|
// we need to end the measure before throwing.
|
|
7007
|
-
logGlobalOperationEnd(8 /* OperationId.
|
|
7011
|
+
logGlobalOperationEnd(8 /* OperationId.GlobalRerender */, mutationLogs);
|
|
7008
7012
|
// re-throwing the original error will break the current tick, but since the next tick is
|
|
7009
7013
|
// already scheduled, it should continue patching the rest.
|
|
7010
7014
|
throw error;
|
|
7011
7015
|
}
|
|
7012
7016
|
}
|
|
7013
|
-
logGlobalOperationEnd(8 /* OperationId.
|
|
7017
|
+
logGlobalOperationEnd(8 /* OperationId.GlobalRerender */, mutationLogs);
|
|
7014
7018
|
}
|
|
7015
7019
|
function runConnectedCallback(vm) {
|
|
7016
7020
|
const { state } = vm;
|
|
@@ -7616,6 +7620,7 @@ const EMPTY_SET = new Set();
|
|
|
7616
7620
|
let hasMismatch = false;
|
|
7617
7621
|
function hydrateRoot(vm) {
|
|
7618
7622
|
hasMismatch = false;
|
|
7623
|
+
logGlobalOperationStartWithVM(9 /* OperationId.GlobalSsrHydrate */, vm);
|
|
7619
7624
|
runConnectedCallback(vm);
|
|
7620
7625
|
hydrateVM(vm);
|
|
7621
7626
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7628,6 +7633,7 @@ function hydrateRoot(vm) {
|
|
|
7628
7633
|
logHydrationWarning('Hydration completed with errors.');
|
|
7629
7634
|
}
|
|
7630
7635
|
}
|
|
7636
|
+
logGlobalOperationEndWithVM(9 /* OperationId.GlobalSsrHydrate */, vm);
|
|
7631
7637
|
}
|
|
7632
7638
|
function hydrateVM(vm) {
|
|
7633
7639
|
const children = renderComponent(vm);
|
|
@@ -7635,7 +7641,9 @@ function hydrateVM(vm) {
|
|
|
7635
7641
|
// reset the refs; they will be set during `hydrateChildren`
|
|
7636
7642
|
resetRefVNodes(vm);
|
|
7637
7643
|
const { renderRoot: parentNode, renderer: { getFirstChild }, } = vm;
|
|
7644
|
+
logOperationStart(2 /* OperationId.Patch */, vm);
|
|
7638
7645
|
hydrateChildren(getFirstChild(parentNode), children, parentNode, vm, false);
|
|
7646
|
+
logOperationEnd(2 /* OperationId.Patch */, vm);
|
|
7639
7647
|
runRenderedCallback(vm);
|
|
7640
7648
|
}
|
|
7641
7649
|
function hydrateNode(node, vnode, renderer) {
|
|
@@ -8426,5 +8434,5 @@ function readonly(obj) {
|
|
|
8426
8434
|
}
|
|
8427
8435
|
|
|
8428
8436
|
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 };
|
|
8429
|
-
/** version: 8.12.
|
|
8437
|
+
/** version: 8.12.6 */
|
|
8430
8438
|
//# 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.12.6
|
|
7
|
+
"version": "8.12.6",
|
|
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.12.6
|
|
50
|
-
"@lwc/shared": "8.12.6
|
|
51
|
-
"@lwc/signals": "8.12.6
|
|
49
|
+
"@lwc/features": "8.12.6",
|
|
50
|
+
"@lwc/shared": "8.12.6",
|
|
51
|
+
"@lwc/signals": "8.12.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"observable-membrane": "2.0.0"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const defaultDefHTMLPropertyNames: string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ariaReflectionPolyfillDescriptors: any;
|