@lwc/engine-core 8.13.0 → 8.13.1-alpha.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/framework/attributes.d.ts +1 -0
- package/dist/framework/invoker.d.ts +1 -1
- package/dist/framework/overridable-hooks.d.ts +6 -0
- package/dist/index.cjs.js +19 -4
- package/dist/index.js +19 -4
- package/dist/libs/aria-reflection/aria-reflection.d.ts +1 -0
- package/dist/libs/aria-reflection/attr-reflection.d.ts +2 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultDefHTMLPropertyNames: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LightningElement } from './base-lightning-element';
|
|
1
|
+
import type { LightningElement } from './base-lightning-element';
|
|
2
2
|
import type { VM } from './vm';
|
|
3
3
|
import type { LightningElementConstructor } from './base-lightning-element';
|
|
4
4
|
import type { VNodes } from './vnodes';
|
package/dist/index.cjs.js
CHANGED
|
@@ -304,6 +304,18 @@ function safelyCallGetter(target, key) {
|
|
|
304
304
|
/* ignore */
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
+
function isRevokedProxy(target) {
|
|
308
|
+
try {
|
|
309
|
+
// `str in obj` will never throw for normal objects or active proxies,
|
|
310
|
+
// but the operation is not allowed for revoked proxies
|
|
311
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
312
|
+
'' in target;
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
catch (_) {
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
307
319
|
/**
|
|
308
320
|
* Flush all the logs we've written so far and return the current logs.
|
|
309
321
|
*/
|
|
@@ -366,7 +378,8 @@ function trackTargetForMutationLogging(key, target) {
|
|
|
366
378
|
// Guard against recursive objects - don't traverse forever
|
|
367
379
|
return;
|
|
368
380
|
}
|
|
369
|
-
|
|
381
|
+
// Revoked proxies (e.g. window props in LWS sandboxes) throw an error if we try to track them
|
|
382
|
+
if (shared.isObject(target) && !shared.isNull(target) && !isRevokedProxy(target)) {
|
|
370
383
|
// only track non-primitives; others are invalid as WeakMap keys
|
|
371
384
|
targetsToPropertyKeys.set(target, key);
|
|
372
385
|
// Deeply traverse arrays and objects to track every object within
|
|
@@ -6481,9 +6494,11 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6481
6494
|
// the "instanceof" operator would not work here since Locker Service provides its own
|
|
6482
6495
|
// implementation of LightningElement, so we indirectly check if the base constructor is
|
|
6483
6496
|
// invoked by accessing the component on the vm.
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6497
|
+
// TODO [W-17769475]: Restore this fix when we can reliably detect Locker enabled
|
|
6498
|
+
// const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
|
|
6499
|
+
// ? vmBeingConstructed.component !== result
|
|
6500
|
+
// : !(result instanceof LightningElement);
|
|
6501
|
+
const isInvalidConstructor = vmBeingConstructed.component !== result;
|
|
6487
6502
|
if (isInvalidConstructor) {
|
|
6488
6503
|
throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
|
|
6489
6504
|
}
|
package/dist/index.js
CHANGED
|
@@ -301,6 +301,18 @@ function safelyCallGetter(target, key) {
|
|
|
301
301
|
/* ignore */
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
+
function isRevokedProxy(target) {
|
|
305
|
+
try {
|
|
306
|
+
// `str in obj` will never throw for normal objects or active proxies,
|
|
307
|
+
// but the operation is not allowed for revoked proxies
|
|
308
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
309
|
+
'' in target;
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
catch (_) {
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
304
316
|
/**
|
|
305
317
|
* Flush all the logs we've written so far and return the current logs.
|
|
306
318
|
*/
|
|
@@ -363,7 +375,8 @@ function trackTargetForMutationLogging(key, target) {
|
|
|
363
375
|
// Guard against recursive objects - don't traverse forever
|
|
364
376
|
return;
|
|
365
377
|
}
|
|
366
|
-
|
|
378
|
+
// Revoked proxies (e.g. window props in LWS sandboxes) throw an error if we try to track them
|
|
379
|
+
if (isObject(target) && !isNull(target) && !isRevokedProxy(target)) {
|
|
367
380
|
// only track non-primitives; others are invalid as WeakMap keys
|
|
368
381
|
targetsToPropertyKeys.set(target, key);
|
|
369
382
|
// Deeply traverse arrays and objects to track every object within
|
|
@@ -6478,9 +6491,11 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
6478
6491
|
// the "instanceof" operator would not work here since Locker Service provides its own
|
|
6479
6492
|
// implementation of LightningElement, so we indirectly check if the base constructor is
|
|
6480
6493
|
// invoked by accessing the component on the vm.
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6494
|
+
// TODO [W-17769475]: Restore this fix when we can reliably detect Locker enabled
|
|
6495
|
+
// const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
|
|
6496
|
+
// ? vmBeingConstructed.component !== result
|
|
6497
|
+
// : !(result instanceof LightningElement);
|
|
6498
|
+
const isInvalidConstructor = vmBeingConstructed.component !== result;
|
|
6484
6499
|
if (isInvalidConstructor) {
|
|
6485
6500
|
throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
|
|
6486
6501
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ariaReflectionPolyfillDescriptors: any;
|
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.13.0",
|
|
7
|
+
"version": "8.13.1-alpha.0",
|
|
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.13.0",
|
|
50
|
-
"@lwc/shared": "8.13.0",
|
|
51
|
-
"@lwc/signals": "8.13.0"
|
|
49
|
+
"@lwc/features": "8.13.1-alpha.0",
|
|
50
|
+
"@lwc/shared": "8.13.1-alpha.0",
|
|
51
|
+
"@lwc/signals": "8.13.1-alpha.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"observable-membrane": "2.0.0"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|