Skip to content

Commit 8d3bc08

Browse files
chore: change locker support flag for clarity (#5163)
1 parent ad9a492 commit 8d3bc08

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

packages/@lwc/engine-core/src/framework/invoker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function invokeComponentConstructor(vm: VM, Ctor: LightningElementConstru
5858
// the "instanceof" operator would not work here since Locker Service provides its own
5959
// implementation of LightningElement, so we indirectly check if the base constructor is
6060
// invoked by accessing the component on the vm.
61-
const isInvalidConstructor = lwcRuntimeFlags.ENABLE_LEGACY_LOCKER_SUPPORT
61+
const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED
6262
? vmBeingConstructed.component !== result
6363
: !(result instanceof LightningElement);
6464

packages/@lwc/features/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const features: FeatureFlagMap = {
2020
ENABLE_FORCE_SHADOW_MIGRATE_MODE: null,
2121
ENABLE_EXPERIMENTAL_SIGNALS: null,
2222
DISABLE_SYNTHETIC_SHADOW: null,
23-
ENABLE_LEGACY_LOCKER_SUPPORT: null,
23+
LEGACY_LOCKER_ENABLED: null,
2424
};
2525

2626
if (!(globalThis as any).lwcRuntimeFlags) {

packages/@lwc/features/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface FeatureFlagMap {
8080
* If true, then lightning legacy locker is supported, otherwise lightning legacy locker will not function
8181
* properly.
8282
*/
83-
ENABLE_LEGACY_LOCKER_SUPPORT: FeatureFlagValue;
83+
LEGACY_LOCKER_ENABLED: FeatureFlagValue;
8484
}
8585

8686
export type FeatureFlagName = keyof FeatureFlagMap;

packages/@lwc/integration-karma/test/api/createElement/index.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ describe.runIf(process.env.NATIVE_SHADOW)('native shadow', () => {
9898

9999
describe('locker integration', () => {
100100
beforeEach(() => {
101-
setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', true);
101+
setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', true);
102102
});
103103
afterEach(() => {
104-
setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', false);
104+
setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', false);
105105
});
106106
it('should support component class that extend a mirror of the LightningElement', () => {
107107
function SecureBaseClass() {

packages/@lwc/integration-karma/test/integrations/locker/index.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import LockerIntegration from 'x/lockerIntegration';
44
import LockerLiveComponent from 'x/lockerLiveComponent';
55
import LockerHooks, { hooks } from 'x/lockerHooks';
66
beforeEach(() => {
7-
setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', true);
7+
setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', true);
88
});
99
afterEach(() => {
10-
setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', false);
10+
setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', false);
1111
});
1212
it('should support Locker integration which uses a wrapped LightningElement base class', () => {
1313
const elm = createElement('x-secure-parent', { is: LockerIntegration });

0 commit comments

Comments
 (0)