@lwc/engine-core 8.12.5 → 8.12.6-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.
@@ -0,0 +1 @@
1
+ export declare const defaultDefHTMLPropertyNames: string[];
@@ -1,5 +1,6 @@
1
+ import { LightningElement } from './base-lightning-element';
1
2
  import type { VM } from './vm';
2
- import type { LightningElement, LightningElementConstructor } from './base-lightning-element';
3
+ import type { LightningElementConstructor } from './base-lightning-element';
3
4
  import type { VNodes } from './vnodes';
4
5
  export declare let isInvokingRender: boolean;
5
6
  export declare let vmBeingConstructed: VM | null;
@@ -0,0 +1,6 @@
1
+ import { SanitizeHtmlContentHook } from './api';
2
+ interface OverridableHooksDef {
3
+ sanitizeHtmlContent: SanitizeHtmlContentHook;
4
+ }
5
+ export declare function setHooks(hooks: OverridableHooksDef): void;
6
+ export {};
package/dist/index.cjs.js CHANGED
@@ -2960,7 +2960,10 @@ function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observe
2960
2960
  const { observedAttributes: superObservedAttributes = [] } = SuperClass;
2961
2961
  const descriptors = shared.create(null);
2962
2962
  // present a hint message so that developers are aware that they have not decorated property with @api
2963
- if (process.env.NODE_ENV !== 'production') {
2963
+ // Note that we also don't do this in SSR because we cannot sniff for what props are declared on
2964
+ // HTMLElementPrototype, and it seems not worth it to have these dev-only warnings there, since
2965
+ // an `in` check could mistakenly assume that a prop is declared on a LightningElement prototype.
2966
+ if (process.env.NODE_ENV !== 'production' && process.env.IS_BROWSER) {
2964
2967
  // TODO [#3761]: enable for components that don't extend from LightningElement
2965
2968
  if (!shared.isUndefined(proto) && !shared.isNull(proto) && !hasCustomSuperClass) {
2966
2969
  const nonPublicPropertiesToWarnOn = new Set([
@@ -6475,7 +6478,10 @@ function invokeComponentConstructor(vm, Ctor) {
6475
6478
  // the "instanceof" operator would not work here since Locker Service provides its own
6476
6479
  // implementation of LightningElement, so we indirectly check if the base constructor is
6477
6480
  // invoked by accessing the component on the vm.
6478
- if (vmBeingConstructed.component !== result) {
6481
+ const isInvalidConstructor = lwcRuntimeFlags.ENABLE_LEGACY_LOCKER_SUPPORT
6482
+ ? vmBeingConstructed.component !== result
6483
+ : !(result instanceof LightningElement);
6484
+ if (isInvalidConstructor) {
6479
6485
  throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
6480
6486
  }
6481
6487
  }
package/dist/index.js CHANGED
@@ -2957,7 +2957,10 @@ function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observe
2957
2957
  const { observedAttributes: superObservedAttributes = [] } = SuperClass;
2958
2958
  const descriptors = create(null);
2959
2959
  // present a hint message so that developers are aware that they have not decorated property with @api
2960
- if (process.env.NODE_ENV !== 'production') {
2960
+ // Note that we also don't do this in SSR because we cannot sniff for what props are declared on
2961
+ // HTMLElementPrototype, and it seems not worth it to have these dev-only warnings there, since
2962
+ // an `in` check could mistakenly assume that a prop is declared on a LightningElement prototype.
2963
+ if (process.env.NODE_ENV !== 'production' && process.env.IS_BROWSER) {
2961
2964
  // TODO [#3761]: enable for components that don't extend from LightningElement
2962
2965
  if (!isUndefined$1(proto) && !isNull(proto) && !hasCustomSuperClass) {
2963
2966
  const nonPublicPropertiesToWarnOn = new Set([
@@ -6472,7 +6475,10 @@ function invokeComponentConstructor(vm, Ctor) {
6472
6475
  // the "instanceof" operator would not work here since Locker Service provides its own
6473
6476
  // implementation of LightningElement, so we indirectly check if the base constructor is
6474
6477
  // invoked by accessing the component on the vm.
6475
- if (vmBeingConstructed.component !== result) {
6478
+ const isInvalidConstructor = lwcRuntimeFlags.ENABLE_LEGACY_LOCKER_SUPPORT
6479
+ ? vmBeingConstructed.component !== result
6480
+ : !(result instanceof LightningElement);
6481
+ if (isInvalidConstructor) {
6476
6482
  throw new TypeError('Invalid component constructor, the class should extend LightningElement.');
6477
6483
  }
6478
6484
  }
@@ -0,0 +1 @@
1
+ export declare const ariaReflectionPolyfillDescriptors: any;
@@ -0,0 +1,2 @@
1
+ declare const descriptors: Record<string, PropertyDescriptor>;
2
+ export { descriptors as propToAttrReflectionPolyfillDescriptors };
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.5",
7
+ "version": "8.12.6-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.12.5",
50
- "@lwc/shared": "8.12.5",
51
- "@lwc/signals": "8.12.5"
49
+ "@lwc/features": "8.12.6-alpha.0",
50
+ "@lwc/shared": "8.12.6-alpha.0",
51
+ "@lwc/signals": "8.12.6-alpha.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "observable-membrane": "2.0.0"
55
55
  }
56
- }
56
+ }