From fc44b9fc4d42c640729fa5b9ee48bb8cfb1a439b Mon Sep 17 00:00:00 2001 From: Alex Florisca Date: Mon, 14 Nov 2022 09:07:49 +0000 Subject: [PATCH] Remove the experimental flag that's used to include thunks in wp.data (https://github.com/woocommerce/woocommerce-blocks/pull/7617) * Remove the experimental flag that's used to include thunks in wp.data * bot: update checkstyle.xml * Fix ts error from previous PR * bot: update checkstyle.xml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- plugins/woocommerce-blocks/assets/js/data/checkout/index.ts | 4 ---- plugins/woocommerce-blocks/assets/js/data/payment/index.ts | 4 ---- plugins/woocommerce-blocks/assets/js/data/validation/index.ts | 4 ---- .../assets/js/types/type-defs/product-response.ts | 1 + plugins/woocommerce-blocks/checkstyle.xml | 4 ++-- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/data/checkout/index.ts b/plugins/woocommerce-blocks/assets/js/data/checkout/index.ts index 237664d645b..cd26412a047 100644 --- a/plugins/woocommerce-blocks/assets/js/data/checkout/index.ts +++ b/plugins/woocommerce-blocks/assets/js/data/checkout/index.ts @@ -16,10 +16,6 @@ export const config = { reducer, selectors, actions, - // TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore We pass this in case there is an older version of Gutenberg running. - __experimentalUseThunks: true, }; const store = createReduxStore( STORE_KEY, config ); diff --git a/plugins/woocommerce-blocks/assets/js/data/payment/index.ts b/plugins/woocommerce-blocks/assets/js/data/payment/index.ts index 95b67462982..9d7820d15b4 100644 --- a/plugins/woocommerce-blocks/assets/js/data/payment/index.ts +++ b/plugins/woocommerce-blocks/assets/js/data/payment/index.ts @@ -20,10 +20,6 @@ export const config = { actions, // eslint-disable-next-line @typescript-eslint/no-explicit-any controls: { ...dataControls, ...sharedControls } as any, - // TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore We pass this in case there is an older version of Gutenberg running. - __experimentalUseThunks: true, }; const store = createReduxStore( STORE_KEY, config ); diff --git a/plugins/woocommerce-blocks/assets/js/data/validation/index.ts b/plugins/woocommerce-blocks/assets/js/data/validation/index.ts index 8241a611614..2355c045438 100644 --- a/plugins/woocommerce-blocks/assets/js/data/validation/index.ts +++ b/plugins/woocommerce-blocks/assets/js/data/validation/index.ts @@ -16,10 +16,6 @@ export const config = { reducer, selectors, actions, - // TODO: Gutenberg with Thunks was released in WP 6.0. Once 6.1 is released, remove the experimental flag here - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore We pass this in case there is an older version of Gutenberg running. - __experimentalUseThunks: true, }; const store = createReduxStore( STORE_KEY, config ); diff --git a/plugins/woocommerce-blocks/assets/js/types/type-defs/product-response.ts b/plugins/woocommerce-blocks/assets/js/types/type-defs/product-response.ts index 8c1d037bde5..c12ae4b1a2f 100644 --- a/plugins/woocommerce-blocks/assets/js/types/type-defs/product-response.ts +++ b/plugins/woocommerce-blocks/assets/js/types/type-defs/product-response.ts @@ -20,6 +20,7 @@ export interface ProductResponseItemBaseData { value: string; display?: string; hidden?: boolean; + className?: string; } export type ProductResponseItemData = ProductResponseItemBaseData & diff --git a/plugins/woocommerce-blocks/checkstyle.xml b/plugins/woocommerce-blocks/checkstyle.xml index 0d6eeb08414..f0b7e3e8e86 100644 --- a/plugins/woocommerce-blocks/checkstyle.xml +++ b/plugins/woocommerce-blocks/checkstyle.xml @@ -647,7 +647,7 @@ - -