From 48b687fc95a172cec8f305312a27d105e5719581 Mon Sep 17 00:00:00 2001 From: an onion Date: Mon, 30 Jan 2023 10:26:04 -0800 Subject: [PATCH] [trusted types][www] Add enableTrustedTypesIntegration flag back in (#26016) ## Summary The flag was first added in #16157 and was rolled out to employees in D17430095. #25997 removed this flag because it wasn't dynamically set to a value in www. The www side was mistakenly removed in D41851685 due to deprecation of a TypedJSModule but we still want to keep this flag, so let's add it back in + add a GK on the www side to match the previous rollout. See D42574435 for the dynamic value change in www ## How did you test this change? ``` yarn test yarn test --prod ``` --- packages/shared/forks/ReactFeatureFlags.www-dynamic.js | 1 + packages/shared/forks/ReactFeatureFlags.www.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index 0297c7dd44fcd..b2882118be1d7 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -51,6 +51,7 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; // TODO: These flags are hard-coded to the default values used in open source. // Update the tests so that they pass in either mode, then set these // to __VARIANT__. +export const enableTrustedTypesIntegration = false; export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; export const disableNativeComponentFrames = false; // You probably *don't* want to add more hardcoded ones. diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 76ea71d342a32..6cc8f83172930 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -16,6 +16,7 @@ const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags'); export const { disableInputAttributeSyncing, + enableTrustedTypesIntegration, disableSchedulerTimeoutBasedOnReactExpirationTime, warnAboutSpreadingKeyToJSX, replayFailedUnitOfWorkWithInvokeGuardedCallback, @@ -55,7 +56,6 @@ export const enableUseMemoCacheHook = true; export const enableUseEffectEventHook = true; export const enableHostSingletons = true; export const enableClientRenderFallbackOnTextMismatch = false; -export const enableTrustedTypesIntegration = false; // Logs additional User Timing API marks for use with an experimental profiling tool. export const enableSchedulingProfiler: boolean =