From 0e6d7e9a4091254295e500cf63e7942166ad8a3a Mon Sep 17 00:00:00 2001
From: Tam Mullen
Date: Sat, 24 Dec 2022 01:52:52 +0000
Subject: [PATCH 01/98] Update perf test assertions for when HPOS is
authoritative
---
.../requests/merchant/add-order.js | 36 ++++++++++---------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/plugins/woocommerce/tests/performance/requests/merchant/add-order.js b/plugins/woocommerce/tests/performance/requests/merchant/add-order.js
index 6020ffaa832..308130aa726 100644
--- a/plugins/woocommerce/tests/performance/requests/merchant/add-order.js
+++ b/plugins/woocommerce/tests/performance/requests/merchant/add-order.js
@@ -57,10 +57,10 @@ let admin_update_order_assert;
if ( cot_status === true ) {
admin_new_order_base = 'admin.php?page=wc-orders&action=new';
admin_update_order_base = 'admin.php?page=wc-orders&action=edit';
- admin_new_order_assert = 'Edit order ';
- admin_open_order_assert = 'Edit order ';
+ admin_new_order_assert = 'post_status" type="hidden" value="auto-draft';
+ admin_open_order_assert = 'post_status" type="hidden" value="pending';
admin_created_order_assert = 'changed from auto-draft to';
- admin_update_order_assert = 'changed from auto-draft to';
+ admin_update_order_assert = 'changed from Pending payment to Completed';
} else {
admin_new_order_base = 'post-new.php?post_type=shop_order';
admin_update_order_base = 'post.php';
@@ -145,7 +145,11 @@ export function addOrder() {
.find( 'input[id=post_ID]' )
.first()
.attr( 'value' );
- hpos_post_id = findBetween( response.body, 'post_id":"', '",' );
+ hpos_post_id = findBetween(
+ response.body,
+ ';id=',
+ '" method="post" id="order"'
+ );
heartbeat_nonce = findBetween(
response.body,
'heartbeatSettings = {"nonce":"',
@@ -299,18 +303,18 @@ export function addOrder() {
[ 'order_date_second', '01' ],
[ 'order_note', '' ],
[ 'order_note_type', '' ],
- [ 'order_status', 'wc-pending' ], //change
- [ 'original_post_status', 'auto-draft' ], //wc-pending
- [ 'original_post_title', '' ], //string
+ [ 'order_status', 'wc-pending' ],
+ [ 'original_post_status', 'auto-draft' ],
+ [ 'original_post_title', '' ],
[ 'originalaction', 'editpost' ],
[ 'post_ID', `${ post_id }` ],
[ 'post_author', '1' ],
- [ 'post_status', 'auto-draft' ], //pending
- [ 'post_title', '%2COrder' ], //string
+ [ 'post_status', 'auto-draft' ],
+ [ 'post_title', '%2COrder' ],
[ 'post_type', 'shop_order' ],
[ 'referredby', '' ],
[ 'samplepermalinknonce', `${ sample_permalink_nonce }` ],
- [ 'save', 'Create' ], //Update
+ [ 'save', 'Create' ],
[ 'user_ID', '1' ],
[ 'wc_order_action', '' ],
[ 'woocommerce_meta_nonce', `${ woocommerce_meta_nonce }` ],
@@ -361,11 +365,11 @@ export function addOrder() {
[ 'order_note', '' ],
[ 'order_note_type', '' ],
[ 'order_status', 'wc-pending' ],
- [ 'original_order_status', 'auto-draft' ], //pending
- [ 'post_status', 'auto-draft' ], //pending
+ [ 'original_order_status', 'auto-draft' ],
+ [ 'post_status', 'auto-draft' ],
[ 'post_title', 'Order' ],
[ 'referredby', '' ],
- [ 'save', 'Create' ], //Save
+ [ 'save', 'Create' ],
[ 'wc_order_action', '' ],
[ 'woocommerce_meta_nonce', `${ woocommerce_meta_nonce }` ],
] );
@@ -487,12 +491,12 @@ export function addOrder() {
[ 'order_note_type', '' ],
[ 'order_status', 'wc-completed' ],
[ 'original_post_status', 'wc-pending' ],
- [ 'original_post_title', '' ], //string
+ [ 'original_post_title', '' ],
[ 'originalaction', 'editpost' ],
[ 'post_ID', `${ post_id }` ],
[ 'post_author', '1' ],
[ 'post_status', 'pending' ],
- [ 'post_title', '%2COrder' ], //string
+ [ 'post_title', '%2COrder' ],
[ 'post_type', 'shop_order' ],
[ 'referredby', '' ],
[ 'samplepermalinknonce', `${ sample_permalink_nonce }` ],
@@ -574,8 +578,6 @@ export function addOrder() {
);
check( response, {
'is status 200': ( r ) => r.status === 200,
- "body contains: 'Edit order' header": ( response ) =>
- response.body.includes( `${ admin_open_order_assert }` ),
"body contains: 'Order updated' confirmation": ( response ) =>
response.body.includes( `${ admin_update_order_assert }` ),
} );
From 06e6397dd17352cacedbfb71bdf808c940efffcb Mon Sep 17 00:00:00 2001
From: Tam Mullen
Date: Sat, 24 Dec 2022 01:53:23 +0000
Subject: [PATCH 02/98] Tidy up formatting of perf scenarios
---
.../tests/gh-action-daily-ext-requests.js | 111 ++++++++---------
.../tests/gh-action-pr-requests.js | 7 +-
.../performance/tests/simple-all-requests.js | 113 +++++++++---------
.../performance/tests/wc-baseline-load.js | 113 +++++++++---------
4 files changed, 174 insertions(+), 170 deletions(-)
diff --git a/plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js b/plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
index 01e670e7bb8..7ecec81086e 100644
--- a/plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
+++ b/plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
@@ -83,165 +83,166 @@ export const options = {
},
},
thresholds: {
- checks: ['rate==1'],
+ checks: [ 'rate==1' ],
+ // Listing individual metrics due to https://github.com/grafana/k6/issues/1321
'http_req_duration{name:Shopper - Site Root}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Shop Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Search Products}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Category Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Product Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=add_to_cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Remove Item From Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=apply_coupon}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Update Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=update_order_review}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Order Received}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=get_refreshed_fragments}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Login Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Orders}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Open Order}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Merchant - WP Login Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Login to WP Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - WC-Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/orders?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/reviews?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/low-in-stock?}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - All Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Completed Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - New Order Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Create New Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Open Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update Existing Order Status}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Email}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Address}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - Filter Orders By Month}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Filter Orders By Customer}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - All Products}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Add New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=sample-permalink}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=heartbeat autosave}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Coupons}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/onboarding/tasks?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/admin/notes?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/options?options=woocommerce_ces_tracks_queue}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - action=heartbeat}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:API - Create Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Retrieve Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Update Order (Status)}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Delete Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Create Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Update (Status) Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
},
};
diff --git a/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js b/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js
index ac98b0330f6..afd8f10b4a1 100644
--- a/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js
+++ b/plugins/woocommerce/tests/performance/tests/gh-action-pr-requests.js
@@ -85,6 +85,7 @@ export const options = {
},
thresholds: {
checks: [ 'rate==1' ],
+ // Listing individual metrics due to https://github.com/grafana/k6/issues/1321
'http_req_duration{name:Shopper - Site Root}': [
`${ shopper_request_threshold }`,
],
@@ -140,13 +141,13 @@ export const options = {
`${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Orders}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Open Order}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Merchant - WP Login Page}': [
`${ merchant_request_threshold }`,
diff --git a/plugins/woocommerce/tests/performance/tests/simple-all-requests.js b/plugins/woocommerce/tests/performance/tests/simple-all-requests.js
index 6eb654c15a0..52c79b9dc52 100644
--- a/plugins/woocommerce/tests/performance/tests/simple-all-requests.js
+++ b/plugins/woocommerce/tests/performance/tests/simple-all-requests.js
@@ -87,165 +87,166 @@ export const options = {
},
},
thresholds: {
- checks: ['rate==1'],
+ checks: [ 'rate==1' ],
+ // Listing individual metrics due to https://github.com/grafana/k6/issues/1321
'http_req_duration{name:Shopper - Site Root}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Shop Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Search Products}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Category Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Product Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=add_to_cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Remove Item From Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=apply_coupon}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Update Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=update_order_review}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Order Received}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=get_refreshed_fragments}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Login Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Orders}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Open Order}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Merchant - WP Login Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Login to WP Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - WC-Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/orders?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/reviews?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/low-in-stock?}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - All Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Completed Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - New Order Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Create New Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Open Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update Existing Order Status}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Email}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Address}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - Filter Orders By Month}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Filter Orders By Customer}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - All Products}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Add New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=sample-permalink}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=heartbeat autosave}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Coupons}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/onboarding/tasks?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/admin/notes?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/options?options=woocommerce_ces_tracks_queue}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - action=heartbeat}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:API - Create Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Retrieve Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Update Order (Status)}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Delete Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Create Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Update (Status) Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
},
};
@@ -275,7 +276,7 @@ export function cartFlow() {
}
export function allMerchantFlow() {
- if (admin_acc_login === true) {
+ if ( admin_acc_login === true ) {
myAccountMerchantLogin();
} else {
wpLogin();
diff --git a/plugins/woocommerce/tests/performance/tests/wc-baseline-load.js b/plugins/woocommerce/tests/performance/tests/wc-baseline-load.js
index d2ae164f612..936ecacfb24 100644
--- a/plugins/woocommerce/tests/performance/tests/wc-baseline-load.js
+++ b/plugins/woocommerce/tests/performance/tests/wc-baseline-load.js
@@ -118,171 +118,172 @@ export const options = {
},
},
thresholds: {
+ // Listing individual metrics due to https://github.com/grafana/k6/issues/1321
'http_req_duration{name:Shopper - Site Root}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Shop Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Search Products}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Category Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Product Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=add_to_cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Remove Item From Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=apply_coupon}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Update Cart}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - View Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=update_order_review}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Order Received}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - wc-ajax=get_refreshed_fragments}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to Checkout}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Login Page}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - Login to My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Orders}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Shopper - My Account Open Order}': [
- `${shopper_request_threshold}`,
+ `${ shopper_request_threshold }`,
],
'http_req_duration{name:Merchant - WP Login Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Login to WP Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - WC-Admin}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/orders?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/reviews?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/products/low-in-stock?}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - All Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Completed Orders}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - New Order Page}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Create New Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Open Order}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update Existing Order Status}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Email}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Search Orders By Customer Address}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - Filter Orders By Month}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Filter Orders By Customer}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - All Products}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Add New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=sample-permalink}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - action=heartbeat autosave}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Update New Product}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - Coupons}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/onboarding/tasks?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-analytics/admin/notes?}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:Merchant - wc-admin/options?options=woocommerce_ces_tracks_queue}':
- [`${merchant_request_threshold}`],
+ [ `${ merchant_request_threshold }` ],
'http_req_duration{name:Merchant - action=heartbeat}': [
- `${merchant_request_threshold}`,
+ `${ merchant_request_threshold }`,
],
'http_req_duration{name:API - Create Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Retrieve Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Update Order (Status)}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Delete Order}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Create Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
'http_req_duration{name:API - Batch Update (Status) Orders}': [
- `${api_request_threshold}`,
+ `${ api_request_threshold }`,
],
},
};
// Use myAccountMerchantLogin() instead of wpLogin() if having issues with login.
export function merchantOrderFlows() {
- if (admin_acc_login === true) {
+ if ( admin_acc_login === true ) {
myAccountMerchantLogin();
} else {
wpLogin();
@@ -295,7 +296,7 @@ export function merchantOrderFlows() {
// Use myAccountMerchantLogin() instead of wpLogin() if having issues with login.
export function merchantOtherFlows() {
- if (admin_acc_login === true) {
+ if ( admin_acc_login === true ) {
myAccountMerchantLogin();
} else {
wpLogin();
From 0a6a4f2ec1cb27151c4fa35d3211fd9388d0fb66 Mon Sep 17 00:00:00 2001
From: Tam Mullen
Date: Sat, 24 Dec 2022 01:58:41 +0000
Subject: [PATCH 03/98] Adding changelog
---
plugins/woocommerce/changelog/update-k6-order-requests | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 plugins/woocommerce/changelog/update-k6-order-requests
diff --git a/plugins/woocommerce/changelog/update-k6-order-requests b/plugins/woocommerce/changelog/update-k6-order-requests
new file mode 100644
index 00000000000..fcec53bf351
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-k6-order-requests
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: perf test not included in release package
+
+
From 7a15ad61b74e6303dbfb351339e43d6ac1ddcdfa Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:22:17 +0530
Subject: [PATCH 04/98] Skip custom search for HPOS API queries as it's handled
already.
For HPOS, we don't need a seperate step of passing the args through wc_order_search since we take care of search params in the final query itself. This duplication was actually causing for some results to not be displayed since we were ending up not honouring pagination arguments and would search only in first 10 matches.
---
.../class-wc-rest-orders-v2-controller.php | 30 +++++++++++++++----
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
index 88601765bc7..39cf28d7a59 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
@@ -8,8 +8,11 @@
* @since 2.6.0
*/
+use Automattic\WooCommerce\Utilities\OrderUtil;
+
defined( 'ABSPATH' ) || exit;
+// phpcs:disable Squiz.Classes.ClassFileName.NoMatch, Squiz.Classes.ValidClassName.NotCamelCaps -- Legacy class name, can't change without breaking backward compat.
/**
* REST API Orders controller class.
*
@@ -18,6 +21,7 @@ defined( 'ABSPATH' ) || exit;
*/
class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
+ // phpcs:enable
/**
* Endpoint namespace.
*
@@ -314,7 +318,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
if ( array_key_exists( $meta_item->id, $formatted_meta_data ) ) {
$formatted_meta_item = $formatted_meta_data[ $meta_item->id ];
- $result['display_key'] = wc_clean( $formatted_meta_item->display_key );
+ $result['display_key'] = wc_clean( $formatted_meta_item->display_key );
$result['display_value'] = wc_clean( $formatted_meta_item->display_value );
}
@@ -346,14 +350,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
// Only fetch fields that we need.
$fields = $this->get_fields_for_response( $this->request );
foreach ( $dependent_fields as $field_key => $dependency ) {
- if ( in_array( $field_key, $fields ) && ! in_array( $dependency, $fields ) ) {
+ if ( in_array( $field_key, $fields, true ) && ! in_array( $dependency, $fields, true ) ) {
$fields[] = $dependency;
}
}
- $extra_fields = array_intersect( $extra_fields, $fields );
- $format_decimal = array_intersect( $format_decimal, $fields );
- $format_date = array_intersect( $format_date, $fields );
+ $extra_fields = array_intersect( $extra_fields, $fields );
+ $format_decimal = array_intersect( $format_decimal, $fields );
+ $format_date = array_intersect( $format_date, $fields );
$format_line_items = array_intersect( $format_line_items, $fields );
@@ -506,6 +510,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
* @param WP_REST_Response $response The response object.
* @param WC_Data $object Object data.
* @param WP_REST_Request $request Request object.
+ *
+ * @since 4.5.0
*/
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
}
@@ -594,7 +600,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
}
// Search.
- if ( ! empty( $args['s'] ) ) {
+ if ( ! OrderUtil::custom_orders_table_usage_is_enabled() && ! empty( $args['s'] ) ) {
$order_ids = wc_order_search( $args['s'] );
if ( ! empty( $order_ids ) ) {
@@ -610,6 +616,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
*
* @param array $args Key value array of query var to query value.
* @param WP_REST_Request $request The request used.
+ *
+ * @since 4.5.0.
*/
$args = apply_filters( 'woocommerce_rest_orders_prepare_object_query', $args, $request );
@@ -693,6 +701,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
* @param WC_Data $order Object object.
* @param WP_REST_Request $request Request object.
* @param bool $creating If is creating a new object.
+ *
+ * @since 4.5.0.
*/
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating );
}
@@ -979,6 +989,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
// Prepare item data.
$item = $this->$method( $posted, $action, $item );
+ /**
+ * Allow extensions be notified before the item before is saved.
+ *
+ * @param WC_Order_Item $item The item object.
+ * @param array $posted The item data.
+ *
+ * @since 4.5.0.
+ */
do_action( 'woocommerce_rest_set_order_item', $item, $posted );
// If creating the order, add the item to it.
From 2712b4724f60396902c24365dce986bf5ea959e1 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:27:15 +0530
Subject: [PATCH 05/98] Add changelog.
---
plugins/woocommerce/changelog/fix-36212 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-36212
diff --git a/plugins/woocommerce/changelog/fix-36212 b/plugins/woocommerce/changelog/fix-36212
new file mode 100644
index 00000000000..9540f4d7035
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36212
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Skip custom search for HPOS API queries as it's handled already.
From d00f60684944027f16df5bb075e1845f97e96b61 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:44:56 +0530
Subject: [PATCH 06/98] Add support for sorting by includes param.
---
.../DataStores/Orders/OrdersTableQuery.php | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
index 8b71df2aed5..76c3c167bd9 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
@@ -509,8 +509,17 @@ class OrdersTableQuery {
return;
}
+ // No need to sanitize, will be processed in calling function.
+ if ( 'include' === $orderby || 'post__in' === $orderby ) {
+ return;
+ }
+
if ( is_string( $orderby ) ) {
- $orderby = array( $orderby => $order );
+ $orderby_fields = array_map( 'trim', explode( ' ', $orderby ) );
+ $orderby = array();
+ foreach ( $orderby_fields as $field ) {
+ $orderby[ $field ] = $order;
+ }
}
$this->args['orderby'] = array();
@@ -977,6 +986,13 @@ class OrdersTableQuery {
return;
}
+ if ( 'include' === $orderby || 'post__in' === $orderby ) {
+ $ids = $this->args['id'];
+ $ids = array_map( 'absint', $ids );
+ $this->orderby = array( "FIELD( {$this->tables['orders']}.id, " . implode( ',', $ids ) . ' )' );
+ return;
+ }
+
$orderby_array = array();
foreach ( $this->args['orderby'] as $_orderby => $order ) {
$orderby_array[] = "{$_orderby} {$order}";
From e163e1a265cad741b9016049a800e8fce6437fa9 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:45:41 +0530
Subject: [PATCH 07/98] Add changelog.
---
plugins/woocommerce/changelog/fix-36214 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-36214
diff --git a/plugins/woocommerce/changelog/fix-36214 b/plugins/woocommerce/changelog/fix-36214
new file mode 100644
index 00000000000..29a3e542e5d
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36214
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Add support for sorting by includes param.
From 566498fb342cb1bb8fc848d601fcc7e74f4e9557 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:47:39 +0530
Subject: [PATCH 08/98] Fix bug when filtering for customer_id=0.
---
.../Controllers/Version3/class-wc-rest-orders-controller.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
index 1da530b5b39..e52856a4d4b 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
@@ -279,7 +279,7 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
? $request['customer']
: null;
- if ( $cot_customer ) {
+ if ( ! is_null( $cot_customer ) ) {
unset( $request['customer'] );
}
From 082d97237778d3eeff8934f5e618507c3b98e75a Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 15:48:24 +0530
Subject: [PATCH 09/98] Add changelog.
---
plugins/woocommerce/changelog/fix-35852 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-35852
diff --git a/plugins/woocommerce/changelog/fix-35852 b/plugins/woocommerce/changelog/fix-35852
new file mode 100644
index 00000000000..2cdfd732379
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35852
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix bug when filtering for customer_id=0.
From 44757082d090d03abb4b95656108c9e17ae74e34 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 16:09:13 +0530
Subject: [PATCH 10/98] Set child orders to be children of current order parent
before deleting for consistency.
In post storage, just before deleting an order, we will change all child order's parent to be parent of current order. This commit adds the same behavior for HPOS for consistency.
---
.../DataStores/Orders/OrdersTableDataStore.php | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
index f2543f037f6..ace23ce36e9 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
@@ -1766,7 +1766,9 @@ FROM $order_meta_table
*/
do_action( 'woocommerce_before_delete_order', $order_id, $order );
+ $this->unlink_child_orders( $order );
$this->delete_order_data_from_custom_order_tables( $order_id );
+
$order->set_id( 0 );
// If this datastore method is called while the posts table is authoritative, refrain from deleting post data.
@@ -1796,6 +1798,19 @@ FROM $order_meta_table
}
}
+ private function unlink_child_orders( $order ) {
+ global $wpdb;
+ $order_table = self::get_orders_table_name();
+ $order_parent = $order->get_parent_id();
+ $wpdb->update(
+ $order_table,
+ array( 'parent_order_id' => $order_parent ),
+ array( 'parent_order_id' => $order->get_id() ),
+ array( '%d' ),
+ array( '%d' )
+ );
+ }
+
/**
* Trashes an order.
*
From 879741a0d3108eca4adfdaa9b0d6fac3b2e9543e Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 16:11:12 +0530
Subject: [PATCH 11/98] Add changelog.
---
plugins/woocommerce/changelog/fix-35909 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-35909
diff --git a/plugins/woocommerce/changelog/fix-35909 b/plugins/woocommerce/changelog/fix-35909
new file mode 100644
index 00000000000..7789fa59635
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35909
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Set child orders to be children of current order parent before deleting for consistency.
From 69629aca0befdb878fab96151b86fb19114dc341 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 16:12:11 +0530
Subject: [PATCH 12/98] Add coding standards.
---
.../DataStores/Orders/OrdersTableDataStore.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
index ace23ce36e9..1e6de3abcb7 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
@@ -1766,7 +1766,7 @@ FROM $order_meta_table
*/
do_action( 'woocommerce_before_delete_order', $order_id, $order );
- $this->unlink_child_orders( $order );
+ $this->upshift_child_orders( $order );
$this->delete_order_data_from_custom_order_tables( $order_id );
$order->set_id( 0 );
@@ -1798,7 +1798,14 @@ FROM $order_meta_table
}
}
- private function unlink_child_orders( $order ) {
+ /**
+ * Helper method to set child orders to the parent order's parent.
+ *
+ * @param \WC_Abstract_Order $order Order object.
+ *
+ * @return void
+ */
+ private function upshift_child_orders( $order ) {
global $wpdb;
$order_table = self::get_orders_table_name();
$order_parent = $order->get_parent_id();
From b09eda12c1a551c4e12820ff98e80056335b12d2 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Wed, 28 Dec 2022 18:22:08 -0500
Subject: [PATCH 13/98] =?UTF-8?q?Allow=20product=20filters=20to=20work=20w?=
=?UTF-8?q?hen=20=E2=80=98shop=E2=80=99=20is=20the=20front=20page?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../woocommerce/includes/class-wc-query.php | 35 +++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/plugins/woocommerce/includes/class-wc-query.php b/plugins/woocommerce/includes/class-wc-query.php
index 7318ae2987c..82d190e0ce8 100644
--- a/plugins/woocommerce/includes/class-wc-query.php
+++ b/plugins/woocommerce/includes/class-wc-query.php
@@ -290,6 +290,36 @@ class WC_Query {
return absint( get_option( 'page_on_front' ) ) === absint( $page_id );
}
+ /**
+ * Returns a copy of `$query` with all query vars that are allowed on the front page stripped.
+ * Used when the shop page is also the front page.
+ *
+ * @param array $query The unfiltered array.
+ * @return array The filtered query vars.
+ */
+ private function filter_out_valid_front_page_query_vars( $query ) {
+ return array_filter(
+ $query,
+ function( $key ) {
+ return ! $this->is_query_var_valid_on_front_page( $key );
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ /**
+ * Checks whether a query var is allowed on the front page or not.
+ *
+ * @param string $query_var Query var name.
+ * @return boolean TRUE when query var is allowed on the front page. FALSE otherwise.
+ */
+ private function is_query_var_valid_on_front_page( $query_var ) {
+ return in_array( $query_var, array( 'preview', 'page', 'paged', 'cpage', 'orderby' ), true )
+ || in_array( $query_var, array( 'min_price', 'max_price', 'rating_filter' ), true )
+ || 0 === strpos( $query_var, 'filter_' )
+ || 0 === strpos( $query_var, 'query_type_' );
+ }
+
/**
* Hook into pre_get_posts to do the main product query.
*
@@ -318,8 +348,9 @@ class WC_Query {
// When orderby is set, WordPress shows posts on the front-page. Get around that here.
if ( $this->page_on_front_is( wc_get_page_id( 'shop' ) ) ) {
- $_query = wp_parse_args( $q->query );
- if ( empty( $_query ) || ! array_diff( array_keys( $_query ), array( 'preview', 'page', 'paged', 'cpage', 'orderby' ) ) ) {
+ $_query = $this->filter_out_valid_front_page_query_vars( wp_parse_args( $q->query ) );
+
+ if ( empty( $_query ) ) {
$q->set( 'page_id', (int) get_option( 'page_on_front' ) );
$q->is_page = true;
$q->is_home = false;
From a5a2743e79a2cd3e3681661f6be9ed642be7f12e Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Wed, 28 Dec 2022 18:35:32 -0500
Subject: [PATCH 14/98] Add changelog
---
plugins/woocommerce/changelog/fix-35983 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-35983
diff --git a/plugins/woocommerce/changelog/fix-35983 b/plugins/woocommerce/changelog/fix-35983
new file mode 100644
index 00000000000..00f4750213c
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35983
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix for product filters when 'shop' page is the front page.
From e68e2f05453250b948eebae9dd6ffd2a07c0e948 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 29 Dec 2022 07:12:49 -0800
Subject: [PATCH 15/98] Delete changelog files based on PR 36158 (#36180)
Delete changelog files for 36158
Co-authored-by: WooCommerce Bot
---
.../fix-remove-redundant-pinterest-from-marketing-task | 4 ----
1 file changed, 4 deletions(-)
delete mode 100644 plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task
diff --git a/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task b/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task
deleted file mode 100644
index 5cd632d56f9..00000000000
--- a/plugins/woocommerce/changelog/fix-remove-redundant-pinterest-from-marketing-task
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Remove redundant Pinterest plugin from marketing task
From b4502cf5d089791eaba0682d4d276d368e2c97bd Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 29 Dec 2022 07:13:09 -0800
Subject: [PATCH 16/98] Delete changelog files based on PR 36159 (#36231)
Delete changelog files for 36159
Co-authored-by: WooCommerce Bot
---
.../changelog/update-fix-country-select-control-match | 4 ----
1 file changed, 4 deletions(-)
delete mode 100644 plugins/woocommerce/changelog/update-fix-country-select-control-match
diff --git a/plugins/woocommerce/changelog/update-fix-country-select-control-match b/plugins/woocommerce/changelog/update-fix-country-select-control-match
deleted file mode 100644
index 65c9ab1c64e..00000000000
--- a/plugins/woocommerce/changelog/update-fix-country-select-control-match
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: update
-
-Match country name or ' - region' when filtering country select control #36120
\ No newline at end of file
From c9748dda099b1e0bf73a4f9c615c2bc0cdb8b4a3 Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Thu, 29 Dec 2022 12:23:35 -0800
Subject: [PATCH 17/98] Add ability to filter variations by local attributes in
REST API (#36201)
* Allow filtering of variations by local attributes in REST API
* Add changelog entry
* Fix up lint errors
---
plugins/woocommerce/changelog/add-36117 | 4 ++++
...ass-wc-rest-product-variations-controller.php | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 plugins/woocommerce/changelog/add-36117
diff --git a/plugins/woocommerce/changelog/add-36117 b/plugins/woocommerce/changelog/add-36117
new file mode 100644
index 00000000000..e0727aa9e19
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36117
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add ability to filter variations by local attributes in REST API
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php
index 8c025b89a53..da5ba612522 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php
@@ -809,6 +809,22 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V
// Set post_status.
$args['post_status'] = $request['status'];
+ // Filter by local attributes.
+ if ( ! empty( $request['local_attributes'] ) && is_array( $request['local_attributes'] ) ) {
+ foreach ( $request['local_attributes'] as $attribute ) {
+ if ( ! isset( $attribute['attribute'] ) || ! isset( $attribute['term'] ) ) {
+ continue;
+ }
+ $args['meta_query'] = $this->add_meta_query( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
+ $args,
+ array(
+ 'key' => 'attribute_' . $attribute['attribute'],
+ 'value' => $attribute['term'],
+ )
+ );
+ }
+ }
+
// Filter by sku.
if ( ! empty( $request['sku'] ) ) {
$skus = explode( ',', $request['sku'] );
From 3fe3710c51f1abc57c5a887408f83715aee62c5a Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Fri, 30 Dec 2022 13:12:09 -0800
Subject: [PATCH 18/98] Automatically generate product variations on option
changes (#36188)
* Auto generate variations on option changes
* Add changelog entry
* Move product variation generation to hook
* Create product auto draft if not yet created
* Allow auto-draft and trash statuses for products
* Update form context with product ID to allow fetching variations
* Fix product ID usage in variations
* Reset form after initial product creation
* Use form value name for display instead of persisted name for auto drafts
* Add additional test around auto draft title
---
.../products/fields/options/options.tsx | 15 +++-
.../products/fields/variations/variations.tsx | 7 +-
.../hooks/use-product-variations-helper.ts | 74 +++++++++++++++++++
.../client/products/use-product-helper.ts | 15 ++--
.../products/utils/get-product-title.ts | 4 +-
.../utils/test/get-product-title.test.ts | 5 ++
plugins/woocommerce/changelog/add-35778 | 4 +
.../class-wc-rest-products-controller.php | 2 +-
8 files changed, 112 insertions(+), 14 deletions(-)
create mode 100644 plugins/woocommerce-admin/client/products/hooks/use-product-variations-helper.ts
create mode 100644 plugins/woocommerce/changelog/add-35778
diff --git a/plugins/woocommerce-admin/client/products/fields/options/options.tsx b/plugins/woocommerce-admin/client/products/fields/options/options.tsx
index 69b8b0a0e76..c35fa4e2695 100644
--- a/plugins/woocommerce-admin/client/products/fields/options/options.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/options/options.tsx
@@ -1,13 +1,14 @@
/**
* External dependencies
*/
-import { __ } from '@wordpress/i18n';
-import { ProductAttribute } from '@woocommerce/data';
+import { Product, ProductAttribute } from '@woocommerce/data';
+import { useFormContext } from '@woocommerce/components';
/**
* Internal dependencies
*/
import { AttributeField } from '../attribute-field';
+import { useProductVariationsHelper } from '../../hooks/use-product-variations-helper';
type OptionsProps = {
value: ProductAttribute[];
@@ -20,11 +21,19 @@ export const Options: React.FC< OptionsProps > = ( {
onChange,
productId,
} ) => {
+ const { values } = useFormContext< Product >();
+ const { generateProductVariations } = useProductVariationsHelper();
+
+ const handleChange = async ( attributes: ProductAttribute[] ) => {
+ onChange( attributes );
+ generateProductVariations( { ...values, attributes } );
+ };
+
return (
);
diff --git a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
index f8dfafd04bb..beaf31ad4f5 100644
--- a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
@@ -5,6 +5,7 @@ import { __, sprintf } from '@wordpress/i18n';
import { Button, Card, Spinner, Tooltip } from '@wordpress/components';
import {
EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME,
+ Product,
ProductVariation,
} from '@woocommerce/data';
import {
@@ -13,6 +14,7 @@ import {
Pagination,
Sortable,
Tag,
+ useFormContext,
} from '@woocommerce/components';
import { getNewPath } from '@woocommerce/navigation';
import { useContext, useState } from '@wordpress/element';
@@ -55,7 +57,8 @@ export const Variations: React.FC = () => {
const [ isUpdating, setIsUpdating ] = useState< Record< string, boolean > >(
{}
);
- const { productId } = useParams();
+ const { values } = useFormContext< Product >();
+ const productId = values.id;
const context = useContext( CurrencyContext );
const { formatAmount, getCurrencyConfig } = context;
const { isLoading, variations, totalCount } = useSelect(
@@ -82,7 +85,7 @@ export const Variations: React.FC = () => {
getProductVariationsTotalCount< number >( requestParams ),
};
},
- [ currentPage, perPage ]
+ [ currentPage, perPage, productId ]
);
const { updateProductVariation } = useDispatch(
diff --git a/plugins/woocommerce-admin/client/products/hooks/use-product-variations-helper.ts b/plugins/woocommerce-admin/client/products/hooks/use-product-variations-helper.ts
new file mode 100644
index 00000000000..0b40861f5ce
--- /dev/null
+++ b/plugins/woocommerce-admin/client/products/hooks/use-product-variations-helper.ts
@@ -0,0 +1,74 @@
+/**
+ * External dependencies
+ */
+import { useDispatch } from '@wordpress/data';
+import { useCallback, useState } from '@wordpress/element';
+import {
+ Product,
+ EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME,
+ PRODUCTS_STORE_NAME,
+} from '@woocommerce/data';
+import { useFormContext } from '@woocommerce/components';
+
+/**
+ * Internal dependencies
+ */
+import { AUTO_DRAFT_NAME } from '../utils/get-product-title';
+
+export function useProductVariationsHelper() {
+ const {
+ generateProductVariations: _generateProductVariations,
+ invalidateResolutionForStoreSelector,
+ } = useDispatch( EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME );
+ const { createProduct, updateProduct } = useDispatch( PRODUCTS_STORE_NAME );
+ const { resetForm } = useFormContext< Product >();
+
+ const [ isGenerating, setIsGenerating ] = useState( false );
+
+ const generateProductVariations = useCallback(
+ async ( product: Partial< Product > ) => {
+ setIsGenerating( true );
+
+ const createOrUpdateProduct = product.id
+ ? () =>
+ updateProduct< Promise< Product > >(
+ product.id,
+ product
+ )
+ : () => {
+ return createProduct< Promise< Product > >( {
+ ...product,
+ status: 'auto-draft',
+ name: product.name || AUTO_DRAFT_NAME,
+ } );
+ };
+
+ return createOrUpdateProduct()
+ .then( ( createdOrUpdatedProduct ) => {
+ if ( ! product.id ) {
+ resetForm( {
+ ...createdOrUpdatedProduct,
+ name: product.name || '',
+ } );
+ }
+ return _generateProductVariations( {
+ product_id: createdOrUpdatedProduct.id,
+ } );
+ } )
+ .then( () => {
+ return invalidateResolutionForStoreSelector(
+ 'getProductVariations'
+ );
+ } )
+ .finally( () => {
+ setIsGenerating( false );
+ } );
+ },
+ []
+ );
+
+ return {
+ generateProductVariations,
+ isGenerating,
+ };
+}
diff --git a/plugins/woocommerce-admin/client/products/use-product-helper.ts b/plugins/woocommerce-admin/client/products/use-product-helper.ts
index c53ef2c7f4e..276439bc2b8 100644
--- a/plugins/woocommerce-admin/client/products/use-product-helper.ts
+++ b/plugins/woocommerce-admin/client/products/use-product-helper.ts
@@ -20,6 +20,7 @@ import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
*/
+import { AUTO_DRAFT_NAME } from './utils/get-product-title';
import { CurrencyContext } from '../lib/currency-context';
import {
NUMBERS_AND_DECIMAL_SEPARATOR,
@@ -70,8 +71,8 @@ export function useProductHelper() {
/**
* Create product with status.
*
- * @param {Product} product the product to be created.
- * @param {string} status the product status.
+ * @param {Product} product the product to be created.
+ * @param {string} status the product status.
* @param {boolean} skipNotice if the notice should be skipped (default: false).
* @return {Promise} Returns a promise with the created product.
*/
@@ -163,9 +164,9 @@ export function useProductHelper() {
/**
* Update product with status.
*
- * @param {number} productId the product id to be updated.
- * @param {Product} product the product to be updated.
- * @param {string} status the product status.
+ * @param {number} productId the product id to be updated.
+ * @param {Product} product the product to be updated.
+ * @param {string} status the product status.
* @param {boolean} skipNotice if the notice should be skipped (default: false).
* @return {Promise} Returns a promise with the updated product.
*/
@@ -242,7 +243,7 @@ export function useProductHelper() {
* Creates a copy of the given product with the given status.
*
* @param {Product} product the product to be copied.
- * @param {string} status the product status.
+ * @param {string} status the product status.
* @return {Promise} promise with the newly created and copied product.
*/
const copyProductWithStatus = useCallback(
@@ -250,7 +251,7 @@ export function useProductHelper() {
return createProductWithStatus(
removeReadonlyProperties( {
...product,
- name: ( product.name || 'AUTO-DRAFT' ) + ' - Copy',
+ name: ( product.name || AUTO_DRAFT_NAME ) + ' - Copy',
} ),
status
);
diff --git a/plugins/woocommerce-admin/client/products/utils/get-product-title.ts b/plugins/woocommerce-admin/client/products/utils/get-product-title.ts
index e77175d8eb7..2f92e9d81b9 100644
--- a/plugins/woocommerce-admin/client/products/utils/get-product-title.ts
+++ b/plugins/woocommerce-admin/client/products/utils/get-product-title.ts
@@ -3,6 +3,8 @@
*/
import { __ } from '@wordpress/i18n';
+export const AUTO_DRAFT_NAME = 'AUTO-DRAFT';
+
/**
* Get the product title for use in the header.
*
@@ -20,7 +22,7 @@ export const getProductTitle = (
return name;
}
- if ( persistedName ) {
+ if ( persistedName && persistedName !== AUTO_DRAFT_NAME ) {
return persistedName;
}
diff --git a/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts b/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts
index fc259aaa216..c132b16c7ec 100644
--- a/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts
+++ b/plugins/woocommerce-admin/client/products/utils/test/get-product-title.test.ts
@@ -28,4 +28,9 @@ describe( 'getProductTitle', () => {
const title = getProductTitle( '', 'custom-type', undefined );
expect( title ).toBe( 'New product' );
} );
+
+ it( 'should return the generic add new string when the product title is the auto draft title', () => {
+ const title = getProductTitle( '', 'custom-type', 'AUTO-DRAFT' );
+ expect( title ).toBe( 'New product' );
+ } );
} );
diff --git a/plugins/woocommerce/changelog/add-35778 b/plugins/woocommerce/changelog/add-35778
new file mode 100644
index 00000000000..69148c44e73
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-35778
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Auto generate variations on option changes
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php
index 3c7b79b7d66..2cc6137d064 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-products-controller.php
@@ -867,7 +867,7 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
'description' => __( 'Product status (post status).', 'woocommerce' ),
'type' => 'string',
'default' => 'publish',
- 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ),
+ 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future', 'auto-draft', 'trash' ) ),
'context' => array( 'view', 'edit' ),
),
'featured' => array(
From 0d641253ac3d35de8f38a0e6636af177a1e981f7 Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Sun, 1 Jan 2023 13:07:30 -0800
Subject: [PATCH 19/98] Revert "Automatically show attributes in Variations"
(#36223)
Revert "Automatically show attributes in Variations (#35807)"
This reverts commit e4f6c468cb205936da42143a1714ebc81f1045c0.
---
...-33551_streamline_first_variation_creation | 4 ---
.../js/admin/meta-boxes-product-variation.js | 36 ++++---------------
.../legacy/js/admin/meta-boxes-product.js | 8 +----
.../views/html-product-attribute.php | 2 +-
4 files changed, 8 insertions(+), 42 deletions(-)
delete mode 100644 plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation
diff --git a/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation b/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation
deleted file mode 100644
index 6ea52390c8e..00000000000
--- a/plugins/woocommerce/changelog/dev-33551_streamline_first_variation_creation
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: dev
-
-Automatically show attributes in Variations
diff --git a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js
index 53e16d05c41..84eab9d8bd5 100644
--- a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js
+++ b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product-variation.js
@@ -49,10 +49,6 @@ jQuery( function ( $ ) {
'.wc_input_variations_price',
this.maybe_enable_button_to_add_price_to_variations
);
- $( 'ul.wc-tabs a[href=#variable_product_options]' ).on(
- 'click',
- this.maybe_add_attributes_to_variations
- );
},
/**
@@ -377,24 +373,6 @@ jQuery( function ( $ ) {
}
);
},
-
- /**
- * Maybe add attributes to variations
- */
- maybe_add_attributes_to_variations: function () {
- var has_variation_attributes = $(
- 'select.attribute_taxonomy'
- ).data( 'is-used-for-variations' );
- if ( has_variation_attributes ) {
- wc_meta_boxes_product_variations_ajax.link_all_variations(
- true
- );
- $( 'select.attribute_taxonomy' ).data(
- 'is-used-for-variations',
- false
- );
- }
- },
};
/**
@@ -1017,16 +995,14 @@ jQuery( function ( $ ) {
*
* @return {Bool}
*/
- link_all_variations: function ( auto_link_variations = false ) {
+ link_all_variations: function () {
wc_meta_boxes_product_variations_ajax.check_for_changes();
- var is_confirmed_action = auto_link_variations
- ? true
- : window.confirm(
- woocommerce_admin_meta_boxes_variations.i18n_link_all_variations
- );
-
- if ( is_confirmed_action ) {
+ if (
+ window.confirm(
+ woocommerce_admin_meta_boxes_variations.i18n_link_all_variations
+ )
+ ) {
wc_meta_boxes_product_variations_ajax.block();
var data = {
diff --git a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js
index 3891fcc55d1..bebb8f422f0 100644
--- a/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js
+++ b/plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js
@@ -775,13 +775,6 @@ jQuery( function ( $ ) {
'disabled-items',
newSelectedAttributes
);
- var isUsedForVariations = $( 'input#used-for-variation' ).is(
- ':checked'
- );
- $( 'select.attribute_taxonomy' ).data(
- 'is-used-for-variations',
- isUsedForVariations
- );
// Reload variations panel.
var this_page = window.location.toString();
@@ -1046,6 +1039,7 @@ jQuery( function ( $ ) {
keepAlive: true,
} );
+
// add a tooltip to the right of the product image meta box "Set product image" and "Add product gallery images"
const setProductImageLink = $( '#set-post-thumbnail' );
const tooltipMarkup = ` `;
diff --git a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php
index f63e6444159..56b248e409f 100644
--- a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php
+++ b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php
@@ -87,7 +87,7 @@ if ( ! defined( 'ABSPATH' ) ) {
- get_variation(), true ); ?> name="attribute_variation[]" value="1" />
+ get_variation(), true ); ?> name="attribute_variation[]" value="1" />
From a633ff8abf189898b4dbd74fe897b4a04f391c31 Mon Sep 17 00:00:00 2001
From: Thilina Pituwala
Date: Mon, 2 Jan 2023 11:34:20 +0100
Subject: [PATCH 20/98] Fix signature mismatch in WC CLI command api calls
(#36240)
---
plugins/woocommerce/changelog/fix-wc-cli-commands | 4 ++++
plugins/woocommerce/includes/admin/helper/class-wc-helper.php | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-wc-cli-commands
diff --git a/plugins/woocommerce/changelog/fix-wc-cli-commands b/plugins/woocommerce/changelog/fix-wc-cli-commands
new file mode 100644
index 00000000000..176fd4ad1e6
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-wc-cli-commands
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix the signature mismatch affecting wc cli commands ability to fetch user subscription data.
diff --git a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
index de712d82f6a..b23a6c129f3 100644
--- a/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
+++ b/plugins/woocommerce/includes/admin/helper/class-wc-helper.php
@@ -1280,6 +1280,8 @@ class WC_Helper {
$source = 'inbox-notes';
elseif ( stripos( $request_uri, 'admin-ajax.php' ) ) :
$source = 'heartbeat-api';
+ elseif ( defined( 'WP_CLI' ) && WP_CLI ) :
+ $source = 'wc-cli';
endif;
// Obtain the connected user info.
@@ -1287,7 +1289,7 @@ class WC_Helper {
'subscriptions',
array(
'authenticated' => true,
- 'query_string' => esc_url( '?source=' . $source ),
+ 'query_string' => '' !== $source ? esc_url( '?source=' . $source ) : '',
)
);
From be97c1353b57a03d862390241d05567a7404a7cd Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Mon, 2 Jan 2023 16:20:25 +0530
Subject: [PATCH 21/98] Add test for sorting by include param.
---
.../DataStores/Orders/OrdersTableQuery.php | 5 ++-
.../Orders/OrdersTableDataStoreTests.php | 33 +++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
index 76c3c167bd9..53a2606641f 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
@@ -987,7 +987,10 @@ class OrdersTableQuery {
}
if ( 'include' === $orderby || 'post__in' === $orderby ) {
- $ids = $this->args['id'];
+ $ids = $this->args['id'] ?? $this->args['includes'];
+ if ( empty( $ids ) ) {
+ return;
+ }
$ids = array_map( 'absint', $ids );
$this->orderby = array( "FIELD( {$this->tables['orders']}.id, " . implode( ',', $ids ) . ' )' );
return;
diff --git a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
index 765095fe095..581a7f52755 100644
--- a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
+++ b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
@@ -1349,6 +1349,39 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
);
}
+ /**
+ * @testDox Ensure sorting by `includes` param works as expected.
+ */
+ public function test_cot_query_sort_includes() {
+ $this->disable_cot_sync();
+ $order_1 = new WC_Order();
+ $this->switch_data_store( $order_1, $this->sut );
+ $order_1->save();
+
+ $order_2 = new WC_Order();
+ $this->switch_data_store( $order_2, $this->sut );
+ $this->disable_cot_sync();
+ $order_2->save();
+
+ $query = new OrdersTableQuery(
+ array(
+ 'orderby' => 'include',
+ 'includes' => array( $order_1->get_id(), $order_2->get_id() ),
+ )
+ );
+ $orders_array = $query->orders;
+ $this->assertEquals( array( $order_1->get_id(), $order_2->get_id() ), array( $orders_array[0], $orders_array[1] ) );
+
+ $query = new OrdersTableQuery(
+ array(
+ 'orderby' => 'include',
+ 'includes' => array( $order_2->get_id(), $order_1->get_id() ),
+ )
+ );
+ $orders_array = $query->orders;
+ $this->assertEquals( array( $order_2->get_id(), $order_1->get_id() ), array( $orders_array[0], $orders_array[1] ) );
+ }
+
/**
* @testDox Ensure search works as expected on updated orders.
*/
From c2b2eb5bed872f2f38df404545ca4b5b5086fe06 Mon Sep 17 00:00:00 2001
From: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Date: Mon, 2 Jan 2023 03:10:14 -0800
Subject: [PATCH 22/98] Adds `add_meta_boxes_` hook to the HPOS
order editor. (#35999)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Néstor Soriano
---
.../changelog/fix-35647-hpos-meta-boxes | 4 ++++
.../woocommerce/src/Internal/Admin/Orders/Edit.php | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes
diff --git a/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes b/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes
new file mode 100644
index 00000000000..391f689ee59
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35647-hpos-meta-boxes
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Makes it possible to use an `add_meta_boxes_` style hook in the HPOS editor, for parity with the traditional post editor.
diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
index b268779a2e1..9dc6553ca1e 100644
--- a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
+++ b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
@@ -89,6 +89,7 @@ class Edit {
*/
public function setup( \WC_Order $order ) {
$this->order = $order;
+ $wc_screen_id = wc_get_page_screen_id( 'shop-order' );
$current_screen = get_current_screen();
$current_screen->is_block_editor( false );
$this->screen_id = $current_screen->id;
@@ -107,7 +108,18 @@ class Edit {
*
* @since 3.8.0.
*/
- do_action( 'add_meta_boxes', wc_get_page_screen_id( 'shop-order' ), $this->order );
+ do_action( 'add_meta_boxes', $wc_screen_id, $this->order );
+
+ /**
+ * Provides an opportunity to inject custom meta boxes into the order editor screen. This
+ * hook is an analog of `add_meta_boxes_` as provided by WordPress core.
+ *
+ * @since 7.4.0
+ *
+ * @oaram WC_Order $order The order being edited.
+ */
+ do_action( 'add_meta_boxes_' . $wc_screen_id, $this->order );
+
$this->enqueue_scripts();
}
From d4ce6faf1eaf40d45d339498cdb9c6badb5d28f2 Mon Sep 17 00:00:00 2001
From: mujuonly
Date: Mon, 2 Jan 2023 16:41:37 +0530
Subject: [PATCH 23/98] Typo correction in
woocommerce/src/Admin/ReportsSync.php (#36122)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Néstor Soriano
---
.../changelog/fix-typo-in-regenerate_report_data-doc | 4 ++++
plugins/woocommerce/src/Admin/ReportsSync.php | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc
diff --git a/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc b/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc
new file mode 100644
index 00000000000..b535c082585
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-typo-in-regenerate_report_data-doc
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Fix typo in a function comment.
diff --git a/plugins/woocommerce/src/Admin/ReportsSync.php b/plugins/woocommerce/src/Admin/ReportsSync.php
index 8ab314d7f61..520470423fe 100644
--- a/plugins/woocommerce/src/Admin/ReportsSync.php
+++ b/plugins/woocommerce/src/Admin/ReportsSync.php
@@ -71,7 +71,7 @@ class ReportsSync {
* Regenerate data for reports.
*
* @param int|bool $days Number of days to import.
- * @param bool $skip_existing Skip exisiting records.
+ * @param bool $skip_existing Skip existing records.
* @return string
*/
public static function regenerate_report_data( $days, $skip_existing ) {
From b9fd1b8129c2de4cfd4b31e342efdf9f37dc51d5 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Mon, 2 Jan 2023 17:03:06 +0530
Subject: [PATCH 24/98] Add test for upshifting child orders.
---
.../Orders/OrdersTableDataStoreTests.php | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
index 765095fe095..3b4a8a856af 100644
--- a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
+++ b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
@@ -1899,6 +1899,25 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
$this->assertFalse( $should_sync_callable->call( $this->sut, $order ) );
}
+ /**
+ * @testDox When parent order is deleted, child orders should be upshifted.
+ */
+ public function test_child_orders_are_promoted_when_parent_is_deleted() {
+ $this->toggle_cot( true );
+ $order = new WC_Order();
+ $order->save();
+
+ $child_order = new WC_Order();
+ $child_order->set_parent_id( $order->get_id() );
+ $child_order->save();
+
+ $this->assertEquals( $order->get_id(), $child_order->get_parent_id() );
+ $this->sut->delete( $order, array( 'force_delete' => true ) );
+ $child_order = wc_get_order( $child_order->get_id() );
+
+ $this->assertEquals( 0, $child_order->get_parent_id() );
+ }
+
/**
* @testDox Make sure get_order return false when checking an order of different order types without warning.
*/
From e4d2b006813ac2dcc8c13647f5e7cedaa41d3f94 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Mon, 2 Jan 2023 17:16:56 +0530
Subject: [PATCH 25/98] Applied coding standards.
---
.../src/Internal/DataStores/Orders/OrdersTableDataStore.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
index 1e6de3abcb7..e5efcd546aa 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
@@ -1807,7 +1807,7 @@ FROM $order_meta_table
*/
private function upshift_child_orders( $order ) {
global $wpdb;
- $order_table = self::get_orders_table_name();
+ $order_table = self::get_orders_table_name();
$order_parent = $order->get_parent_id();
$wpdb->update(
$order_table,
From 16386238cccdb2dfe2197832d0c169c3df261958 Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Mon, 2 Jan 2023 09:28:11 -0800
Subject: [PATCH 26/98] Add minimum required permissions for workflow token
(#36200)
* Add minimum required permissions to e2e-tests
* Add minimum token permission to more workflows
---
.../actions/setup-woocommerce-monorepo/action.yml | 1 +
.github/workflows/build-release-zip-file.yml | 5 +++++
.github/workflows/build-release.yml | 5 +++++
.github/workflows/cherry-pick.yml | 6 ++++++
.github/workflows/ci.yml | 5 +++++
.github/workflows/community-label.yml | 4 ++++
.github/workflows/cot-build-and-e2e-tests-daily.yml | 8 ++++++++
.github/workflows/cot-pr-build-and-e2e-tests.yml | 8 ++++++++
.github/workflows/mirrors.yml | 6 ++++++
.github/workflows/nightly-builds.yml | 7 +++++++
.github/workflows/package-release.yml | 5 +++++
.github/workflows/post-release.yml | 5 +++++
.github/workflows/pr-build-and-e2e-tests.yml | 12 ++++++++++++
.github/workflows/pr-build-live-branch.yml | 4 ++++
.github/workflows/pr-code-coverage.yml | 5 +++++
.github/workflows/pr-code-sniff.yml | 5 +++++
.github/workflows/pr-highlight-changes.yml | 5 +++++
.github/workflows/pr-lint-monorepo.yml | 5 +++++
.github/workflows/pr-lint-test-js.yml | 4 ++++
.github/workflows/pr-project-label.yml | 5 +++++
.github/workflows/pr-smoke-test.yml | 5 +++++
.github/workflows/pr-unit-tests.yml | 4 ++++
.github/workflows/prepare-package-release.yml | 6 ++++++
.github/workflows/prime-cache.yml | 4 ++++
.../workflows/pull-request-post-merge-processing.yml | 4 ++++
.github/workflows/release-changelog.yml | 5 +++++
.github/workflows/release-code-freeze.yml | 9 +++++++++
.github/workflows/smoke-test-daily-site-check.yml | 2 ++
.github/workflows/smoke-test-daily.yml | 12 ++++++++++++
.github/workflows/smoke-test-release.yml | 9 +++++++++
.github/workflows/stalebot.yml | 6 ++++++
.github/workflows/syncpack.yml | 5 +++++
.github/workflows/triage-label.yml | 5 +++++
.github/workflows/triage-replies.yml | 3 +++
.github/workflows/update-feedback-labels.yml | 4 ++++
35 files changed, 193 insertions(+)
diff --git a/.github/actions/setup-woocommerce-monorepo/action.yml b/.github/actions/setup-woocommerce-monorepo/action.yml
index 037794d8631..ff077909f57 100644
--- a/.github/actions/setup-woocommerce-monorepo/action.yml
+++ b/.github/actions/setup-woocommerce-monorepo/action.yml
@@ -1,5 +1,6 @@
name: Setup WooCommerce Monorepo
description: Handles the installation, building, and caching of the projects within the monorepo.
+permissions: {}
inputs:
install-filters:
diff --git a/.github/workflows/build-release-zip-file.yml b/.github/workflows/build-release-zip-file.yml
index c1cc55eb04d..f07d234fc40 100644
--- a/.github/workflows/build-release-zip-file.yml
+++ b/.github/workflows/build-release-zip-file.yml
@@ -6,10 +6,15 @@ on:
description: 'By default the zip file is generated from the branch the workflow runs from, but you can specify an explicit reference to use instead here (e.g. refs/tags/tag_name or refs/heads/release/x.x). The resulting file will be available as an artifact on the workflow run.'
required: false
default: ''
+
+permissions: {}
+
jobs:
build:
name: Build release zip file
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index ba2b99d4814..5c02d361b52 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -2,10 +2,15 @@ name: Build release asset
on:
release:
types: [published]
+
+permissions: {}
+
jobs:
build:
name: Build release asset
runs-on: ubuntu-20.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/cherry-pick.yml b/.github/workflows/cherry-pick.yml
index 312ff9d6dcb..280a3268b57 100644
--- a/.github/workflows/cherry-pick.yml
+++ b/.github/workflows/cherry-pick.yml
@@ -30,6 +30,8 @@ env:
GIT_AUTHOR_NAME: 'WooCommerce Bot'
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
+permissions: {}
+
jobs:
verify:
name: Verify
@@ -122,6 +124,10 @@ jobs:
cherry-pick-run:
name: Run cherry pick tool
runs-on: ubuntu-20.04
+ permissions:
+ actions: write
+ contents: write
+ pull-requests: write
needs: [prep, check-release-branch-exists]
if: success()
steps:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 512e609e1e0..423398bb8be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,11 +12,16 @@ defaults:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+
+permissions: {}
+
jobs:
test:
name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}
timeout-minutes: 30
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
continue-on-error: ${{ matrix.wp == 'nightly' }}
strategy:
fail-fast: false
diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml
index 6856aec116f..bbe217653a8 100644
--- a/.github/workflows/community-label.yml
+++ b/.github/workflows/community-label.yml
@@ -10,10 +10,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
verify:
name: Verify
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/cot-build-and-e2e-tests-daily.yml b/.github/workflows/cot-build-and-e2e-tests-daily.yml
index 51cd250ce12..a38d042cc1e 100644
--- a/.github/workflows/cot-build-and-e2e-tests-daily.yml
+++ b/.github/workflows/cot-build-and-e2e-tests-daily.yml
@@ -8,10 +8,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
cot-e2e-tests-run:
name: Runs E2E tests with COT enabled.
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
@@ -66,6 +70,8 @@ jobs:
cot-api-tests-run:
name: Runs API tests with COT enabled.
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report
@@ -124,6 +130,8 @@ jobs:
contains( needs.*.result, 'failure' )
)
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: [cot-api-tests-run, cot-e2e-tests-run]
steps:
- name: Create dirs
diff --git a/.github/workflows/cot-pr-build-and-e2e-tests.yml b/.github/workflows/cot-pr-build-and-e2e-tests.yml
index e5e6e4bd4cc..a212ff99769 100644
--- a/.github/workflows/cot-pr-build-and-e2e-tests.yml
+++ b/.github/workflows/cot-pr-build-and-e2e-tests.yml
@@ -8,11 +8,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
cot-e2e-tests-run:
name: Runs E2E tests with COT enabled.
if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}"
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
@@ -68,6 +72,8 @@ jobs:
name: Runs API tests with COT enabled.
if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}"
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report
@@ -126,6 +132,8 @@ jobs:
contains( needs.*.result, 'failure' )
)
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: [cot-api-tests-run, cot-e2e-tests-run]
steps:
- name: Create dirs
diff --git a/.github/workflows/mirrors.yml b/.github/workflows/mirrors.yml
index b3cb91069ee..37ccec1fec0 100644
--- a/.github/workflows/mirrors.yml
+++ b/.github/workflows/mirrors.yml
@@ -4,11 +4,15 @@ on:
branches: ["trunk", "release/**"]
workflow_dispatch:
+permissions: {}
+
jobs:
build:
if: github.repository == 'woocommerce/woocommerce'
name: Build WooCommerce zip
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
@@ -35,6 +39,8 @@ jobs:
name: Push to Mirror
needs: [build]
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- name: Create directories
run: |
diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml
index 06227ac6615..64903cb5075 100644
--- a/.github/workflows/nightly-builds.yml
+++ b/.github/workflows/nightly-builds.yml
@@ -3,6 +3,9 @@ on:
schedule:
- cron: '0 0 * * *' # Run at 12 AM UTC.
workflow_dispatch:
+
+permissions: {}
+
jobs:
build:
if: github.repository_owner == 'woocommerce'
@@ -12,6 +15,8 @@ jobs:
matrix:
build: [trunk]
runs-on: ubuntu-20.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@v3
with:
@@ -40,6 +45,8 @@ jobs:
update:
name: Update nightly tag commit ref
runs-on: ubuntu-20.04
+ permissions:
+ contents: write
steps:
- name: Update nightly tag
uses: richardsimko/github-tag-action@v1.0.5
diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml
index 8f4a78d5424..1400a50dbe5 100644
--- a/.github/workflows/package-release.yml
+++ b/.github/workflows/package-release.yml
@@ -6,10 +6,15 @@ on:
description: 'Enter a specific package to release, or releases separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input blank will release all eligible packages.'
required: false
default: '-a'
+
+permissions: {}
+
jobs:
release:
name: Run packages release script
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml
index 7ed2c418986..6f2b9bb284b 100644
--- a/.github/workflows/post-release.yml
+++ b/.github/workflows/post-release.yml
@@ -9,10 +9,15 @@ env:
GIT_AUTHOR_NAME: 'WooCommerce Bot'
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
+permissions: {}
+
jobs:
changelog-version-update:
name: Update changelog and version
runs-on: ubuntu-20.04
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-build-and-e2e-tests.yml b/.github/workflows/pr-build-and-e2e-tests.yml
index d66270ba70d..c37a5c96ad3 100644
--- a/.github/workflows/pr-build-and-e2e-tests.yml
+++ b/.github/workflows/pr-build-and-e2e-tests.yml
@@ -7,10 +7,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
e2e-tests-run:
name: Runs E2E tests.
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
@@ -79,6 +83,8 @@ jobs:
api-tests-run:
name: Runs API tests.
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report
@@ -129,6 +135,8 @@ jobs:
k6-tests-run:
name: Runs k6 Performance tests
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
@@ -162,6 +170,10 @@ jobs:
)
runs-on: ubuntu-20.04
needs: [api-tests-run, e2e-tests-run]
+ permissions:
+ contents: read
+ issues: write
+ pull-requests: write
env:
E2E_GRAND_TOTAL: ${{needs.e2e-tests-run.outputs.E2E_GRAND_TOTAL}}
steps:
diff --git a/.github/workflows/pr-build-live-branch.yml b/.github/workflows/pr-build-live-branch.yml
index 00706c67d74..01805b95b9a 100644
--- a/.github/workflows/pr-build-live-branch.yml
+++ b/.github/workflows/pr-build-live-branch.yml
@@ -7,10 +7,14 @@ concurrency:
group: build-${{ github.event_name == 'push' && github.run_id || 'pr' }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
build:
if: github.repository_owner == 'woocommerce'
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml
index 4f8e67820c1..cb71b873a24 100644
--- a/.github/workflows/pr-code-coverage.yml
+++ b/.github/workflows/pr-code-coverage.yml
@@ -8,11 +8,16 @@ defaults:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+
+permissions: {}
+
jobs:
test:
name: Code coverage (PHP 7.4, WP Latest)
timeout-minutes: 30
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
services:
database:
image: mysql:5.6
diff --git a/.github/workflows/pr-code-sniff.yml b/.github/workflows/pr-code-sniff.yml
index f18a5aae4e6..005648861db 100644
--- a/.github/workflows/pr-code-sniff.yml
+++ b/.github/workflows/pr-code-sniff.yml
@@ -8,11 +8,16 @@ concurrency:
cancel-in-progress: true
env:
PHPCS: ./plugins/woocommerce/vendor/bin/phpcs # Run WooCommerce phpcs setup in phpcs-changed instead of default
+
+permissions: {}
+
jobs:
test:
name: Code sniff (PHP 7.4, WP Latest)
timeout-minutes: 15
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
with:
diff --git a/.github/workflows/pr-highlight-changes.yml b/.github/workflows/pr-highlight-changes.yml
index 2d6d86e6fce..45bb24f4df9 100644
--- a/.github/workflows/pr-highlight-changes.yml
+++ b/.github/workflows/pr-highlight-changes.yml
@@ -1,9 +1,14 @@
name: Highlight templates changes
on: pull_request
+
+permissions: {}
+
jobs:
analyze:
name: Check pull request changes to highlight
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
outputs:
results: ${{ steps.results.outputs.results }}
steps:
diff --git a/.github/workflows/pr-lint-monorepo.yml b/.github/workflows/pr-lint-monorepo.yml
index afc92bc4eed..76ed1fac7da 100644
--- a/.github/workflows/pr-lint-monorepo.yml
+++ b/.github/workflows/pr-lint-monorepo.yml
@@ -6,10 +6,15 @@ on:
concurrency:
group: changelogger-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
+
+permissions: {}
+
jobs:
changelogger_used:
name: Changelogger use
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-lint-test-js.yml b/.github/workflows/pr-lint-test-js.yml
index cc1c14680e8..a89cb11712c 100644
--- a/.github/workflows/pr-lint-test-js.yml
+++ b/.github/workflows/pr-lint-test-js.yml
@@ -5,10 +5,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
lint-test-js:
name: Lint and Test JS
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-project-label.yml b/.github/workflows/pr-project-label.yml
index 8c189eace6b..eefbe73d910 100644
--- a/.github/workflows/pr-project-label.yml
+++ b/.github/workflows/pr-project-label.yml
@@ -8,9 +8,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
label_project:
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
steps:
- uses: actions/labeler@v3
with:
diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml
index 45e6077c0cf..10cb9c671e2 100644
--- a/.github/workflows/pr-smoke-test.yml
+++ b/.github/workflows/pr-smoke-test.yml
@@ -9,11 +9,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
prcheck:
name: Smoke test a pull request.
if: "${{ contains(github.event.label.name, 'run: smoke tests') }}"
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml
index de6e02122d5..6142d55689b 100644
--- a/.github/workflows/pr-unit-tests.yml
+++ b/.github/workflows/pr-unit-tests.yml
@@ -8,11 +8,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
test:
name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}
timeout-minutes: 30
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
continue-on-error: ${{ matrix.wp == 'nightly' }}
strategy:
fail-fast: false
diff --git a/.github/workflows/prepare-package-release.yml b/.github/workflows/prepare-package-release.yml
index 6a524e58613..0f311150cf1 100644
--- a/.github/workflows/prepare-package-release.yml
+++ b/.github/workflows/prepare-package-release.yml
@@ -6,10 +6,16 @@ on:
description: 'Enter a specific package to release, or packages separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input to the default "-a" will prepare to release all eligible packages.'
required: false
default: '-a'
+
+permissions: {}
+
jobs:
prepare:
name: Run prepare script
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/prime-cache.yml b/.github/workflows/prime-cache.yml
index 90a260a6f26..a5d604a1625 100644
--- a/.github/workflows/prime-cache.yml
+++ b/.github/workflows/prime-cache.yml
@@ -9,10 +9,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
prime:
name: Prime cache
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pull-request-post-merge-processing.yml b/.github/workflows/pull-request-post-merge-processing.yml
index 9ce002c31b6..208cf6736cb 100644
--- a/.github/workflows/pull-request-post-merge-processing.yml
+++ b/.github/workflows/pull-request-post-merge-processing.yml
@@ -3,11 +3,15 @@ on:
pull_request_target:
types: [closed]
+permissions: {}
+
jobs:
process-pull-request-after-merge:
name: "Process a pull request after it's merged"
if: github.event.pull_request.merged == true
runs-on: ubuntu-20.04
+ permissions:
+ pull-requests: write
steps:
- name: "Get the action scripts"
run: |
diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml
index 85f725a8a46..b8ce8d8572a 100644
--- a/.github/workflows/release-changelog.yml
+++ b/.github/workflows/release-changelog.yml
@@ -15,9 +15,14 @@ env:
GIT_AUTHOR_NAME: 'WooCommerce Bot'
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
+permissions: {}
+
jobs:
create-changelog-prs:
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
diff --git a/.github/workflows/release-code-freeze.yml b/.github/workflows/release-code-freeze.yml
index 17aa826f569..ffb31eea89c 100644
--- a/.github/workflows/release-code-freeze.yml
+++ b/.github/workflows/release-code-freeze.yml
@@ -20,6 +20,8 @@ env:
GIT_AUTHOR_NAME: 'WooCommerce Bot'
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
+permissions: {}
+
jobs:
verify-code-freeze:
name: 'Verify that today is the day of the code freeze'
@@ -57,6 +59,8 @@ jobs:
maybe-create-next-milestone-and-release-branch:
name: 'Maybe create next milestone and release branch'
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: verify-code-freeze
if: needs.verify-code-freeze.outputs.freeze == 0
outputs:
@@ -84,6 +88,9 @@ jobs:
prep-trunk:
name: Preps trunk for next development cycle
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
needs: maybe-create-next-milestone-and-release-branch
steps:
- name: Checkout code
@@ -151,6 +158,8 @@ jobs:
trigger-changelog-action:
name: 'Trigger changelog action'
runs-on: ubuntu-20.04
+ permissions:
+ actions: write
needs: maybe-create-next-milestone-and-release-branch
steps:
- name: 'Trigger changelog action'
diff --git a/.github/workflows/smoke-test-daily-site-check.yml b/.github/workflows/smoke-test-daily-site-check.yml
index ac71633d3b1..37b0de06ec9 100644
--- a/.github/workflows/smoke-test-daily-site-check.yml
+++ b/.github/workflows/smoke-test-daily-site-check.yml
@@ -3,6 +3,8 @@ on:
schedule:
- cron: '25 7 * * *'
+permissions: {}
+
jobs:
ping_site:
runs-on: ubuntu-20.04
diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml
index 51d762e0e7d..7c5b9ea78ea 100644
--- a/.github/workflows/smoke-test-daily.yml
+++ b/.github/workflows/smoke-test-daily.yml
@@ -14,10 +14,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+permissions: {}
+
jobs:
e2e-tests:
name: E2E tests on nightly build
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
@@ -77,6 +81,8 @@ jobs:
api-tests:
name: API tests on nightly build
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: [e2e-tests]
if: success() || failure()
env:
@@ -121,6 +127,8 @@ jobs:
k6-tests:
name: k6 tests on nightly build
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: [api-tests]
if: success() || failure()
steps:
@@ -171,6 +179,8 @@ jobs:
test-plugins:
name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
env:
USE_WP_ENV: 1
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
@@ -244,6 +254,8 @@ jobs:
( success() || failure() ) &&
! github.event.pull_request.head.repo.fork
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
needs: [test-plugins, k6-tests]
steps:
- name: Create dirs
diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml
index f202b3467de..411538d05a4 100644
--- a/.github/workflows/smoke-test-release.yml
+++ b/.github/workflows/smoke-test-release.yml
@@ -5,10 +5,15 @@ on:
release_id:
description: 'WooCommerce Release Id'
required: true
+
+permissions: {}
+
jobs:
login-run:
name: Daily smoke test on release.
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v3
with:
@@ -49,6 +54,8 @@ jobs:
test-wp-version:
name: Smoke test on L-${{ matrix.wp }} WordPress version
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
strategy:
matrix:
wp: ['1', '2']
@@ -104,6 +111,8 @@ jobs:
test-plugins:
name: Smoke tests with ${{ matrix.plugin }} plugin installed
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
strategy:
fail-fast: false
matrix:
diff --git a/.github/workflows/stalebot.yml b/.github/workflows/stalebot.yml
index dc7e2c9b034..a512944ea96 100644
--- a/.github/workflows/stalebot.yml
+++ b/.github/workflows/stalebot.yml
@@ -3,11 +3,17 @@ on:
schedule:
- cron: '21 0 * * *'
+permissions: {}
+
jobs:
stale:
if: |
! contains(github.event.issue.labels.*.name, 'type: enhancement')
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ issues: write
+ pull-requests: write
steps:
- uses: actions/stale@v3
with:
diff --git a/.github/workflows/syncpack.yml b/.github/workflows/syncpack.yml
index f7898fa129f..56fb71d0964 100644
--- a/.github/workflows/syncpack.yml
+++ b/.github/workflows/syncpack.yml
@@ -6,9 +6,14 @@ on:
- trunk
paths:
- '**/package.json'
+
+permissions: {}
+
jobs:
syncpack:
runs-on: ubuntu-latest
+ permissions:
+ contents: read
name: syncpack
steps:
- name: 'Checkout'
diff --git a/.github/workflows/triage-label.yml b/.github/workflows/triage-label.yml
index ef9c5852437..b7f6485a31d 100644
--- a/.github/workflows/triage-label.yml
+++ b/.github/workflows/triage-label.yml
@@ -4,9 +4,14 @@ on:
issues:
types: opened
+permissions: {}
+
jobs:
add_label:
runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ issues: write
steps:
- uses: actions/checkout@v3
- uses: actions-ecosystem/action-add-labels@v1
diff --git a/.github/workflows/triage-replies.yml b/.github/workflows/triage-replies.yml
index a5429249306..d65d4842e0c 100644
--- a/.github/workflows/triage-replies.yml
+++ b/.github/workflows/triage-replies.yml
@@ -3,6 +3,9 @@ on:
issues:
types:
- labeled
+
+permissions: {}
+
jobs:
add-dev-comment:
if: "github.event.label.name == 'needs: developer feedback'"
diff --git a/.github/workflows/update-feedback-labels.yml b/.github/workflows/update-feedback-labels.yml
index 34caa1c31a1..d619bd9fc00 100644
--- a/.github/workflows/update-feedback-labels.yml
+++ b/.github/workflows/update-feedback-labels.yml
@@ -1,6 +1,8 @@
name: 'Update contributor feedback labels on comment'
on: 'issue_comment'
+permissions: {}
+
jobs:
feedback:
if: |
@@ -10,6 +12,8 @@ jobs:
github.event.issue.state == 'open' &&
contains(github.event.issue.labels.*.name, 'needs: author feedback')
runs-on: ubuntu-20.04
+ permissions:
+ issues: write
steps:
- name: Add has feedback
uses: actions-ecosystem/action-add-labels@v1
From f557c44a0dcb33f7a6618d033b39f5fad12b21cc Mon Sep 17 00:00:00 2001
From: Paul Sealock
Date: Tue, 3 Jan 2023 07:03:44 +1300
Subject: [PATCH 27/98] Create Woo Extension: Update Readme (#36156)
---
packages/js/create-woo-extension/README.md | 30 +++++++++++++++----
.../create-woo-extension/README.md.mustache | 5 ++--
.../update-create-woo-extension-readme | 4 +++
3 files changed, 31 insertions(+), 8 deletions(-)
create mode 100644 packages/js/create-woo-extension/changelog/update-create-woo-extension-readme
diff --git a/packages/js/create-woo-extension/README.md b/packages/js/create-woo-extension/README.md
index effa91ec729..4e703374680 100644
--- a/packages/js/create-woo-extension/README.md
+++ b/packages/js/create-woo-extension/README.md
@@ -1,19 +1,37 @@
# @woocommerce/create-woo-extension
-This is a template to be used with `@wordpress/create-block` to create a WooCommerce Extension starting point.
+Create Woo Extension scaffolds a fully functional modern development environment for integrating with WooCommerce. Use it to build extensions leveraging the power of WooCommerce.
-## Installation
+## Configuration Free
+
+With build tooling already configured, getting started developing modern Javascript screens requires no effort. Create Woo Extension adds a React page integrating with WooCommerce Admin. Also included are PHP and Javascript unit testing, linting, and Prettier IDE confguration for WooCommerce and WordPress.
+
+Add a project inside of your favorite environment setup or use the built in [wp-env](https://github.com/WordPress/gutenberg/tree/trunk/packages/env) for easily setting up a local WordPress environment for building and testing plugins and themes. `wp-env` is configured to load the latest WooCommerce to easily start developing with a single command.
+
+## Usage
```
-npx @wordpress/create-block -t @woocommerce/create-woo-extension
+npx @wordpress/create-block -t @woocommerce/create-woo-extension my-extension-name
```
-When this has completed, go to your WordPress plugins page and activate the plugin.
+Navigate to the newly created folder and get started.
+
+```
+cd my-extension-name
+npm install # Install dependencies
+npm run build # Build the javascript
+npm -g i @wordpress/env # If you don't already have wp-env
+wp-env start # Start Wordpress environment
+```
+
+See the new plugin activated from the WordPress plugins page and navigate to http://localhost:8888/wp-admin/admin.php?page=wc-admin&path=%2Fmy-extension-name to check it out.
## Development
-Install from a local directory.
+For development on this tool itself, you can also install from a local directory.
```
-npx @wordpress/create-block -t ./path/to/woocommerce/packages/js/create-woo-extension
+npx @wordpress/create-block -t ./path/to/woocommerce/packages/js/create-woo-extension my-extension-name
```
+
+This is a template to used with [`@wordpress/create-block`](https://github.com/WordPress/gutenberg/tree/trunk/packages/create-block) to create a WooCommerce Extension starting point.
diff --git a/packages/js/create-woo-extension/README.md.mustache b/packages/js/create-woo-extension/README.md.mustache
index 247a1adb2c7..a982fe47432 100644
--- a/packages/js/create-woo-extension/README.md.mustache
+++ b/packages/js/create-woo-extension/README.md.mustache
@@ -1,12 +1,13 @@
-# Woo Plugin Setup
+# {{title}}
-A boilerplate for modern WooCommerce development. This project adds a React page to WooCommerce Admin and a corresponding navigation item.
+A WooCommmerce Extension inspired by [Create Woo Extension](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/create-woo-extension/README.md).
## Getting Started
### Prerequisites
- [NPM](https://www.npmjs.com/)
+- [Composer](https://getcomposer.org/download/)
- [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/)
### Installation and Build
diff --git a/packages/js/create-woo-extension/changelog/update-create-woo-extension-readme b/packages/js/create-woo-extension/changelog/update-create-woo-extension-readme
new file mode 100644
index 00000000000..17691a4a7f8
--- /dev/null
+++ b/packages/js/create-woo-extension/changelog/update-create-woo-extension-readme
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Update readme
From 4c876e51c6a00c68d041ece4a29fd000c7c49a29 Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Tue, 3 Jan 2023 12:03:41 +1300
Subject: [PATCH 28/98] Add combobox and extra status information to the live
branches menu in WooCommerce Beta Tester (#36140)
---
.../dev-integrate-combo-box-live-branch | 4 +
.../src/live-branches/App.tsx | 23 +--
.../live-branches/components/BranchList.tsx | 155 ++++++++++++++++--
3 files changed, 146 insertions(+), 36 deletions(-)
create mode 100644 plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch
diff --git a/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch b/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch
new file mode 100644
index 00000000000..b98dd83d88c
--- /dev/null
+++ b/plugins/woocommerce-beta-tester/changelog/dev-integrate-combo-box-live-branch
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Update the live branches UI to improve finding and installing branches.
diff --git a/plugins/woocommerce-beta-tester/src/live-branches/App.tsx b/plugins/woocommerce-beta-tester/src/live-branches/App.tsx
index 525687042ae..9f268128f52 100644
--- a/plugins/woocommerce-beta-tester/src/live-branches/App.tsx
+++ b/plugins/woocommerce-beta-tester/src/live-branches/App.tsx
@@ -2,15 +2,10 @@
* External dependencies
*/
import {
- Card,
- CardBody,
- CardFooter,
- CardHeader,
// @ts-ignore
__experimentalHeading as Heading,
} from '@wordpress/components';
import { Spinner } from '@woocommerce/components';
-import { css } from '@emotion/react';
/**
* Internal dependencies
@@ -18,10 +13,6 @@ import { css } from '@emotion/react';
import { useLiveBranchesData } from './hooks/live-branches';
import { BranchList } from './components/BranchList';
-const cardStyle = css( {
- marginTop: '32px',
-} );
-
export const App = () => {
const { branches, isLoading } = useLiveBranchesData();
@@ -30,19 +21,7 @@ export const App = () => {
Live Branches - Install and test WooCommerce PRs
-
-
- Active PRs
-
-
- { isLoading ? (
-
- ) : (
-
- ) }
-
-
-
+ { isLoading ? : }
>
);
};
diff --git a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
index be5f242cebb..4d044ea7e86 100644
--- a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
+++ b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
@@ -8,15 +8,31 @@ import {
__experimentalItem as Item,
Button,
Spinner,
+ Card,
+ CardHeader,
+ CardBody,
+ CardFooter,
+ ComboboxControl,
} from '@wordpress/components';
import { useState } from 'react';
+import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { Branch, useLiveBranchInstall } from '../hooks/live-branches';
-const BranchListItem = ( { branch }: { branch: Branch } ) => {
+const cardStyle = css( {
+ marginTop: '32px',
+} );
+
+const BranchListItem = ( {
+ branch,
+ onBranchActive,
+}: {
+ branch: Branch;
+ onBranchActive: ( branch: Branch ) => void;
+} ) => {
const { isError, isInProgress, installAndActivate, activate, status } =
useLiveBranchInstall(
branch.download_url,
@@ -25,14 +41,24 @@ const BranchListItem = ( { branch }: { branch: Branch } ) => {
branch.install_status
);
+ const activateBranch = async () => {
+ await activate();
+ onBranchActive( branch );
+ };
+
+ const installAndActivateBranch = async () => {
+ await installAndActivate();
+ onBranchActive( branch );
+ };
+
const ActionButton = {
'not-installed': () => (
-
+
Install and Activate
),
installed: () => (
-
+
Activate
),
@@ -64,22 +90,123 @@ const BranchListItem = ( { branch }: { branch: Branch } ) => {
);
};
+const BranchInfo = ( { branch }: { branch: Branch } ) => {
+ return (
+
+ Pull Request Branch: { ' ' }
+
+ { branch.branch }
+
+ { ' | ' }
+ Version: { branch.version } |{ ' ' }
+ Download URL: { ' ' }
+ { branch.download_url }
+
+ );
+};
+
+const WooCommerceVersionInfo = () => {
+ // @ts-ignore
+ const version = window?.wc?.WC_VERSION || 'unknown';
+
+ return (
+
+ Live branch not installed. Running WooCommerce version: { version }
+
+ );
+};
+
export const BranchList = ( { branches }: { branches: Branch[] } ) => {
- const activeBranch = branches.find(
- ( branch ) => branch.install_status === 'active'
+ const [ activeBranch, setActiveBranch ] = useState< Branch | null >(
+ branches.find( ( branch ) => branch.install_status === 'active' ) ||
+ null
);
- const nonActiveBranches = branches.filter(
- ( branch ) => branch.install_status !== 'active'
+ const installedBranches = branches.filter(
+ ( branch ) => branch.install_status === 'installed'
+ );
+
+ const uninstalledBranches = branches.filter(
+ ( branch ) => branch.install_status === 'not-installed'
+ );
+
+ const [ selectedBranch, setSelectedBranch ] = useState(
+ uninstalledBranches[ 0 ]
);
return (
-
- { /* Sort the active branch if it exists to the top of the list */ }
- { activeBranch && }
- { nonActiveBranches.map( ( branch ) => (
-
- ) ) }
-
+ <>
+
+
+ Currently Running
+
+
+ { activeBranch && (
+
+ ) }
+ { ! activeBranch && }
+
+
+
+
+
+ Install and Activate Live Branches
+
+
+ {
+ if ( branchVersion ) {
+ const branch = branches.find(
+ ( branch ) =>
+ branch.version === branchVersion
+ );
+
+ if ( branch ) {
+ setSelectedBranch( branch );
+ }
+ }
+ } }
+ value={ selectedBranch.version }
+ options={ uninstalledBranches.map( ( branch ) => {
+ return {
+ value: branch.version,
+ label: branch.branch,
+ };
+ } ) }
+ />
+
+
+
+
+
+ { installedBranches.length && (
+
+
+ Other Installed Branches
+
+
+
+ { installedBranches.map( ( branch ) => (
+
+ ) ) }
+
+
+
+
+ ) }
+ >
);
};
From 25f051cad273bf709b127d162ab43f437d774c42 Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Mon, 2 Jan 2023 20:56:06 -0800
Subject: [PATCH 29/98] Add PR write permissions (#36263)
---
.github/workflows/community-label.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml
index bbe217653a8..979add9fe55 100644
--- a/.github/workflows/community-label.yml
+++ b/.github/workflows/community-label.yml
@@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-20.04
permissions:
contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v3
From 216a7505df935e80b08d5d13f5845a03fd59f8db Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:53:06 +0700
Subject: [PATCH 30/98] Prepare Packages for Release (#36210)
Automated change: Prep @woocommerce/components for release.
Co-authored-by: puntope
---
packages/js/components/CHANGELOG.md | 35 +++++++++++++++++++
.../changelog/add-34332-add-attribute-edit | 4 ---
.../add-34_create_new_category_field_modal | 4 ---
packages/js/components/changelog/add-35046 | 4 ---
packages/js/components/changelog/add-35076 | 4 ---
.../add-35173-category-field-improvements | 4 ---
.../add-35181_allow_select_multiple_images | 4 ---
.../changelog/add-35301-delayed-ces-prompt | 4 ---
packages/js/components/changelog/add-35788 | 4 ---
...add-35789_set_variations_list_fixed_height | 4 ---
.../changelog/add-select-control-suffix | 4 ---
...v-35714_move_file_picker_to_media_uploader | 4 ---
.../js/components/changelog/dev-adjust-sync | 5 ---
.../dev-migrate-search-component-to-ts | 4 ---
.../enhancement-35190-update-tooltip-styles | 4 ---
.../js/components/changelog/enhancement-35567 | 4 ---
.../js/components/changelog/enhancement-35568 | 4 ---
...hancement-table-add-no-data-label-property | 4 ---
packages/js/components/changelog/fix-35697 | 4 ---
.../changelog/fix-36129-table-className | 4 ---
.../fix-analytics-daterange-custom-wp61 | 4 ---
.../changelog/fix-date-time-picker-blur-close | 4 ---
.../fix-date-time-picker-control-onchange | 4 ---
.../fix-date-time-picker-control-suffix-style | 5 ---
.../changelog/fix-datepicker-moment | 4 ---
.../js/components/changelog/fix-form_ts_error | 4 ---
.../fix-product-images-toolbar-positioning | 4 ---
.../changelog/fix-rich-text-editor-selection | 4 ---
.../fix-select-control-popover-slots | 4 ---
.../components/changelog/fix-unsaved-prompt | 4 ---
.../components/changelog/list-item-classname | 4 ---
...-add-aria-label-for-simple-select-dropdown | 4 ---
...ate-date-time-picker-control-force-time-to | 4 ---
...update-date-time-picker-control-formatting | 4 ---
...-date-time-picker-control-picker-classname | 4 ---
packages/js/components/package.json | 2 +-
36 files changed, 36 insertions(+), 139 deletions(-)
delete mode 100644 packages/js/components/changelog/add-34332-add-attribute-edit
delete mode 100644 packages/js/components/changelog/add-34_create_new_category_field_modal
delete mode 100644 packages/js/components/changelog/add-35046
delete mode 100644 packages/js/components/changelog/add-35076
delete mode 100644 packages/js/components/changelog/add-35173-category-field-improvements
delete mode 100644 packages/js/components/changelog/add-35181_allow_select_multiple_images
delete mode 100644 packages/js/components/changelog/add-35301-delayed-ces-prompt
delete mode 100644 packages/js/components/changelog/add-35788
delete mode 100644 packages/js/components/changelog/add-35789_set_variations_list_fixed_height
delete mode 100644 packages/js/components/changelog/add-select-control-suffix
delete mode 100644 packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader
delete mode 100644 packages/js/components/changelog/dev-adjust-sync
delete mode 100644 packages/js/components/changelog/dev-migrate-search-component-to-ts
delete mode 100644 packages/js/components/changelog/enhancement-35190-update-tooltip-styles
delete mode 100644 packages/js/components/changelog/enhancement-35567
delete mode 100644 packages/js/components/changelog/enhancement-35568
delete mode 100644 packages/js/components/changelog/enhancement-table-add-no-data-label-property
delete mode 100644 packages/js/components/changelog/fix-35697
delete mode 100644 packages/js/components/changelog/fix-36129-table-className
delete mode 100644 packages/js/components/changelog/fix-analytics-daterange-custom-wp61
delete mode 100644 packages/js/components/changelog/fix-date-time-picker-blur-close
delete mode 100644 packages/js/components/changelog/fix-date-time-picker-control-onchange
delete mode 100644 packages/js/components/changelog/fix-date-time-picker-control-suffix-style
delete mode 100644 packages/js/components/changelog/fix-datepicker-moment
delete mode 100644 packages/js/components/changelog/fix-form_ts_error
delete mode 100644 packages/js/components/changelog/fix-product-images-toolbar-positioning
delete mode 100644 packages/js/components/changelog/fix-rich-text-editor-selection
delete mode 100644 packages/js/components/changelog/fix-select-control-popover-slots
delete mode 100644 packages/js/components/changelog/fix-unsaved-prompt
delete mode 100644 packages/js/components/changelog/list-item-classname
delete mode 100644 packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown
delete mode 100644 packages/js/components/changelog/update-date-time-picker-control-force-time-to
delete mode 100644 packages/js/components/changelog/update-date-time-picker-control-formatting
delete mode 100644 packages/js/components/changelog/update-date-time-picker-control-picker-classname
diff --git a/packages/js/components/CHANGELOG.md b/packages/js/components/CHANGELOG.md
index a8bb8684c2a..a7a86402539 100644
--- a/packages/js/components/CHANGELOG.md
+++ b/packages/js/components/CHANGELOG.md
@@ -2,6 +2,41 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [12.0.0](https://www.npmjs.com/package/@woocommerce/components/v/12.0.0) - 2022-12-28
+
+- Patch - Add name to exported popover slot used to display SelectControl Menu, so it is only used for SelectControl menus. [#36124]
+- Patch - Close DateTimePickerControl's dropdown when blurring from input. [#36124]
+- Patch - DateTimePickerControl's onChange now only fires when there is an actual change to the datetime. [#36124]
+- Patch - Fix DateTimePickerControl's popover styling when slot-fill is used. [#36124]
+- Patch - Fixed DatePicker to work in WordPress 6.1 when currentDate is set to a moment instance. [#36124]
+- Patch - Fix pagination label text from uppercase to normal and font styles [#36124]
+- Patch - Include react-dates styles (no longer in WP 6.1+). [#36124]
+- Minor - Set editor mode on initialization to prevent initial text editor focus [#36124]
+- Patch - Set initial values prop from reset form function as optional [#36124]
+- Patch - Add aria-label for simple select dropdown [#36124]
+- Patch - Add async filtering support to the `__experimentalSelectControl` component [#36124]
+- Minor - Add className prop to ListItem. [#36124]
+- Minor - Add className prop to Sortable [#36124]
+- Minor - Added ability to force time when DateTimePickerControl is date-only (timeForDateOnly prop). [#36124]
+- Minor - Add experimental ConditionalWrapper component [#36124]
+- Patch - Add experimental open menu when user focus the select control input element [#36124]
+- Minor - Adding isHidden option for primary button in TourKit component. [#36124]
+- Minor - Add support for custom suffix prop on SelectControl. [#36124]
+- Minor - Make Table component accept className prop. [#36124]
+- Minor - Move classname down in SelectControl Menu so it is on the actual Menu element. [#36124]
+- Major [ **BREAKING CHANGE** ] - Switch DateTimePickerControl formatting to PHP style, for WP compatibility. [#36124]
+- Patch - Updating downshift to 6.1.12. [#36124]
+- Minor - Allow the user to select multiple images in the Media Library [#36124]
+- Patch - Migrate search component to TS [#36124]
+- Minor - Move file picker by clicking card into the MediaUploader component [#36124]
+- Minor - Fix up initial block selection in RichTextEditor and add media blocks [#36124]
+- Patch - Updated image gallery toolbar position and tooltips. [#36124]
+- Patch - Update variable name within useFormContext. [#36124]
+- Minor - Add noDataLabel property into table.js component to allow No Data label customization. [#36124]
+- Patch - Align the field height across the whole form [#36124]
+- Patch - Fade the value selection field in the Attributes modal when no attribute is added [#36124]
+- Patch - Update font size and spacing in the tooltip component [#36124]
+
## [11.1.0](https://www.npmjs.com/package/@woocommerce/components/v/11.1.0) - 2022-10-24
- Minor - Allow passing of additional props to form inputs [#35160]
diff --git a/packages/js/components/changelog/add-34332-add-attribute-edit b/packages/js/components/changelog/add-34332-add-attribute-edit
deleted file mode 100644
index 42678d69bf9..00000000000
--- a/packages/js/components/changelog/add-34332-add-attribute-edit
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: update
-
-Updating downshift to 6.1.12.
diff --git a/packages/js/components/changelog/add-34_create_new_category_field_modal b/packages/js/components/changelog/add-34_create_new_category_field_modal
deleted file mode 100644
index 4bfc4ae8b9b..00000000000
--- a/packages/js/components/changelog/add-34_create_new_category_field_modal
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: update
-
-Move classname down in SelectControl Menu so it is on the actual Menu element.
diff --git a/packages/js/components/changelog/add-35046 b/packages/js/components/changelog/add-35046
deleted file mode 100644
index e9d7806593d..00000000000
--- a/packages/js/components/changelog/add-35046
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add experimental ConditionalWrapper component
diff --git a/packages/js/components/changelog/add-35076 b/packages/js/components/changelog/add-35076
deleted file mode 100644
index acbe196ea01..00000000000
--- a/packages/js/components/changelog/add-35076
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: add
-
-Add async filtering support to the `__experimentalSelectControl` component
diff --git a/packages/js/components/changelog/add-35173-category-field-improvements b/packages/js/components/changelog/add-35173-category-field-improvements
deleted file mode 100644
index 5eb682fd22d..00000000000
--- a/packages/js/components/changelog/add-35173-category-field-improvements
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: add
-
-Add experimental open menu when user focus the select control input element
diff --git a/packages/js/components/changelog/add-35181_allow_select_multiple_images b/packages/js/components/changelog/add-35181_allow_select_multiple_images
deleted file mode 100644
index 247d164a7f7..00000000000
--- a/packages/js/components/changelog/add-35181_allow_select_multiple_images
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: dev
-
-Allow the user to select multiple images in the Media Library
diff --git a/packages/js/components/changelog/add-35301-delayed-ces-prompt b/packages/js/components/changelog/add-35301-delayed-ces-prompt
deleted file mode 100644
index a0589d9d4ab..00000000000
--- a/packages/js/components/changelog/add-35301-delayed-ces-prompt
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Adding isHidden option for primary button in TourKit component.
diff --git a/packages/js/components/changelog/add-35788 b/packages/js/components/changelog/add-35788
deleted file mode 100644
index 7d0c1f80dbc..00000000000
--- a/packages/js/components/changelog/add-35788
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Fix pagination label text from uppercase to normal and font styles
diff --git a/packages/js/components/changelog/add-35789_set_variations_list_fixed_height b/packages/js/components/changelog/add-35789_set_variations_list_fixed_height
deleted file mode 100644
index 6d397019d36..00000000000
--- a/packages/js/components/changelog/add-35789_set_variations_list_fixed_height
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add className prop to Sortable
diff --git a/packages/js/components/changelog/add-select-control-suffix b/packages/js/components/changelog/add-select-control-suffix
deleted file mode 100644
index 860761e71c0..00000000000
--- a/packages/js/components/changelog/add-select-control-suffix
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add support for custom suffix prop on SelectControl.
diff --git a/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader b/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader
deleted file mode 100644
index 62cf00b1a9d..00000000000
--- a/packages/js/components/changelog/dev-35714_move_file_picker_to_media_uploader
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: dev
-
-Move file picker by clicking card into the MediaUploader component
diff --git a/packages/js/components/changelog/dev-adjust-sync b/packages/js/components/changelog/dev-adjust-sync
deleted file mode 100644
index f11d1e352f4..00000000000
--- a/packages/js/components/changelog/dev-adjust-sync
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: dev
-Comment: Dev dependency bump
-
-
diff --git a/packages/js/components/changelog/dev-migrate-search-component-to-ts b/packages/js/components/changelog/dev-migrate-search-component-to-ts
deleted file mode 100644
index ded2b14cc92..00000000000
--- a/packages/js/components/changelog/dev-migrate-search-component-to-ts
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: dev
-
-Migrate search component to TS
diff --git a/packages/js/components/changelog/enhancement-35190-update-tooltip-styles b/packages/js/components/changelog/enhancement-35190-update-tooltip-styles
deleted file mode 100644
index 4d21861d602..00000000000
--- a/packages/js/components/changelog/enhancement-35190-update-tooltip-styles
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: enhancement
-
-Update font size and spacing in the tooltip component
diff --git a/packages/js/components/changelog/enhancement-35567 b/packages/js/components/changelog/enhancement-35567
deleted file mode 100644
index 0d4f5a995a9..00000000000
--- a/packages/js/components/changelog/enhancement-35567
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: enhancement
-
-Align the field height across the whole form
diff --git a/packages/js/components/changelog/enhancement-35568 b/packages/js/components/changelog/enhancement-35568
deleted file mode 100644
index 5c6dabeaa7e..00000000000
--- a/packages/js/components/changelog/enhancement-35568
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: enhancement
-
-Fade the value selection field in the Attributes modal when no attribute is added
diff --git a/packages/js/components/changelog/enhancement-table-add-no-data-label-property b/packages/js/components/changelog/enhancement-table-add-no-data-label-property
deleted file mode 100644
index 70efa89f698..00000000000
--- a/packages/js/components/changelog/enhancement-table-add-no-data-label-property
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: enhancement
-
-Add noDataLabel property into table.js component to allow No Data label customization.
diff --git a/packages/js/components/changelog/fix-35697 b/packages/js/components/changelog/fix-35697
deleted file mode 100644
index 8e9f36504c7..00000000000
--- a/packages/js/components/changelog/fix-35697
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: fix
-
-Set editor mode on initialization to prevent initial text editor focus
diff --git a/packages/js/components/changelog/fix-36129-table-className b/packages/js/components/changelog/fix-36129-table-className
deleted file mode 100644
index 1b601edb7bf..00000000000
--- a/packages/js/components/changelog/fix-36129-table-className
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Make Table component accept className prop.
diff --git a/packages/js/components/changelog/fix-analytics-daterange-custom-wp61 b/packages/js/components/changelog/fix-analytics-daterange-custom-wp61
deleted file mode 100644
index f965ebdce29..00000000000
--- a/packages/js/components/changelog/fix-analytics-daterange-custom-wp61
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Include react-dates styles (no longer in WP 6.1+).
diff --git a/packages/js/components/changelog/fix-date-time-picker-blur-close b/packages/js/components/changelog/fix-date-time-picker-blur-close
deleted file mode 100644
index 28fa1e5dcd4..00000000000
--- a/packages/js/components/changelog/fix-date-time-picker-blur-close
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Close DateTimePickerControl's dropdown when blurring from input.
diff --git a/packages/js/components/changelog/fix-date-time-picker-control-onchange b/packages/js/components/changelog/fix-date-time-picker-control-onchange
deleted file mode 100644
index f7074ae252b..00000000000
--- a/packages/js/components/changelog/fix-date-time-picker-control-onchange
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-DateTimePickerControl's onChange now only fires when there is an actual change to the datetime.
diff --git a/packages/js/components/changelog/fix-date-time-picker-control-suffix-style b/packages/js/components/changelog/fix-date-time-picker-control-suffix-style
deleted file mode 100644
index 97b797ed6cb..00000000000
--- a/packages/js/components/changelog/fix-date-time-picker-control-suffix-style
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: fix
-Comment: Just a minor tweak to the CSS for the DateTimePickerControl suffix.
-
-
diff --git a/packages/js/components/changelog/fix-datepicker-moment b/packages/js/components/changelog/fix-datepicker-moment
deleted file mode 100644
index 8d2aafbd252..00000000000
--- a/packages/js/components/changelog/fix-datepicker-moment
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Fixed DatePicker to work in WordPress 6.1 when currentDate is set to a moment instance.
diff --git a/packages/js/components/changelog/fix-form_ts_error b/packages/js/components/changelog/fix-form_ts_error
deleted file mode 100644
index fc0ec73f0ee..00000000000
--- a/packages/js/components/changelog/fix-form_ts_error
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: tweak
-
-Update variable name within useFormContext.
diff --git a/packages/js/components/changelog/fix-product-images-toolbar-positioning b/packages/js/components/changelog/fix-product-images-toolbar-positioning
deleted file mode 100644
index fc6df228ba7..00000000000
--- a/packages/js/components/changelog/fix-product-images-toolbar-positioning
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: tweak
-
-Updated image gallery toolbar position and tooltips.
diff --git a/packages/js/components/changelog/fix-rich-text-editor-selection b/packages/js/components/changelog/fix-rich-text-editor-selection
deleted file mode 100644
index 59caa9a16d8..00000000000
--- a/packages/js/components/changelog/fix-rich-text-editor-selection
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: tweak
-
-Fix up initial block selection in RichTextEditor and add media blocks
diff --git a/packages/js/components/changelog/fix-select-control-popover-slots b/packages/js/components/changelog/fix-select-control-popover-slots
deleted file mode 100644
index 81d59f026ab..00000000000
--- a/packages/js/components/changelog/fix-select-control-popover-slots
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Add name to exported popover slot used to display SelectControl Menu, so it is only used for SelectControl menus.
diff --git a/packages/js/components/changelog/fix-unsaved-prompt b/packages/js/components/changelog/fix-unsaved-prompt
deleted file mode 100644
index 80d311cee86..00000000000
--- a/packages/js/components/changelog/fix-unsaved-prompt
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Set initial values prop from reset form function as optional
diff --git a/packages/js/components/changelog/list-item-classname b/packages/js/components/changelog/list-item-classname
deleted file mode 100644
index 9f5a5ea0d55..00000000000
--- a/packages/js/components/changelog/list-item-classname
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Add className prop to ListItem.
diff --git a/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown b/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown
deleted file mode 100644
index ff75398a39b..00000000000
--- a/packages/js/components/changelog/update-add-aria-label-for-simple-select-dropdown
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: add
-
-Add aria-label for simple select dropdown
diff --git a/packages/js/components/changelog/update-date-time-picker-control-force-time-to b/packages/js/components/changelog/update-date-time-picker-control-force-time-to
deleted file mode 100644
index fcf4278fc5f..00000000000
--- a/packages/js/components/changelog/update-date-time-picker-control-force-time-to
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: minor
-Type: add
-
-Added ability to force time when DateTimePickerControl is date-only (timeForDateOnly prop).
diff --git a/packages/js/components/changelog/update-date-time-picker-control-formatting b/packages/js/components/changelog/update-date-time-picker-control-formatting
deleted file mode 100644
index 800e0dbc01d..00000000000
--- a/packages/js/components/changelog/update-date-time-picker-control-formatting
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: major
-Type: update
-
-Switch DateTimePickerControl formatting to PHP style, for WP compatibility.
diff --git a/packages/js/components/changelog/update-date-time-picker-control-picker-classname b/packages/js/components/changelog/update-date-time-picker-control-picker-classname
deleted file mode 100644
index 4f444ed8862..00000000000
--- a/packages/js/components/changelog/update-date-time-picker-control-picker-classname
+++ /dev/null
@@ -1,4 +0,0 @@
-Significance: patch
-Type: fix
-
-Fix DateTimePickerControl's popover styling when slot-fill is used.
diff --git a/packages/js/components/package.json b/packages/js/components/package.json
index 221e7c2de54..46839c72d33 100644
--- a/packages/js/components/package.json
+++ b/packages/js/components/package.json
@@ -1,6 +1,6 @@
{
"name": "@woocommerce/components",
- "version": "11.1.0",
+ "version": "12.0.0",
"description": "UI components for WooCommerce.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
From af9f493c43cb2e1230cd82d9ca4ac564d143cd14 Mon Sep 17 00:00:00 2001
From: Fernando Marichal
Date: Tue, 3 Jan 2023 10:33:29 -0300
Subject: [PATCH 31/98] Fix attributes/options lists corrupt render (#36236)
* Fix attributes/options lists reordering
* Add changelog
* Fix element key
* Remove comment
* Add tests
* Fix changelog
Co-authored-by: Fernando Marichal
---
.../attribute-field/attribute-field.tsx | 9 +++--
.../fields/attribute-field/test/utils.spec.ts | 37 ++++++++++---------
.../products/fields/attribute-field/utils.ts | 20 ++++++++--
.../fix-36190_attribute_lists_corrupt_renders | 4 ++
4 files changed, 46 insertions(+), 24 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
index f3fe69a63fb..88a97d01cd3 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
@@ -24,7 +24,10 @@ import { getAdminLink } from '@woocommerce/settings';
import './attribute-field.scss';
import { AddAttributeModal } from './add-attribute-modal';
import { EditAttributeModal } from './edit-attribute-modal';
-import { reorderSortableProductAttributePositions } from './utils';
+import {
+ getAttributeKey,
+ reorderSortableProductAttributePositions,
+} from './utils';
import { sift } from '../../../utils';
import { AttributeEmptyState } from '../attribute-empty-state';
import {
@@ -244,10 +247,10 @@ export const AttributeField: React.FC< AttributeFieldProps > = ( {
);
const attributeKeyValues = filteredAttributes.reduce(
(
- keyValue: Record< number, ProductAttribute >,
+ keyValue: Record< number | string, ProductAttribute >,
attribute: ProductAttribute
) => {
- keyValue[ attribute.id ] = attribute;
+ keyValue[ getAttributeKey( attribute ) ] = attribute;
return keyValue;
},
{} as Record< number, ProductAttribute >
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
index 71964dd5fac..0c3812eafda 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
@@ -6,7 +6,10 @@ import { ProductAttribute } from '@woocommerce/data';
/**
* Internal dependencies
*/
-import { reorderSortableProductAttributePositions } from '../utils';
+import {
+ getAttributeKey,
+ reorderSortableProductAttributePositions,
+} from '../utils';
const attributeList: Record< number, ProductAttribute > = {
15: {
@@ -38,9 +41,9 @@ const attributeList: Record< number, ProductAttribute > = {
describe( 'reorderSortableProductAttributePositions', () => {
it( 'should update product attribute positions depending on JSX.Element order', () => {
const elements = [
- { key: '3' },
- { key: '15' },
- { key: '1' },
+ { props: { attribute: attributeList[ '3' ] } },
+ { props: { attribute: attributeList[ '15' ] } },
+ { props: { attribute: attributeList[ '1' ] } },
] as JSX.Element[];
const newList = reorderSortableProductAttributePositions(
elements,
@@ -53,19 +56,19 @@ describe( 'reorderSortableProductAttributePositions', () => {
expect( newList[ 2 ].position ).toEqual( 2 );
expect( newList[ 2 ].id ).toEqual( 1 );
} );
+} );
- it( 'should filter out elements that do not contain a key', () => {
- const elements = [
- { key: '3' },
- {},
- { key: '15' },
- {},
- { key: '1' },
- ] as JSX.Element[];
- const newList = reorderSortableProductAttributePositions(
- elements,
- attributeList
- );
- expect( newList.length ).toEqual( 3 );
+describe( 'getAttributeKey', () => {
+ attributeList[ '20' ] = {
+ id: 0,
+ name: 'Quality',
+ position: 3,
+ visible: true,
+ variation: true,
+ options: [ 'low', 'high' ],
+ };
+ it( 'should return the attribute key', () => {
+ expect( getAttributeKey( attributeList[ '15' ] ) ).toEqual( 15 );
+ expect( getAttributeKey( attributeList[ '20' ] ) ).toEqual( 'Quality' );
} );
} );
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
index 2fc31820553..8548e335bf6 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
@@ -3,6 +3,18 @@
*/
import { ProductAttribute } from '@woocommerce/data';
+/**
+ * Returns the attribute key. The key will be the `id` or the `name` when the id is 0.
+ *
+ * @param { ProductAttribute } attribute product attribute.
+ * @return string|number
+ */
+export function getAttributeKey(
+ attribute: ProductAttribute
+): number | string {
+ return attribute.id !== 0 ? attribute.id : attribute.name;
+}
+
/**
* Updates the position of a product attribute from the new items JSX.Element list.
*
@@ -11,12 +23,12 @@ import { ProductAttribute } from '@woocommerce/data';
*/
export function reorderSortableProductAttributePositions(
items: JSX.Element[],
- attributeKeyValues: Record< number, ProductAttribute >
+ attributeKeyValues: Record< number | string, ProductAttribute >
): ProductAttribute[] {
return items
- .map( ( item, index ): ProductAttribute | undefined => {
- const key = item.key ? parseInt( item.key as string, 10 ) : NaN;
- if ( key !== NaN && attributeKeyValues[ key ] ) {
+ .map( ( { props }, index ): ProductAttribute | undefined => {
+ const key = getAttributeKey( props?.attribute );
+ if ( attributeKeyValues[ key ] ) {
return {
...attributeKeyValues[ key ],
position: index,
diff --git a/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders b/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders
new file mode 100644
index 00000000000..99d4514d606
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36190_attribute_lists_corrupt_renders
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Fix attributes/options lists corrupt render #36236
From df0ddb2dff33febfc3ed2d9ccd0249fc4786f3b5 Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Tue, 3 Jan 2023 08:59:49 -0800
Subject: [PATCH 32/98] Fix navigation between variations and tab selection
(#36239)
* Fix navigation between variations and tab selection
* Add changelog entry
---
.../client/products/fields/variations/variations.tsx | 3 ++-
.../products/hooks/use-product-variation-navigation.ts | 6 ++++--
.../client/products/product-variation-form.tsx | 2 +-
plugins/woocommerce/changelog/fix-36237 | 4 ++++
4 files changed, 11 insertions(+), 4 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36237
diff --git a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
index beaf31ad4f5..5076f08090d 100644
--- a/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/variations/variations.tsx
@@ -205,7 +205,8 @@ export const Variations: React.FC = () => {
-
+
diff --git a/plugins/woocommerce/changelog/fix-36237 b/plugins/woocommerce/changelog/fix-36237
new file mode 100644
index 00000000000..fa4b0ffbd34
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36237
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Fix navigation between variations and tab selection
From 7ecdd503654978b57cd9fcc2ad6e0196fb604021 Mon Sep 17 00:00:00 2001
From: rodelgc
Date: Tue, 3 Jan 2023 20:42:47 +0000
Subject: [PATCH 33/98] E2e/fix obw industry spec (#36260)
* Fix 'can save industry changes' test
* Add changelog
* Wait store details contents to load
---
plugins/woocommerce/changelog/e2e-fix-obw-industry-spec | 4 ++++
.../activate-and-setup/complete-onboarding-wizard.spec.js | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/e2e-fix-obw-industry-spec
diff --git a/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec b/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec
new file mode 100644
index 00000000000..734416dfad8
--- /dev/null
+++ b/plugins/woocommerce/changelog/e2e-fix-obw-industry-spec
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Fix flakiness of the `can save industry changes when navigating back to "Store Details"` E2E test.
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js
index 6aad523cb38..6fe61713ae1 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js
+++ b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js
@@ -27,6 +27,10 @@ test.describe( 'Store owner can complete onboarding wizard', () => {
storeDetails.us.expectedIndustries
);
await page.click( 'button >> text=Continue' );
+ await expect( page ).toHaveURL( /.*step=product-types/ );
+ await expect(
+ page.locator( '.product-types button >> text=Continue' )
+ ).toBeVisible();
} );
// eslint-disable-next-line jest/expect-expect
@@ -41,8 +45,8 @@ test.describe( 'Store owner can complete onboarding wizard', () => {
// Navigate back to "Store Details" section
await page.click( 'button >> text=Store Details' );
-
await onboarding.handleSaveChangesModal( page, { saveChanges: true } );
+ await page.locator( 'text="Welcome to WooCommerce"' ).waitFor();
// Navigate back to "Industry" section
await page.click( 'button >> text=Industry' );
From 302dab0521c85f1e3fd111ea1baaa99df0506f4a Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Wed, 4 Jan 2023 11:22:15 +1300
Subject: [PATCH 34/98] Update browserslistconfig for legacy JS assets (#36264)
---
.../changelog/dev-update-browserslist-config | 4 ++++
plugins/woocommerce/client/legacy/.browserslistrc | 4 +---
plugins/woocommerce/package.json | 5 ++++-
pnpm-lock.yaml | 10 +++++++++-
4 files changed, 18 insertions(+), 5 deletions(-)
create mode 100644 plugins/woocommerce/changelog/dev-update-browserslist-config
diff --git a/plugins/woocommerce/changelog/dev-update-browserslist-config b/plugins/woocommerce/changelog/dev-update-browserslist-config
new file mode 100644
index 00000000000..e693d55dc97
--- /dev/null
+++ b/plugins/woocommerce/changelog/dev-update-browserslist-config
@@ -0,0 +1,4 @@
+Significance: major
+Type: dev
+
+Update the browserslist config for legacy client JS to match Wordpress.
diff --git a/plugins/woocommerce/client/legacy/.browserslistrc b/plugins/woocommerce/client/legacy/.browserslistrc
index 5d191931ac1..0152f61ef03 100644
--- a/plugins/woocommerce/client/legacy/.browserslistrc
+++ b/plugins/woocommerce/client/legacy/.browserslistrc
@@ -1,3 +1 @@
-> 0.1%
-ie 8
-ie 9
+extends @wordpress/browserslist-config
diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json
index 6a43466b9b7..08578cd8252 100644
--- a/plugins/woocommerce/package.json
+++ b/plugins/woocommerce/package.json
@@ -108,5 +108,8 @@
"> 0.1%",
"ie 8",
"ie 9"
- ]
+ ],
+ "dependencies": {
+ "@wordpress/browserslist-config": "^5.7.0"
+ }
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 299870a211f..77ecb9aa174 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1328,6 +1328,7 @@ importers:
'@woocommerce/woocommerce-rest-api': ^1.0.1
'@wordpress/babel-plugin-import-jsx-pragma': 1.1.3
'@wordpress/babel-preset-default': 3.0.2
+ '@wordpress/browserslist-config': ^5.7.0
'@wordpress/env': ^4.8.0
'@wordpress/stylelint-config': 19.1.0
allure-commandline: ^2.17.2
@@ -1354,6 +1355,8 @@ importers:
webpack: 5.70.0
webpack-cli: 3.3.12
wp-textdomain: 1.0.1
+ dependencies:
+ '@wordpress/browserslist-config': 5.7.0
devDependencies:
'@babel/cli': 7.12.8_@babel+core@7.12.9
'@babel/core': 7.12.9
@@ -15629,6 +15632,11 @@ packages:
engines: {node: '>=14'}
dev: false
+ /@wordpress/browserslist-config/5.7.0:
+ resolution: {integrity: sha512-d0wx5DXjGsMDurijJe006lm4FFKjbj2mM9I3MoXR0HCzMy8xk5fl6ZY2574yx4pea+f/UTKfDBi8ArUvhsjGOA==}
+ engines: {node: '>=14'}
+ dev: false
+
/@wordpress/components/12.0.9_tymsfwxsfigcu46i7beagdrini:
resolution: {integrity: sha512-J6uM20Jpchr/NywQmAeVqx/LohwKizi2F8HylqN1Xt2mYzuOrDirlEhQT1wmfqiEqEt0l+mefZEBlxeknMfBag==}
dependencies:
@@ -39037,7 +39045,7 @@ packages:
serialize-javascript: 6.0.0
source-map: 0.6.1
terser: 5.10.0_acorn@8.8.0
- webpack: 5.70.0
+ webpack: 5.70.0_webpack-cli@3.3.12
transitivePeerDependencies:
- acorn
From 421fc3e30bc18ae7b6d2f3ac840647a966dfed1a Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Tue, 3 Jan 2023 16:25:12 -0800
Subject: [PATCH 35/98] Convert HTML to blocks in product variation description
(#36241)
* Convert HTML to blocks in product variation description
* Add changelog entry
---
.../products/sections/product-variation-details-section.tsx | 4 ++--
plugins/woocommerce/changelog/fix-36206 | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36206
diff --git a/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx b/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx
index c92c265c1f7..7886d844bb1 100644
--- a/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx
+++ b/plugins/woocommerce-admin/client/products/sections/product-variation-details-section.tsx
@@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
-import { BlockInstance, serialize, parse } from '@wordpress/blocks';
+import { BlockInstance, serialize, rawHandler } from '@wordpress/blocks';
import {
CheckboxControl,
Card,
@@ -55,7 +55,7 @@ export const ProductVariationDetailsSection: React.FC = () => {
const [ descriptionBlocks, setDescriptionBlocks ] = useState<
BlockInstance[]
- >( parse( values.description || '' ) );
+ >( rawHandler( { HTML: values.description } ) );
const imageFieldProps = getInputProps( 'image' );
diff --git a/plugins/woocommerce/changelog/fix-36206 b/plugins/woocommerce/changelog/fix-36206
new file mode 100644
index 00000000000..22250127df6
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36206
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Convert HTML to blocks in product variation description
From e73fb9f23fcf89787f7c7700b168829464224b77 Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Tue, 3 Jan 2023 16:25:21 -0800
Subject: [PATCH 36/98] Derive product type from product attributes (#36243)
* Derive product type from product attributes
* Add tests around derive product type
* Add changelog entry
---
.../client/products/use-product-helper.ts | 3 +
.../utils/get-derived-product-type.ts | 16 ++++
.../utils/test/get-derived-product-type.ts | 73 +++++++++++++++++++
plugins/woocommerce/changelog/fix-36204 | 4 +
4 files changed, 96 insertions(+)
create mode 100644 plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
create mode 100644 plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts
create mode 100644 plugins/woocommerce/changelog/fix-36204
diff --git a/plugins/woocommerce-admin/client/products/use-product-helper.ts b/plugins/woocommerce-admin/client/products/use-product-helper.ts
index 276439bc2b8..d40129be55b 100644
--- a/plugins/woocommerce-admin/client/products/use-product-helper.ts
+++ b/plugins/woocommerce-admin/client/products/use-product-helper.ts
@@ -22,6 +22,7 @@ import { recordEvent } from '@woocommerce/tracks';
*/
import { AUTO_DRAFT_NAME } from './utils/get-product-title';
import { CurrencyContext } from '../lib/currency-context';
+import { getDerivedProductType } from './utils/get-derived-product-type';
import {
NUMBERS_AND_DECIMAL_SEPARATOR,
ONLY_ONE_DECIMAL_SEPARATOR,
@@ -89,6 +90,7 @@ export function useProductHelper() {
return createProduct( {
...product,
status,
+ type: getDerivedProductType( product ),
} ).then(
( newProduct ) => {
if ( ! skipNotice ) {
@@ -184,6 +186,7 @@ export function useProductHelper() {
return updateProduct( productId, {
...product,
status,
+ type: getDerivedProductType( product ),
} )
.then( async ( updatedProduct ) =>
updateVariationsOrder(
diff --git a/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
new file mode 100644
index 00000000000..60ffbd6e73c
--- /dev/null
+++ b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
@@ -0,0 +1,16 @@
+/**
+ * External dependencies
+ */
+import { Product } from '@woocommerce/data';
+
+export const getDerivedProductType = ( product: Partial< Product > ) => {
+ const hasOptions = !! product.attributes?.find(
+ ( attribute ) => attribute.options.length && attribute.variation
+ );
+
+ if ( hasOptions ) {
+ return 'variable';
+ }
+
+ return 'simple';
+};
diff --git a/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts b/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts
new file mode 100644
index 00000000000..67c4117fece
--- /dev/null
+++ b/plugins/woocommerce-admin/client/products/utils/test/get-derived-product-type.ts
@@ -0,0 +1,73 @@
+/**
+ * Internal dependencies
+ */
+import { getDerivedProductType } from '../get-derived-product-type';
+
+describe( 'getDerivedProductType', () => {
+ it( 'should be simple when no attributes exist', () => {
+ const type = getDerivedProductType( {
+ id: 123,
+ attributes: [],
+ } );
+ expect( type ).toBe( 'simple' );
+ } );
+
+ it( 'should be simple when no attributes used for variations exist', () => {
+ const type = getDerivedProductType( {
+ id: 123,
+ attributes: [
+ {
+ id: 0,
+ name: 'Color',
+ options: [ 'Red', 'Blue' ],
+ position: 0,
+ variation: false,
+ visible: true,
+ },
+ ],
+ } );
+ expect( type ).toBe( 'simple' );
+ } );
+
+ it( 'should be simple when no options exist for a variation', () => {
+ const type = getDerivedProductType( {
+ id: 123,
+ attributes: [
+ {
+ id: 0,
+ name: 'Color',
+ options: [],
+ position: 0,
+ variation: true,
+ visible: true,
+ },
+ ],
+ } );
+ expect( type ).toBe( 'simple' );
+ } );
+
+ it( 'should be variable when at least one attribute can be used for variations', () => {
+ const type = getDerivedProductType( {
+ id: 123,
+ attributes: [
+ {
+ id: 0,
+ name: 'Size',
+ options: [ 'Small', 'Medium' ],
+ position: 0,
+ variation: false,
+ visible: true,
+ },
+ {
+ id: 0,
+ name: 'Color',
+ options: [ 'Red', 'Blue' ],
+ position: 1,
+ variation: true,
+ visible: true,
+ },
+ ],
+ } );
+ expect( type ).toBe( 'variable' );
+ } );
+} );
diff --git a/plugins/woocommerce/changelog/fix-36204 b/plugins/woocommerce/changelog/fix-36204
new file mode 100644
index 00000000000..b82f195a017
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36204
@@ -0,0 +1,4 @@
+Significance: minor
+Type: tweak
+
+Derive product type from product attributes
From e0b829413db0738487f2f1e57898bb10f4eb8342 Mon Sep 17 00:00:00 2001
From: IanDelMar <42134098+IanDelMar@users.noreply.github.com>
Date: Wed, 4 Jan 2023 04:40:18 +0100
Subject: [PATCH 37/98] Make coupon code label accessible (#36247)
* Make coupon code label accessible
* Changelog, version tag bump.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
---
plugins/woocommerce/changelog/fix-coupon-code-a11y | 4 ++++
plugins/woocommerce/client/legacy/css/woocommerce-layout.scss | 4 ----
plugins/woocommerce/templates/cart/cart.php | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-coupon-code-a11y
diff --git a/plugins/woocommerce/changelog/fix-coupon-code-a11y b/plugins/woocommerce/changelog/fix-coupon-code-a11y
new file mode 100644
index 00000000000..6a4f60b8cc6
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-coupon-code-a11y
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Improve accessibility of the coupon code label, in the context of the cart page.
diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss b/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss
index 2ff2655a82f..d9d4eafa2b0 100644
--- a/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss
+++ b/plugins/woocommerce/client/legacy/css/woocommerce-layout.scss
@@ -284,10 +284,6 @@
.coupon {
float: left;
-
- label {
- display: none;
- }
}
}
}
diff --git a/plugins/woocommerce/templates/cart/cart.php b/plugins/woocommerce/templates/cart/cart.php
index ed571ab99ca..a8f8c22d83d 100644
--- a/plugins/woocommerce/templates/cart/cart.php
+++ b/plugins/woocommerce/templates/cart/cart.php
@@ -12,7 +12,7 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
- * @version 7.0.1
+ * @version 7.4.0
*/
defined( 'ABSPATH' ) || exit;
@@ -144,7 +144,7 @@ do_action( 'woocommerce_before_cart' ); ?>
-
+
From e84c38504f88bdfd1f3caae8942591d1161c307c Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Thu, 5 Jan 2023 01:27:01 +0530
Subject: [PATCH 38/98] Speed up search query by using GROUP BY instead of
DISTINCT for HPOS (#35897)
* Spped up the search query by using GROUP_BY.
Search query peforms much faster when using group by, MySQL does not like it when we use DISTINCT and join different tables.
* Add changelog.
* Fixup for calculating found orders seperately.
* Code standard fix.
---
plugins/woocommerce/changelog/fix-35831 | 4 +++
.../src/Internal/Admin/Orders/ListTable.php | 2 ++
.../Orders/OrdersTableDataStore.php | 33 ++++++++++---------
.../DataStores/Orders/OrdersTableQuery.php | 17 ++++------
4 files changed, 30 insertions(+), 26 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-35831
diff --git a/plugins/woocommerce/changelog/fix-35831 b/plugins/woocommerce/changelog/fix-35831
new file mode 100644
index 00000000000..88b473b7fbe
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35831
@@ -0,0 +1,4 @@
+Significance: patch
+Type: performance
+
+Speed up HPOS search query by using group by instead of distinct.
diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php b/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php
index 6b548868c17..60af687f117 100644
--- a/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php
+++ b/plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php
@@ -365,6 +365,8 @@ class ListTable extends WP_List_Table {
$direction = strtoupper( sanitize_text_field( wp_unslash( $_GET['order'] ?? '' ) ) );
if ( ! in_array( $field, $sortable, true ) ) {
+ $this->order_query_args['orderby'] = 'id';
+ $this->order_query_args['order'] = 'DESC';
return;
}
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
index f2543f037f6..9326b05498d 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php
@@ -911,8 +911,6 @@ WHERE
return array_map( 'intval', (array) apply_filters( 'woocommerce_cot_shop_order_search_results', $order_ids, $term ) );
}
- //phpcs:enable Squiz.Commenting, Generic.Commenting
-
/**
* Fetch order type for orders in bulk.
*
@@ -1736,9 +1734,6 @@ FROM $order_meta_table
);
}
-
- //phpcs:disable Squiz.Commenting, Generic.Commenting
-
/**
* Method to delete an order from the database.
*
@@ -1799,7 +1794,8 @@ FROM $order_meta_table
/**
* Trashes an order.
*
- * @param WC_Order $order The order object
+ * @param WC_Order $order The order object.
+ *
* @return void
*/
public function trash_order( $order ) {
@@ -1919,9 +1915,9 @@ FROM $order_meta_table
$data_synchronizer = wc_get_container()->get( DataSynchronizer::class );
if ( $data_synchronizer->data_sync_is_enabled() ) {
- //The previous $order->save() will have forced a sync to the posts table,
- //this implies that the post status is not "trash" anymore, and thus
- //wp_untrash_post would do nothing.
+ // The previous $order->save() will have forced a sync to the posts table,
+ // this implies that the post status is not "trash" anymore, and thus
+ // wp_untrash_post would do nothing.
wp_update_post(
array(
'ID' => $id,
@@ -1998,6 +1994,8 @@ FROM $order_meta_table
* This should not contain and specific meta or actions, so that it can be used other order types safely.
*
* @param \WC_Order $order Order object.
+ * @param bool $force_all_fields Force update all fields, instead of calculating and updating only changed fields.
+ * @param bool $backfill Whether to backfill data to post datastore.
*
* @return void
*
@@ -2027,7 +2025,7 @@ FROM $order_meta_table
/**
* Method to update an order in the database.
*
- * @param \WC_Order $order
+ * @param \WC_Order $order Order object.
*/
public function update( &$order ) {
// Before updating, ensure date paid is set if missing.
@@ -2083,6 +2081,7 @@ FROM $order_meta_table
* This is expected to be reused by other order types, and should not contain any specific metadata updates or actions.
*
* @param \WC_Order $order Order object.
+ * @param bool $backfill Whether to backfill data to post tables.
*
* @return array $changes Array of changes.
*
@@ -2135,7 +2134,8 @@ FROM $order_meta_table
/**
* Helper function to update billing and shipping address metadata.
- * @param \WC_Abstract_Order $order Order Object
+ *
+ * @param \WC_Abstract_Order $order Order Object.
* @param array $changes Array of changes.
*
* @return void
@@ -2234,6 +2234,13 @@ FROM $order_meta_table
}
+ /**
+ * Performs actual query to get orders. Uses `OrdersTableQuery` to build and generate the query.
+ *
+ * @param array $query_vars Query variables.
+ *
+ * @return array|object List of orders and count of orders.
+ */
public function query( $query_vars ) {
if ( ! isset( $query_vars['paginate'] ) || ! $query_vars['paginate'] ) {
$query_vars['no_found_rows'] = true;
@@ -2282,10 +2289,6 @@ FROM $order_meta_table
return $orders;
}
- public function get_order_item_type( $order, $order_item_id ) {
- return 'line_item';
- }
-
//phpcs:enable Squiz.Commenting, Generic.Commenting
/**
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
index 8b71df2aed5..213ccdff5e7 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
@@ -572,9 +572,6 @@ class OrdersTableQuery {
$this->join = $sql['join'] ? array_merge( $this->join, $sql['join'] ) : $this->join;
$this->where = $sql['where'] ? array_merge( $this->where, array( $sql['where'] ) ) : $this->where;
- if ( $sql['join'] ) {
- $this->groupby[] = "{$this->tables['orders']}.id";
- }
}
// Date queries.
@@ -588,12 +585,10 @@ class OrdersTableQuery {
$orders_table = $this->tables['orders'];
- // SELECT [fields].
- $this->fields = "{$orders_table}.id";
- $fields = $this->fields;
-
- // SQL_CALC_FOUND_ROWS.
- $found_rows = '';
+ // Group by is a faster substitute for DISTINCT, as long as we are only selecting IDs. MySQL don't like it when we join tables and use DISTINCT.
+ $this->groupby[] = "{$this->tables['orders']}.id";
+ $this->fields = "{$orders_table}.id";
+ $fields = $this->fields;
// JOIN.
$join = implode( ' ', array_unique( array_filter( array_map( 'trim', $this->join ) ) ) );
@@ -619,7 +614,7 @@ class OrdersTableQuery {
// GROUP BY.
$groupby = $this->groupby ? 'GROUP BY ' . implode( ', ', (array) $this->groupby ) : '';
- $this->sql = "SELECT $found_rows DISTINCT $fields FROM $orders_table $join WHERE $where $groupby $orderby $limits";
+ $this->sql = "SELECT $fields FROM $orders_table $join WHERE $where $groupby $orderby $limits";
$this->build_count_query( $fields, $join, $where, $groupby );
}
@@ -636,7 +631,7 @@ class OrdersTableQuery {
wc_doing_it_wrong( __FUNCTION__, 'Count query can only be build after main query is built.', '7.3.0' );
}
$orders_table = $this->tables['orders'];
- $this->count_sql = "SELECT COUNT(DISTINCT $fields) FROM $orders_table $join WHERE $where $groupby";
+ $this->count_sql = "SELECT COUNT(DISTINCT $fields) FROM $orders_table $join WHERE $where";
}
/**
From 584167746e351f9426ae025cbfbe2abb21c5b1a2 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Thu, 5 Jan 2023 01:38:22 +0530
Subject: [PATCH 39/98] Skip custom search for HPOS API queries as it's handled
already. (#36213)
* Skip custom search for HPOS API queries as it's handled already.
For HPOS, we don't need a seperate step of passing the args through wc_order_search since we take care of search params in the final query itself. This duplication was actually causing for some results to not be displayed since we were ending up not honouring pagination arguments and would search only in first 10 matches.
* Add changelog.
---
plugins/woocommerce/changelog/fix-36212 | 4 +++
.../class-wc-rest-orders-v2-controller.php | 30 +++++++++++++++----
2 files changed, 28 insertions(+), 6 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36212
diff --git a/plugins/woocommerce/changelog/fix-36212 b/plugins/woocommerce/changelog/fix-36212
new file mode 100644
index 00000000000..9540f4d7035
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36212
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Skip custom search for HPOS API queries as it's handled already.
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
index 88601765bc7..39cf28d7a59 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
@@ -8,8 +8,11 @@
* @since 2.6.0
*/
+use Automattic\WooCommerce\Utilities\OrderUtil;
+
defined( 'ABSPATH' ) || exit;
+// phpcs:disable Squiz.Classes.ClassFileName.NoMatch, Squiz.Classes.ValidClassName.NotCamelCaps -- Legacy class name, can't change without breaking backward compat.
/**
* REST API Orders controller class.
*
@@ -18,6 +21,7 @@ defined( 'ABSPATH' ) || exit;
*/
class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
+ // phpcs:enable
/**
* Endpoint namespace.
*
@@ -314,7 +318,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
if ( array_key_exists( $meta_item->id, $formatted_meta_data ) ) {
$formatted_meta_item = $formatted_meta_data[ $meta_item->id ];
- $result['display_key'] = wc_clean( $formatted_meta_item->display_key );
+ $result['display_key'] = wc_clean( $formatted_meta_item->display_key );
$result['display_value'] = wc_clean( $formatted_meta_item->display_value );
}
@@ -346,14 +350,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
// Only fetch fields that we need.
$fields = $this->get_fields_for_response( $this->request );
foreach ( $dependent_fields as $field_key => $dependency ) {
- if ( in_array( $field_key, $fields ) && ! in_array( $dependency, $fields ) ) {
+ if ( in_array( $field_key, $fields, true ) && ! in_array( $dependency, $fields, true ) ) {
$fields[] = $dependency;
}
}
- $extra_fields = array_intersect( $extra_fields, $fields );
- $format_decimal = array_intersect( $format_decimal, $fields );
- $format_date = array_intersect( $format_date, $fields );
+ $extra_fields = array_intersect( $extra_fields, $fields );
+ $format_decimal = array_intersect( $format_decimal, $fields );
+ $format_date = array_intersect( $format_date, $fields );
$format_line_items = array_intersect( $format_line_items, $fields );
@@ -506,6 +510,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
* @param WP_REST_Response $response The response object.
* @param WC_Data $object Object data.
* @param WP_REST_Request $request Request object.
+ *
+ * @since 4.5.0
*/
return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
}
@@ -594,7 +600,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
}
// Search.
- if ( ! empty( $args['s'] ) ) {
+ if ( ! OrderUtil::custom_orders_table_usage_is_enabled() && ! empty( $args['s'] ) ) {
$order_ids = wc_order_search( $args['s'] );
if ( ! empty( $order_ids ) ) {
@@ -610,6 +616,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
*
* @param array $args Key value array of query var to query value.
* @param WP_REST_Request $request The request used.
+ *
+ * @since 4.5.0.
*/
$args = apply_filters( 'woocommerce_rest_orders_prepare_object_query', $args, $request );
@@ -693,6 +701,8 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
* @param WC_Data $order Object object.
* @param WP_REST_Request $request Request object.
* @param bool $creating If is creating a new object.
+ *
+ * @since 4.5.0.
*/
return apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $order, $request, $creating );
}
@@ -979,6 +989,14 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
// Prepare item data.
$item = $this->$method( $posted, $action, $item );
+ /**
+ * Allow extensions be notified before the item before is saved.
+ *
+ * @param WC_Order_Item $item The item object.
+ * @param array $posted The item data.
+ *
+ * @since 4.5.0.
+ */
do_action( 'woocommerce_rest_set_order_item', $item, $posted );
// If creating the order, add the item to it.
From f36a16cd0648bcd2f3606969eb76070310237fed Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Thu, 5 Jan 2023 14:42:51 +0530
Subject: [PATCH 40/98] Update changelogger to 3.3.0 to support PR number
capturing with merge (#36266)
* Update changelogger.
* Add changelog.
* Update changelogger for all packages.
* Add changelogs.
* Update changelog for remaining packages.
---
.../changelog/update-changelogger | 5 +
packages/js/admin-e2e-tests/composer.json | 2 +-
packages/js/admin-e2e-tests/composer.lock | 44 +++---
packages/js/api/changelog/update-changelogger | 5 +
packages/js/api/composer.json | 2 +-
packages/js/api/composer.lock | 44 +++---
.../components/changelog/update-changelogger | 5 +
packages/js/components/composer.json | 2 +-
packages/js/components/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
.../js/create-woo-extension/composer.json | 2 +-
.../js/create-woo-extension/composer.lock | 22 +--
.../csv-export/changelog/update-changelogger | 5 +
packages/js/csv-export/composer.json | 2 +-
packages/js/csv-export/composer.lock | 44 +++---
.../js/currency/changelog/update-changelogger | 5 +
packages/js/currency/composer.json | 2 +-
packages/js/currency/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
.../js/customer-effort-score/composer.json | 2 +-
.../js/customer-effort-score/composer.lock | 44 +++---
.../js/data/changelog/update-changelogger | 5 +
packages/js/data/composer.json | 2 +-
packages/js/data/composer.lock | 44 +++---
.../js/date/changelog/update-changelogger | 5 +
packages/js/date/composer.json | 2 +-
packages/js/date/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
.../composer.json | 2 +-
.../composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
packages/js/eslint-plugin/composer.json | 2 +-
packages/js/eslint-plugin/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
packages/js/experimental/composer.json | 2 +-
packages/js/experimental/composer.lock | 44 +++---
.../js/explat/changelog/update-changelogger | 5 +
packages/js/explat/composer.json | 2 +-
packages/js/explat/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
.../extend-cart-checkout-block/composer.json | 2 +-
.../extend-cart-checkout-block/composer.lock | 44 +++---
.../navigation/changelog/update-changelogger | 5 +
packages/js/navigation/composer.json | 2 +-
packages/js/navigation/composer.lock | 44 +++---
.../js/number/changelog/update-changelogger | 5 +
packages/js/number/composer.json | 2 +-
packages/js/number/composer.lock | 44 +++---
.../onboarding/changelog/update-changelogger | 5 +
packages/js/onboarding/composer.json | 2 +-
packages/js/onboarding/composer.lock | 44 +++---
.../js/tracks/changelog/update-changelogger | 5 +
packages/js/tracks/composer.json | 2 +-
packages/js/tracks/composer.lock | 44 +++---
.../changelog/update-changelogger | 5 +
plugins/woocommerce-beta-tester/composer.json | 2 +-
plugins/woocommerce-beta-tester/composer.lock | 126 +++++++++---------
.../bin/composer/mozart/composer.lock | 120 ++++++++---------
.../woocommerce/bin/composer/wp/composer.lock | 24 ++--
.../woocommerce/changelog/update-changelogger | 5 +
plugins/woocommerce/composer.json | 2 +-
plugins/woocommerce/composer.lock | 22 +--
62 files changed, 652 insertions(+), 550 deletions(-)
create mode 100644 packages/js/admin-e2e-tests/changelog/update-changelogger
create mode 100644 packages/js/api/changelog/update-changelogger
create mode 100644 packages/js/components/changelog/update-changelogger
create mode 100644 packages/js/create-woo-extension/changelog/update-changelogger
create mode 100644 packages/js/csv-export/changelog/update-changelogger
create mode 100644 packages/js/currency/changelog/update-changelogger
create mode 100644 packages/js/customer-effort-score/changelog/update-changelogger
create mode 100644 packages/js/data/changelog/update-changelogger
create mode 100644 packages/js/date/changelog/update-changelogger
create mode 100644 packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger
create mode 100644 packages/js/eslint-plugin/changelog/update-changelogger
create mode 100644 packages/js/experimental/changelog/update-changelogger
create mode 100644 packages/js/explat/changelog/update-changelogger
create mode 100644 packages/js/extend-cart-checkout-block/changelog/update-changelogger
create mode 100644 packages/js/navigation/changelog/update-changelogger
create mode 100644 packages/js/number/changelog/update-changelogger
create mode 100644 packages/js/onboarding/changelog/update-changelogger
create mode 100644 packages/js/tracks/changelog/update-changelogger
create mode 100644 plugins/woocommerce-beta-tester/changelog/update-changelogger
create mode 100644 plugins/woocommerce/changelog/update-changelogger
diff --git a/packages/js/admin-e2e-tests/changelog/update-changelogger b/packages/js/admin-e2e-tests/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/admin-e2e-tests/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/admin-e2e-tests/composer.json b/packages/js/admin-e2e-tests/composer.json
index 90649ce14ac..6f20e363555 100644
--- a/packages/js/admin-e2e-tests/composer.json
+++ b/packages/js/admin-e2e-tests/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/admin-e2e-tests/composer.lock b/packages/js/admin-e2e-tests/composer.lock
index 602ff6fabdc..f448cbf9e57 100644
--- a/packages/js/admin-e2e-tests/composer.lock
+++ b/packages/js/admin-e2e-tests/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "cae17ca18e2a2a6cefe200df88081346",
+ "content-hash": "959b38edbc3ae0c3853c02e86852f583",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/api/changelog/update-changelogger b/packages/js/api/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/api/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/api/composer.json b/packages/js/api/composer.json
index 384ed03b22e..02a86b11c3a 100644
--- a/packages/js/api/composer.json
+++ b/packages/js/api/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/api/composer.lock b/packages/js/api/composer.lock
index e2ee0a36abe..aa3ed289cf2 100644
--- a/packages/js/api/composer.lock
+++ b/packages/js/api/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2ac4a9ea3ab4687cb26b0075128628de",
+ "content-hash": "8cdc2ba8c2e8669b3d48cf7e4cb3c379",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/components/changelog/update-changelogger b/packages/js/components/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/components/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/components/composer.json b/packages/js/components/composer.json
index 9bb6df42457..002cbd95bab 100644
--- a/packages/js/components/composer.json
+++ b/packages/js/components/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/components/composer.lock b/packages/js/components/composer.lock
index 87b9fcf1a87..4324a3af9b4 100644
--- a/packages/js/components/composer.lock
+++ b/packages/js/components/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "75af54f4e83b1e2c7c96371c3288e355",
+ "content-hash": "0e715b7322bdb353060f76a3279195e1",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/create-woo-extension/changelog/update-changelogger b/packages/js/create-woo-extension/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/create-woo-extension/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/create-woo-extension/composer.json b/packages/js/create-woo-extension/composer.json
index c552cf99b2b..9567daedbbc 100644
--- a/packages/js/create-woo-extension/composer.json
+++ b/packages/js/create-woo-extension/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/create-woo-extension/composer.lock b/packages/js/create-woo-extension/composer.lock
index ace5b309e5e..32d9df34919 100644
--- a/packages/js/create-woo-extension/composer.lock
+++ b/packages/js/create-woo-extension/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "af64b929c80c204120d9eccb66330d6c",
+ "content-hash": "e22045358357e9c229d188944b337d8f",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
diff --git a/packages/js/csv-export/changelog/update-changelogger b/packages/js/csv-export/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/csv-export/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/csv-export/composer.json b/packages/js/csv-export/composer.json
index 2ac2f972b1e..e6230624ae3 100644
--- a/packages/js/csv-export/composer.json
+++ b/packages/js/csv-export/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/csv-export/composer.lock b/packages/js/csv-export/composer.lock
index b6ccc8b3541..86b4021326c 100644
--- a/packages/js/csv-export/composer.lock
+++ b/packages/js/csv-export/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "9d346e4d6a7b7aae6eba7dc306295ea8",
+ "content-hash": "7d0335a37eff7dfd560cf35f5898cc05",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/currency/changelog/update-changelogger b/packages/js/currency/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/currency/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/currency/composer.json b/packages/js/currency/composer.json
index f4975d986e9..525b0140709 100644
--- a/packages/js/currency/composer.json
+++ b/packages/js/currency/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/currency/composer.lock b/packages/js/currency/composer.lock
index 2b5a46517c0..1187b31fb2e 100644
--- a/packages/js/currency/composer.lock
+++ b/packages/js/currency/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f4d8c783fbd5ae4f782df2d5f1a6fdc2",
+ "content-hash": "26606191ce4af6fa09504ecea845e970",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/customer-effort-score/changelog/update-changelogger b/packages/js/customer-effort-score/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/customer-effort-score/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/customer-effort-score/composer.json b/packages/js/customer-effort-score/composer.json
index bc3c8c58268..9dd58f9f69d 100644
--- a/packages/js/customer-effort-score/composer.json
+++ b/packages/js/customer-effort-score/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/customer-effort-score/composer.lock b/packages/js/customer-effort-score/composer.lock
index f56c2fc116e..58f777fd713 100644
--- a/packages/js/customer-effort-score/composer.lock
+++ b/packages/js/customer-effort-score/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2d332eda546c5e999a9db224719b3d40",
+ "content-hash": "0215b2cfc41d308b925fce9038111c68",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/data/changelog/update-changelogger b/packages/js/data/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/data/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/data/composer.json b/packages/js/data/composer.json
index 62170ffbdf8..9aabc322160 100644
--- a/packages/js/data/composer.json
+++ b/packages/js/data/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/data/composer.lock b/packages/js/data/composer.lock
index 55d17fcef62..a339154793b 100644
--- a/packages/js/data/composer.lock
+++ b/packages/js/data/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e8aae6511dda74f8220d58b7ae1e9e74",
+ "content-hash": "17a41dc458677cca1830b065f3c83635",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/date/changelog/update-changelogger b/packages/js/date/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/date/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/date/composer.json b/packages/js/date/composer.json
index ba72efa1dc9..eaab577ba18 100644
--- a/packages/js/date/composer.json
+++ b/packages/js/date/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/date/composer.lock b/packages/js/date/composer.lock
index 762fa0eaa30..54e47fea560 100644
--- a/packages/js/date/composer.lock
+++ b/packages/js/date/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "c2e5c404a4fee4f6a5892f989459c502",
+ "content-hash": "d9d159c4b750dd3d45df132d1f35786f",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger b/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/dependency-extraction-webpack-plugin/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/dependency-extraction-webpack-plugin/composer.json b/packages/js/dependency-extraction-webpack-plugin/composer.json
index e093fbc6bc4..61c2a773d08 100644
--- a/packages/js/dependency-extraction-webpack-plugin/composer.json
+++ b/packages/js/dependency-extraction-webpack-plugin/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/dependency-extraction-webpack-plugin/composer.lock b/packages/js/dependency-extraction-webpack-plugin/composer.lock
index c03a208a91c..da4247133c7 100644
--- a/packages/js/dependency-extraction-webpack-plugin/composer.lock
+++ b/packages/js/dependency-extraction-webpack-plugin/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "024163a2e226f019b11933129ddfd115",
+ "content-hash": "1852d63966be2375d2f8edb607b861e9",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/eslint-plugin/changelog/update-changelogger b/packages/js/eslint-plugin/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/eslint-plugin/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/eslint-plugin/composer.json b/packages/js/eslint-plugin/composer.json
index 8d62a41f972..5012dde7810 100644
--- a/packages/js/eslint-plugin/composer.json
+++ b/packages/js/eslint-plugin/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/eslint-plugin/composer.lock b/packages/js/eslint-plugin/composer.lock
index 25a718f685a..107253b0ce0 100644
--- a/packages/js/eslint-plugin/composer.lock
+++ b/packages/js/eslint-plugin/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "cfc0b63277f38526f4ff5300cfa22eca",
+ "content-hash": "243353ec23421c68191575ad267a7ccb",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/experimental/changelog/update-changelogger b/packages/js/experimental/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/experimental/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/experimental/composer.json b/packages/js/experimental/composer.json
index e3476415ee7..3205900cc2d 100644
--- a/packages/js/experimental/composer.json
+++ b/packages/js/experimental/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/experimental/composer.lock b/packages/js/experimental/composer.lock
index c96ea1e4927..0670bdc43ab 100644
--- a/packages/js/experimental/composer.lock
+++ b/packages/js/experimental/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8de7a23a39e8b1299465d2c26a261cf7",
+ "content-hash": "24b7e7383de02c18e0a5550dbdbb03b9",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/explat/changelog/update-changelogger b/packages/js/explat/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/explat/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/explat/composer.json b/packages/js/explat/composer.json
index c743758573e..d3a25ad845c 100644
--- a/packages/js/explat/composer.json
+++ b/packages/js/explat/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/explat/composer.lock b/packages/js/explat/composer.lock
index 6d46ada4c30..4218525e9bd 100644
--- a/packages/js/explat/composer.lock
+++ b/packages/js/explat/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "c62661e12843ad431e9056ecdcfa696b",
+ "content-hash": "00d978b5b08bc69f9e23fd471d759d71",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/extend-cart-checkout-block/changelog/update-changelogger b/packages/js/extend-cart-checkout-block/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/extend-cart-checkout-block/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/extend-cart-checkout-block/composer.json b/packages/js/extend-cart-checkout-block/composer.json
index 9c44b2a742c..72e09daf6f3 100644
--- a/packages/js/extend-cart-checkout-block/composer.json
+++ b/packages/js/extend-cart-checkout-block/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/extend-cart-checkout-block/composer.lock b/packages/js/extend-cart-checkout-block/composer.lock
index 4885651ee1f..32d9df34919 100644
--- a/packages/js/extend-cart-checkout-block/composer.lock
+++ b/packages/js/extend-cart-checkout-block/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "6bd29bd29a67b60a2199c7f520eada56",
+ "content-hash": "e22045358357e9c229d188944b337d8f",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/navigation/changelog/update-changelogger b/packages/js/navigation/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/navigation/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/navigation/composer.json b/packages/js/navigation/composer.json
index b7f58a6164e..108f8491431 100644
--- a/packages/js/navigation/composer.json
+++ b/packages/js/navigation/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/navigation/composer.lock b/packages/js/navigation/composer.lock
index 28dcb6647a2..222d043ef11 100644
--- a/packages/js/navigation/composer.lock
+++ b/packages/js/navigation/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "0fc4e9b9f69b0b3f85fbc39b55f230d2",
+ "content-hash": "8dc2dd55c9c02cea672ce30791113055",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/number/changelog/update-changelogger b/packages/js/number/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/number/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/number/composer.json b/packages/js/number/composer.json
index caf1ed82b65..1b0987fe22b 100644
--- a/packages/js/number/composer.json
+++ b/packages/js/number/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/number/composer.lock b/packages/js/number/composer.lock
index 15f9588eb1c..3f53e203bae 100644
--- a/packages/js/number/composer.lock
+++ b/packages/js/number/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f823beb8ba53e2ce3eb222a7225b9c81",
+ "content-hash": "87beeb0c840ac6ac539462236730d56d",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/onboarding/changelog/update-changelogger b/packages/js/onboarding/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/onboarding/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/onboarding/composer.json b/packages/js/onboarding/composer.json
index 20ce9b28533..df6b1835fe9 100644
--- a/packages/js/onboarding/composer.json
+++ b/packages/js/onboarding/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/onboarding/composer.lock b/packages/js/onboarding/composer.lock
index 6fca3c5d6a1..760ff255dcc 100644
--- a/packages/js/onboarding/composer.lock
+++ b/packages/js/onboarding/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "24717ec0e0fb36f9ba425aa9c7f77ebf",
+ "content-hash": "3270cb0738d35835d789ab5d36483b86",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/packages/js/tracks/changelog/update-changelogger b/packages/js/tracks/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/packages/js/tracks/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/packages/js/tracks/composer.json b/packages/js/tracks/composer.json
index 8c8141d9e26..ff8e80b2295 100644
--- a/packages/js/tracks/composer.json
+++ b/packages/js/tracks/composer.json
@@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"minimum-stability": "dev",
"require-dev": {
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"config": {
"platform": {
diff --git a/packages/js/tracks/composer.lock b/packages/js/tracks/composer.lock
index d046d98a4e4..6d6107d9484 100644
--- a/packages/js/tracks/composer.lock
+++ b/packages/js/tracks/composer.lock
@@ -4,32 +4,32 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "c1c9ce8ab810d38191077a10b9438963",
+ "content-hash": "187263d279049fb672fd761eb4496970",
"packages": [],
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -38,7 +38,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -60,9 +60,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "psr/log",
@@ -204,12 +204,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -249,7 +249,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -266,7 +266,7 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -274,12 +274,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -295,7 +295,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -334,7 +334,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -350,7 +350,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/plugins/woocommerce-beta-tester/changelog/update-changelogger b/plugins/woocommerce-beta-tester/changelog/update-changelogger
new file mode 100644
index 00000000000..1674c919e78
--- /dev/null
+++ b/plugins/woocommerce-beta-tester/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Dev dependency update.
+
+
diff --git a/plugins/woocommerce-beta-tester/composer.json b/plugins/woocommerce-beta-tester/composer.json
index 0694cec1b52..9bec634bd68 100644
--- a/plugins/woocommerce-beta-tester/composer.json
+++ b/plugins/woocommerce-beta-tester/composer.json
@@ -13,7 +13,7 @@
"require-dev": {
"phpunit/phpunit": "^6.5 || ^7.5",
"woocommerce/woocommerce-sniffs": "^0.1.3",
- "automattic/jetpack-changelogger": "3.1.3"
+ "automattic/jetpack-changelogger": "3.3.0"
},
"scripts": {
"test": [
diff --git a/plugins/woocommerce-beta-tester/composer.lock b/plugins/woocommerce-beta-tester/composer.lock
index 5f443f5dd42..1a608c200b2 100644
--- a/plugins/woocommerce-beta-tester/composer.lock
+++ b/plugins/woocommerce-beta-tester/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f1e75252dada3cbba14f5c9b474ace42",
+ "content-hash": "e1ae720be342a5fd2aa3cbac6514537d",
"packages": [
{
"name": "composer/installers",
@@ -161,27 +161,27 @@
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -190,7 +190,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -212,9 +212,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
@@ -293,30 +293,30 @@
},
{
"name": "doctrine/instantiator",
- "version": "1.4.1",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^9",
+ "doctrine/coding-standard": "^9 || ^11",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.22"
+ "vimeo/psalm": "^4.30 || ^5.4"
},
"type": "library",
"autoload": {
@@ -343,7 +343,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
},
"funding": [
{
@@ -359,7 +359,7 @@
"type": "tidelift"
}
],
- "time": "2022-03-03T08:28:38+00:00"
+ "time": "2022-12-30T00:15:36+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -594,16 +594,16 @@
},
{
"name": "phpcompatibility/phpcompatibility-paragonie",
- "version": "1.3.1",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
- "reference": "ddabec839cc003651f2ce695c938686d1086cf43"
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43",
- "reference": "ddabec839cc003651f2ce695c938686d1086cf43",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
+ "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
"shasum": ""
},
"require": {
@@ -640,26 +640,27 @@
"paragonie",
"phpcs",
"polyfill",
- "standards"
+ "standards",
+ "static analysis"
],
"support": {
"issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
"source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
},
- "time": "2021-02-15T10:24:51+00:00"
+ "time": "2022-10-25T01:46:02+00:00"
},
{
"name": "phpcompatibility/phpcompatibility-wp",
- "version": "2.1.3",
+ "version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
- "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308"
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/d55de55f88697b9cdb94bccf04f14eb3b11cf308",
- "reference": "d55de55f88697b9cdb94bccf04f14eb3b11cf308",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
+ "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
"shasum": ""
},
"require": {
@@ -694,13 +695,14 @@
"compatibility",
"phpcs",
"standards",
+ "static analysis",
"wordpress"
],
"support": {
"issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
"source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
},
- "time": "2021-12-30T16:37:40+00:00"
+ "time": "2022-10-24T09:00:36+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@@ -864,21 +866,21 @@
},
{
"name": "phpspec/prophecy",
- "version": "v1.15.0",
+ "version": "v1.16.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
+ "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
- "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359",
+ "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
- "php": "^7.2 || ~8.0, <8.2",
+ "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
@@ -925,9 +927,9 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
- "source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
+ "source": "https://github.com/phpspec/prophecy/tree/v1.16.0"
},
- "time": "2021-12-08T12:19:24+00:00"
+ "time": "2022-11-29T15:06:56+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -1415,16 +1417,16 @@
},
{
"name": "sebastian/comparator",
- "version": "3.0.3",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
- "reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
"shasum": ""
},
"require": {
@@ -1477,7 +1479,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5"
},
"funding": [
{
@@ -1485,7 +1487,7 @@
"type": "github"
}
],
- "time": "2020-11-30T08:04:30+00:00"
+ "time": "2022-09-14T12:31:48+00:00"
},
{
"name": "sebastian/diff",
@@ -1618,16 +1620,16 @@
},
{
"name": "sebastian/exporter",
- "version": "3.1.4",
+ "version": "3.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
+ "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
- "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6",
+ "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6",
"shasum": ""
},
"require": {
@@ -1683,7 +1685,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5"
},
"funding": [
{
@@ -1691,7 +1693,7 @@
"type": "github"
}
],
- "time": "2021-11-11T13:51:24+00:00"
+ "time": "2022-09-14T06:00:17+00:00"
},
{
"name": "sebastian/global-state",
@@ -2164,16 +2166,16 @@
},
{
"name": "symfony/debug",
- "version": "v4.4.41",
+ "version": "v4.4.44",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
- "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
+ "reference": "1a692492190773c5310bc7877cb590c04c2f05be",
"shasum": ""
},
"require": {
@@ -2212,7 +2214,7 @@
"description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/debug/tree/v4.4.41"
+ "source": "https://github.com/symfony/debug/tree/v4.4.44"
},
"funding": [
{
@@ -2229,20 +2231,20 @@
}
],
"abandoned": "symfony/error-handler",
- "time": "2022-04-12T15:19:55+00:00"
+ "time": "2022-07-28T16:29:46+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -2257,7 +2259,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -2296,7 +2298,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -2312,7 +2314,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/process",
diff --git a/plugins/woocommerce/bin/composer/mozart/composer.lock b/plugins/woocommerce/bin/composer/mozart/composer.lock
index 1b31825ab7b..1554fb40d8b 100644
--- a/plugins/woocommerce/bin/composer/mozart/composer.lock
+++ b/plugins/woocommerce/bin/composer/mozart/composer.lock
@@ -268,16 +268,16 @@
},
{
"name": "symfony/console",
- "version": "v5.4.15",
+ "version": "v5.4.17",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669"
+ "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/ea59bb0edfaf9f28d18d8791410ee0355f317669",
- "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669",
+ "url": "https://api.github.com/repos/symfony/console/zipball/58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f",
+ "reference": "58422fdcb0e715ed05b385f70d3e8b5ed4bbd45f",
"shasum": ""
},
"require": {
@@ -347,7 +347,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.4.15"
+ "source": "https://github.com/symfony/console/tree/v5.4.17"
},
"funding": [
{
@@ -363,7 +363,7 @@
"type": "tidelift"
}
],
- "time": "2022-10-26T21:41:52+00:00"
+ "time": "2022-12-28T14:15:31+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -434,16 +434,16 @@
},
{
"name": "symfony/finder",
- "version": "v5.4.11",
+ "version": "v5.4.17",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c"
+ "reference": "40c08632019838dfb3350f18cf5563b8080055fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c",
- "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/40c08632019838dfb3350f18cf5563b8080055fc",
+ "reference": "40c08632019838dfb3350f18cf5563b8080055fc",
"shasum": ""
},
"require": {
@@ -477,7 +477,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v5.4.11"
+ "source": "https://github.com/symfony/finder/tree/v5.4.17"
},
"funding": [
{
@@ -493,20 +493,20 @@
"type": "tidelift"
}
],
- "time": "2022-07-29T07:37:50+00:00"
+ "time": "2022-12-22T10:31:03+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
@@ -521,7 +521,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -559,7 +559,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
},
"funding": [
{
@@ -575,20 +575,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "433d05519ce6990bf3530fba6957499d327395c2"
+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2",
- "reference": "433d05519ce6990bf3530fba6957499d327395c2",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
"shasum": ""
},
"require": {
@@ -600,7 +600,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -640,7 +640,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0"
},
"funding": [
{
@@ -656,20 +656,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "219aa369ceff116e673852dce47c3a41794c14bd"
+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd",
- "reference": "219aa369ceff116e673852dce47c3a41794c14bd",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
"shasum": ""
},
"require": {
@@ -681,7 +681,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -724,7 +724,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0"
},
"funding": [
{
@@ -740,20 +740,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
"shasum": ""
},
"require": {
@@ -768,7 +768,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -807,7 +807,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
},
"funding": [
{
@@ -823,20 +823,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
+ "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
- "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
"shasum": ""
},
"require": {
@@ -845,7 +845,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -886,7 +886,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0"
},
"funding": [
{
@@ -902,20 +902,20 @@
"type": "tidelift"
}
],
- "time": "2022-05-24T11:49:31+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.26.0",
+ "version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
- "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
@@ -924,7 +924,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.26-dev"
+ "dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -969,7 +969,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{
@@ -985,7 +985,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-10T07:21:04+00:00"
+ "time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/service-contracts",
@@ -1072,16 +1072,16 @@
},
{
"name": "symfony/string",
- "version": "v5.4.15",
+ "version": "v5.4.17",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed"
+ "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed",
- "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed",
+ "url": "https://api.github.com/repos/symfony/string/zipball/55733a8664b8853b003e70251c58bc8cb2d82a6b",
+ "reference": "55733a8664b8853b003e70251c58bc8cb2d82a6b",
"shasum": ""
},
"require": {
@@ -1138,7 +1138,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v5.4.15"
+ "source": "https://github.com/symfony/string/tree/v5.4.17"
},
"funding": [
{
@@ -1154,7 +1154,7 @@
"type": "tidelift"
}
],
- "time": "2022-10-05T15:16:54+00:00"
+ "time": "2022-12-12T15:54:21+00:00"
}
],
"aliases": [],
diff --git a/plugins/woocommerce/bin/composer/wp/composer.lock b/plugins/woocommerce/bin/composer/wp/composer.lock
index 7ef28cb0bfd..d97875d11d1 100644
--- a/plugins/woocommerce/bin/composer/wp/composer.lock
+++ b/plugins/woocommerce/bin/composer/wp/composer.lock
@@ -67,16 +67,16 @@
},
{
"name": "gettext/gettext",
- "version": "v4.8.7",
+ "version": "v4.8.8",
"source": {
"type": "git",
"url": "https://github.com/php-gettext/Gettext.git",
- "reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0"
+ "reference": "302a00aa9d6762c92c884d879c15d3ed05d6a37d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/3f7bc5ef23302a9059e64934f3d59e454516bec0",
- "reference": "3f7bc5ef23302a9059e64934f3d59e454516bec0",
+ "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/302a00aa9d6762c92c884d879c15d3ed05d6a37d",
+ "reference": "302a00aa9d6762c92c884d879c15d3ed05d6a37d",
"shasum": ""
},
"require": {
@@ -128,7 +128,7 @@
"support": {
"email": "oom@oscarotero.com",
"issues": "https://github.com/oscarotero/Gettext/issues",
- "source": "https://github.com/php-gettext/Gettext/tree/v4.8.7"
+ "source": "https://github.com/php-gettext/Gettext/tree/v4.8.8"
},
"funding": [
{
@@ -144,7 +144,7 @@
"type": "patreon"
}
],
- "time": "2022-08-02T09:42:10+00:00"
+ "time": "2022-12-08T11:59:50+00:00"
},
{
"name": "gettext/languages",
@@ -434,16 +434,16 @@
},
{
"name": "wp-cli/i18n-command",
- "version": "v2.4.0",
+ "version": "v2.4.1",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/i18n-command.git",
- "reference": "45bc2b47a4ed103b871cd2ec5b483ab55ad12d99"
+ "reference": "22f7e6aa6ba23d0b50c45c75386c8151b991477e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/45bc2b47a4ed103b871cd2ec5b483ab55ad12d99",
- "reference": "45bc2b47a4ed103b871cd2ec5b483ab55ad12d99",
+ "url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/22f7e6aa6ba23d0b50c45c75386c8151b991477e",
+ "reference": "22f7e6aa6ba23d0b50c45c75386c8151b991477e",
"shasum": ""
},
"require": {
@@ -496,9 +496,9 @@
"homepage": "https://github.com/wp-cli/i18n-command",
"support": {
"issues": "https://github.com/wp-cli/i18n-command/issues",
- "source": "https://github.com/wp-cli/i18n-command/tree/v2.4.0"
+ "source": "https://github.com/wp-cli/i18n-command/tree/v2.4.1"
},
- "time": "2022-07-04T21:43:20+00:00"
+ "time": "2022-12-09T19:09:17+00:00"
},
{
"name": "wp-cli/mustangostang-spyc",
diff --git a/plugins/woocommerce/changelog/update-changelogger b/plugins/woocommerce/changelog/update-changelogger
new file mode 100644
index 00000000000..29fcd182779
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-changelogger
@@ -0,0 +1,5 @@
+Significance: patch
+Type: dev
+Comment: Updating a dev dependency, shipped package should not be affected.
+
+
diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json
index d5daec6c988..a5c66e2a55f 100644
--- a/plugins/woocommerce/composer.json
+++ b/plugins/woocommerce/composer.json
@@ -27,7 +27,7 @@
"bamarni/composer-bin-plugin": "^1.4",
"yoast/phpunit-polyfills": "^1.0",
"phpunit/phpunit": "7.5.20",
- "automattic/jetpack-changelogger": "3.1.3",
+ "automattic/jetpack-changelogger": "^3.3.0",
"sebastian/comparator": "3.0.3"
},
"config": {
diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock
index 635c758280d..489d1160c49 100644
--- a/plugins/woocommerce/composer.lock
+++ b/plugins/woocommerce/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "7b14c7f0f38737384718c9a013402d48",
+ "content-hash": "e07f604ec32eb59e76bf37b0126d4533",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@@ -691,27 +691,27 @@
"packages-dev": [
{
"name": "automattic/jetpack-changelogger",
- "version": "v3.1.3",
+ "version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/jetpack-changelogger.git",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0"
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
- "reference": "cdd256d8ba6369f82d9377de7e9e2598e3e16ae0",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
"shasum": ""
},
"require": {
"php": ">=5.6",
- "symfony/console": "^3.4 || ^5.2",
- "symfony/process": "^3.4 || ^5.2",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
"wikimedia/at-ease": "^1.2 || ^2.0"
},
"require-dev": {
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
- "yoast/phpunit-polyfills": "1.0.3"
+ "yoast/phpunit-polyfills": "1.0.4"
},
"bin": [
"bin/changelogger"
@@ -720,7 +720,7 @@
"extra": {
"autotagger": true,
"branch-alias": {
- "dev-trunk": "3.1.x-dev"
+ "dev-trunk": "3.3.x-dev"
},
"mirror-repo": "Automattic/jetpack-changelogger",
"version-constants": {
@@ -742,9 +742,9 @@
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
- "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.1.3"
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
},
- "time": "2022-06-21T07:31:56+00:00"
+ "time": "2022-12-26T13:49:01+00:00"
},
{
"name": "bamarni/composer-bin-plugin",
From cb8c6f8b2461799c3b71ceec41230feeb58f0955 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Thu, 5 Jan 2023 14:57:33 +0530
Subject: [PATCH 41/98] Remove duplicated statement.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
---
.../src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
index 581a7f52755..ec3e4075f78 100644
--- a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
+++ b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
@@ -1360,7 +1360,6 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
$order_2 = new WC_Order();
$this->switch_data_store( $order_2, $this->sut );
- $this->disable_cot_sync();
$order_2->save();
$query = new OrdersTableQuery(
From 4c236bdc37a8a8be81efe988f48a240041a86379 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Thu, 5 Jan 2023 23:56:08 +0530
Subject: [PATCH 42/98] Use more generic selectors for HPOS<>Posts
compatibility (#36284)
* Use more generic search selector for edit screen.
* Use more generic heading text for post<>HPOS compat.
---
plugins/woocommerce/changelog/e2e-modify-search-selector | 5 +++++
.../tests/e2e-pw/tests/merchant/order-edit.spec.js | 4 ++--
.../tests/e2e-pw/tests/merchant/order-search.spec.js | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
create mode 100644 plugins/woocommerce/changelog/e2e-modify-search-selector
diff --git a/plugins/woocommerce/changelog/e2e-modify-search-selector b/plugins/woocommerce/changelog/e2e-modify-search-selector
new file mode 100644
index 00000000000..3e918d4a174
--- /dev/null
+++ b/plugins/woocommerce/changelog/e2e-modify-search-selector
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Minor change in E2E selectory.
+
+
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js
index 862c0277575..7cd8c268535 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js
+++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-edit.spec.js
@@ -46,8 +46,8 @@ test.describe( 'Edit order', () => {
await page.goto( `wp-admin/post.php?post=${ orderId }&action=edit` );
// make sure we're on the order details page
- await expect( page.locator( 'h1.components-text' ) ).toContainText(
- 'Edit Order'
+ await expect( page.locator( 'h1.wp-heading-inline' ) ).toContainText(
+ /Edit [oO]rder/
);
} );
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-search.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-search.spec.js
index bb3f7cbb051..a5d9762c4f3 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-search.spec.js
+++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-search.spec.js
@@ -140,7 +140,7 @@ test.describe( 'WooCommerce Orders > Search orders', () => {
test( 'can search for order by order id', async ( { page } ) => {
await page.goto( 'wp-admin/edit.php?post_type=shop_order' );
- await page.fill( '#post-search-input', orderId.toString() );
+ await page.fill( '[type=search][name=s]', orderId.toString() );
await page.click( '#search-submit' );
await expect(
@@ -153,7 +153,7 @@ test.describe( 'WooCommerce Orders > Search orders', () => {
page,
} ) => {
await page.goto( 'wp-admin/edit.php?post_type=shop_order' );
- await page.fill( '#post-search-input', queries[ i ][ 0 ] );
+ await page.fill( '[type=search][name=s]', queries[ i ][ 0 ] );
await page.click( '#search-submit' );
await expect(
From 45d157a25e88681ad7a9324fbb2495add4f4b9dc Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Fri, 6 Jan 2023 10:51:58 +1300
Subject: [PATCH 43/98] Introduce clean command that should help with
node_modules corruption and avoid fresh clone (#36302)
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 56b3481ca33..1e35a659206 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"scripts": {
"build": "pnpm exec turbo run turbo:build",
"test": "pnpm exec turbo run turbo:test",
+ "clean": "pnpm store prune && git clean -fx **/node_modules && pnpm i",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm git:update-hooks",
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && husky install",
From 04089f37e69921a60156ed7d0a50c3a28b85443d Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Thu, 5 Jan 2023 18:30:23 -0800
Subject: [PATCH 44/98] Add product variation flag to hide WIP (#36311)
* Add product variations feature flag
* Add changelog entry
---
.../woocommerce-admin/client/layout/controller.js | 2 ++
.../client/products/edit-product-page.tsx | 14 ++++++++------
.../client/products/product-form.tsx | 12 ++++++++----
.../products/utils/get-derived-product-type.ts | 4 ++++
.../woocommerce-admin/client/typings/global.d.ts | 1 +
plugins/woocommerce/changelog/add-36276 | 4 ++++
plugins/woocommerce/client/admin/config/core.json | 1 +
.../client/admin/config/development.json | 1 +
8 files changed, 29 insertions(+), 10 deletions(-)
create mode 100644 plugins/woocommerce/changelog/add-36276
diff --git a/plugins/woocommerce-admin/client/layout/controller.js b/plugins/woocommerce-admin/client/layout/controller.js
index 4612662e02d..52f346a745b 100644
--- a/plugins/woocommerce-admin/client/layout/controller.js
+++ b/plugins/woocommerce-admin/client/layout/controller.js
@@ -199,7 +199,9 @@ export const getPages = () => {
wpOpenMenu: 'menu-posts-product',
capability: 'manage_woocommerce',
} );
+ }
+ if ( window.wcAdminFeatures[ 'product-variation-management' ] ) {
pages.push( {
container: EditProductPage,
path: '/product/:productId/variation/:variationId',
diff --git a/plugins/woocommerce-admin/client/products/edit-product-page.tsx b/plugins/woocommerce-admin/client/products/edit-product-page.tsx
index b1104679c46..6606da226db 100644
--- a/plugins/woocommerce-admin/client/products/edit-product-page.tsx
+++ b/plugins/woocommerce-admin/client/products/edit-product-page.tsx
@@ -130,12 +130,14 @@ const EditProductPage: React.FC = () => {
) }
- { productVariation && product && (
-
- ) }
+ { window.wcAdminFeatures[ 'product-variation-management' ] &&
+ productVariation &&
+ product && (
+
+ ) }
{ ! isProductVariation &&
product &&
( product.status !== 'trash' || wasDeletedUsingAction ) && (
diff --git a/plugins/woocommerce-admin/client/products/product-form.tsx b/plugins/woocommerce-admin/client/products/product-form.tsx
index 9b188078404..3605912595a 100644
--- a/plugins/woocommerce-admin/client/products/product-form.tsx
+++ b/plugins/woocommerce-admin/client/products/product-form.tsx
@@ -69,10 +69,14 @@ export const ProductForm: React.FC< {
>
-
-
-
-
+ { window.wcAdminFeatures[ 'product-variation-management' ] ? (
+
+
+
+
+ ) : (
+ <>>
+ ) }
diff --git a/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
index 60ffbd6e73c..d2904d1c481 100644
--- a/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
+++ b/plugins/woocommerce-admin/client/products/utils/get-derived-product-type.ts
@@ -4,6 +4,10 @@
import { Product } from '@woocommerce/data';
export const getDerivedProductType = ( product: Partial< Product > ) => {
+ if ( ! window.wcAdminFeatures[ 'product-variation-management' ] ) {
+ return 'simple';
+ }
+
const hasOptions = !! product.attributes?.find(
( attribute ) => attribute.options.length && attribute.variation
);
diff --git a/plugins/woocommerce-admin/client/typings/global.d.ts b/plugins/woocommerce-admin/client/typings/global.d.ts
index 9c7567f6942..64b53b08048 100644
--- a/plugins/woocommerce-admin/client/typings/global.d.ts
+++ b/plugins/woocommerce-admin/client/typings/global.d.ts
@@ -20,6 +20,7 @@ declare global {
onboarding: boolean;
'onboarding-tasks': boolean;
'payment-gateway-suggestions': boolean;
+ 'product-variation-management': boolean;
'remote-inbox-notifications': boolean;
'remote-free-extensions': boolean;
settings: boolean;
diff --git a/plugins/woocommerce/changelog/add-36276 b/plugins/woocommerce/changelog/add-36276
new file mode 100644
index 00000000000..ae891523bdb
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36276
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add product variations flag to only show work in development
diff --git a/plugins/woocommerce/client/admin/config/core.json b/plugins/woocommerce/client/admin/config/core.json
index 840cb77cc79..f798a3ab4a9 100644
--- a/plugins/woocommerce/client/admin/config/core.json
+++ b/plugins/woocommerce/client/admin/config/core.json
@@ -17,6 +17,7 @@
"new-product-management-experience": false,
"onboarding": true,
"onboarding-tasks": true,
+ "product-variation-management": false,
"remote-inbox-notifications": true,
"remote-free-extensions": true,
"payment-gateway-suggestions": true,
diff --git a/plugins/woocommerce/client/admin/config/development.json b/plugins/woocommerce/client/admin/config/development.json
index f2110a7c86b..3f717d83e0d 100644
--- a/plugins/woocommerce/client/admin/config/development.json
+++ b/plugins/woocommerce/client/admin/config/development.json
@@ -18,6 +18,7 @@
"onboarding": true,
"onboarding-tasks": true,
"payment-gateway-suggestions": true,
+ "product-variation-management": true,
"remote-inbox-notifications": true,
"remote-free-extensions": true,
"settings": false,
From 8b905b92c0a8db96f5525d91508b37713fd60df8 Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Thu, 5 Jan 2023 18:30:36 -0800
Subject: [PATCH 45/98] Allow product tab navigation without prompting for
unsaved changes (#36235)
* Add callback to confirm whether or not the prevent leaving page prompt should trigger
* Move prevent leaving logic to util and add tests
* Add changelog entry
* Add navigation changelog entry
* Fix WooCommerce data mock
* Revert desctructuring of nav properties
---
packages/js/navigation/changelog/fix-36205 | 4 ++
packages/js/navigation/src/index.js | 2 +-
.../client/hooks/usePreventLeavingPage.ts | 18 +++++-
.../client/products/product-form-actions.tsx | 4 +-
.../product-variation-form-actions.tsx | 3 +-
.../test/product-form-actions.spec.tsx | 4 +-
.../utils/prevent-leaving-product-form.ts | 15 +++++
.../test/prevent-leaving-product-form.test.ts | 55 +++++++++++++++++++
plugins/woocommerce/changelog/fix-36205 | 4 ++
9 files changed, 103 insertions(+), 6 deletions(-)
create mode 100644 packages/js/navigation/changelog/fix-36205
create mode 100644 plugins/woocommerce-admin/client/products/utils/prevent-leaving-product-form.ts
create mode 100644 plugins/woocommerce-admin/client/products/utils/test/prevent-leaving-product-form.test.ts
create mode 100644 plugins/woocommerce/changelog/fix-36205
diff --git a/packages/js/navigation/changelog/fix-36205 b/packages/js/navigation/changelog/fix-36205
new file mode 100644
index 00000000000..5d6d183650d
--- /dev/null
+++ b/packages/js/navigation/changelog/fix-36205
@@ -0,0 +1,4 @@
+Significance: minor
+Type: dev
+
+Fix return value on parseAdminUrl
diff --git a/packages/js/navigation/src/index.js b/packages/js/navigation/src/index.js
index 608eecf30a5..48f3adf998c 100644
--- a/packages/js/navigation/src/index.js
+++ b/packages/js/navigation/src/index.js
@@ -314,7 +314,7 @@ export const isWCAdmin = ( url = window.location.href ) => {
* Returns a parsed object for an absolute or relative admin URL.
*
* @param {*} url - the url to test.
- * @return {Object} - the URL object of the given url.
+ * @return {URL} - the URL object of the given url.
*/
export const parseAdminUrl = ( url ) => {
if ( url.startsWith( 'http' ) ) {
diff --git a/plugins/woocommerce-admin/client/hooks/usePreventLeavingPage.ts b/plugins/woocommerce-admin/client/hooks/usePreventLeavingPage.ts
index 2a7d938eec8..fe8cad7f193 100644
--- a/plugins/woocommerce-admin/client/hooks/usePreventLeavingPage.ts
+++ b/plugins/woocommerce-admin/client/hooks/usePreventLeavingPage.ts
@@ -3,10 +3,16 @@
*/
import { useContext, useEffect, useMemo } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
-import { UNSAFE_NavigationContext as NavigationContext } from 'react-router-dom';
+import { parseAdminUrl } from '@woocommerce/navigation';
+import {
+ Location,
+ UNSAFE_NavigationContext as NavigationContext,
+ useLocation,
+} from 'react-router-dom';
export default function usePreventLeavingPage(
hasUnsavedChanges: boolean,
+ shouldConfirm?: ( path: URL, fromUrl: Location ) => boolean,
/**
* Some browsers ignore this message currently on before unload event.
*
@@ -21,6 +27,7 @@ export default function usePreventLeavingPage(
[ message ]
);
const { navigator } = useContext( NavigationContext );
+ const fromUrl = useLocation();
// This effect prevent react router from navigate and show
// a confirmation message. It's a work around to beforeunload
@@ -30,6 +37,15 @@ export default function usePreventLeavingPage(
const push = navigator.push;
navigator.push = ( ...args: Parameters< typeof push > ) => {
+ const toUrl = parseAdminUrl( args[ 0 ] ) as URL;
+ if (
+ typeof shouldConfirm === 'function' &&
+ ! shouldConfirm( toUrl, fromUrl )
+ ) {
+ push( ...args );
+ return;
+ }
+
/* eslint-disable-next-line no-alert */
const result = window.confirm( confirmMessage );
if ( result !== false ) {
diff --git a/plugins/woocommerce-admin/client/products/product-form-actions.tsx b/plugins/woocommerce-admin/client/products/product-form-actions.tsx
index 47c7f4c63c6..63274767afb 100644
--- a/plugins/woocommerce-admin/client/products/product-form-actions.tsx
+++ b/plugins/woocommerce-admin/client/products/product-form-actions.tsx
@@ -24,6 +24,7 @@ import { store } from '@wordpress/viewport';
/**
* Internal dependencies
*/
+import { preventLeavingProductForm } from './utils/prevent-leaving-product-form';
import usePreventLeavingPage from '~/hooks/usePreventLeavingPage';
import { WooHeaderItem } from '~/header/utils';
import { useProductHelper } from './use-product-helper';
@@ -47,7 +48,8 @@ export const ProductFormActions: React.FC = () => {
const { isDirty, isValidForm, values, resetForm } =
useFormContext< Product >();
- usePreventLeavingPage( isDirty );
+ usePreventLeavingPage( isDirty, preventLeavingProductForm );
+
useCustomerEffortScoreExitPageTracker(
! values.id ? 'new_product' : 'editing_new_product',
isDirty
diff --git a/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx b/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
index 30f462d0688..8b2108ad36d 100644
--- a/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
+++ b/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
@@ -16,6 +16,7 @@ import { useState } from '@wordpress/element';
/**
* Internal dependencies
*/
+import { preventLeavingProductForm } from './utils/prevent-leaving-product-form';
import usePreventLeavingPage from '~/hooks/usePreventLeavingPage';
import { WooHeaderItem } from '~/header/utils';
import './product-form-actions.scss';
@@ -30,7 +31,7 @@ export const ProductVariationFormActions: React.FC = () => {
const { createNotice } = useDispatch( 'core/notices' );
const [ isSaving, setIsSaving ] = useState( false );
- usePreventLeavingPage( isDirty );
+ usePreventLeavingPage( isDirty, preventLeavingProductForm );
const onSave = async () => {
setIsSaving( true );
diff --git a/plugins/woocommerce-admin/client/products/test/product-form-actions.spec.tsx b/plugins/woocommerce-admin/client/products/test/product-form-actions.spec.tsx
index a72db8cf7b9..d82331a4d97 100644
--- a/plugins/woocommerce-admin/client/products/test/product-form-actions.spec.tsx
+++ b/plugins/woocommerce-admin/client/products/test/product-form-actions.spec.tsx
@@ -25,8 +25,8 @@ const onDraftCES = jest.fn().mockResolvedValue( {} );
jest.mock( '@wordpress/plugins', () => ( { registerPlugin: jest.fn() } ) );
-jest.mock( '@wordpress/data', () => ( {
- ...jest.requireActual( '@wordpress/data' ),
+jest.mock( '@woocommerce/data', () => ( {
+ ...jest.requireActual( '@woocommerce/data' ),
useDispatch: jest.fn().mockReturnValue( { updateOptions: jest.fn() } ),
useSelect: jest.fn().mockReturnValue( { productCESAction: 'hide' } ),
} ) );
diff --git a/plugins/woocommerce-admin/client/products/utils/prevent-leaving-product-form.ts b/plugins/woocommerce-admin/client/products/utils/prevent-leaving-product-form.ts
new file mode 100644
index 00000000000..9ede512a7c8
--- /dev/null
+++ b/plugins/woocommerce-admin/client/products/utils/prevent-leaving-product-form.ts
@@ -0,0 +1,15 @@
+/**
+ * External dependencies
+ */
+import { Location } from 'react-router-dom';
+
+/**
+ * Allow switching between tabs without prompting for unsaved changes.
+ */
+export const preventLeavingProductForm = ( toUrl: URL, fromUrl: Location ) => {
+ const toParams = new URLSearchParams( toUrl.search );
+ const fromParams = new URLSearchParams( fromUrl.search );
+ toParams.delete( 'tab' );
+ fromParams.delete( 'tab' );
+ return toParams.toString() !== fromParams.toString();
+};
diff --git a/plugins/woocommerce-admin/client/products/utils/test/prevent-leaving-product-form.test.ts b/plugins/woocommerce-admin/client/products/utils/test/prevent-leaving-product-form.test.ts
new file mode 100644
index 00000000000..90612268ae8
--- /dev/null
+++ b/plugins/woocommerce-admin/client/products/utils/test/prevent-leaving-product-form.test.ts
@@ -0,0 +1,55 @@
+/**
+ * External dependencies
+ */
+import { Location } from 'react-router-dom';
+
+/**
+ * Internal dependencies
+ */
+import { preventLeavingProductForm } from '../prevent-leaving-product-form';
+
+describe( 'preventLeavingProductForm', () => {
+ it( 'should allow leaving when the paths are identical', () => {
+ const toUrl = new URL(
+ 'http://mysite.com/admin.php?page=wc-admin&path=/product/123&tab=general'
+ );
+ const fromUrl = {
+ search: 'admin.php?page=wc-admin&path=/product/123&tab=general',
+ } as Location;
+ const shouldPrevent = preventLeavingProductForm( toUrl, fromUrl );
+ expect( shouldPrevent ).toBe( true );
+ } );
+
+ it( 'should prevent leaving when the paths are different', () => {
+ const toUrl = new URL(
+ 'http://mysite.com/admin.php?page=wc-admin&path=/product/456&tab=general'
+ );
+ const fromUrl = {
+ search: 'admin.php?page=wc-admin&path=/product/123&tab=general',
+ } as Location;
+ const shouldPrevent = preventLeavingProductForm( toUrl, fromUrl );
+ expect( shouldPrevent ).toBe( true );
+ } );
+
+ it( 'should allow leaving when the paths are the same but the tab is different', () => {
+ const toUrl = new URL(
+ 'http://mysite.com/admin.php?page=wc-admin&path=/product/123&tab=general'
+ );
+ const fromUrl = {
+ search: 'admin.php?page=wc-admin&path=/product/123&tab=shipping',
+ } as Location;
+ const shouldPrevent = preventLeavingProductForm( toUrl, fromUrl );
+ expect( shouldPrevent ).toBe( true );
+ } );
+
+ it( 'should prevent leaving when non-tab params are different', () => {
+ const toUrl = new URL(
+ 'http://mysite.com/admin.php?page=wc-admin&path=/product/123&tab=general&other_param=a'
+ );
+ const fromUrl = {
+ search: 'admin.php?page=wc-admin&path=/product/123&tab=shipping&other_param=b',
+ } as Location;
+ const shouldPrevent = preventLeavingProductForm( toUrl, fromUrl );
+ expect( shouldPrevent ).toBe( true );
+ } );
+} );
diff --git a/plugins/woocommerce/changelog/fix-36205 b/plugins/woocommerce/changelog/fix-36205
new file mode 100644
index 00000000000..f44729496ac
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36205
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Allow product tab navigation without prompting for unsaved changes
From 2d4f62be7ae3492168105687e18ec304d88b9509 Mon Sep 17 00:00:00 2001
From: Chi-Hsuan Huang
Date: Fri, 6 Jan 2023 10:48:03 +0800
Subject: [PATCH 46/98] Migrate Tag component to TS (#36265)
* Migrate Tag components's tests and stories to TS
* Migrate tag component to TS
* Add changelog
* Fix prop types
* Remove jsdoc, proptype and add inline ts comments
* Remove unused import
---
.../changelog/dev-migrate-tag-component-to-ts | 4 ++
.../src/tag/{index.js => index.tsx} | 61 +++++++------------
.../js/components/src/tag/stories/index.js | 20 ------
.../js/components/src/tag/stories/index.tsx | 31 ++++++++++
.../{index.js.snap => index.tsx.snap} | 0
.../src/tag/test/{index.js => index.tsx} | 21 +++----
6 files changed, 65 insertions(+), 72 deletions(-)
create mode 100644 packages/js/components/changelog/dev-migrate-tag-component-to-ts
rename packages/js/components/src/tag/{index.js => index.tsx} (62%)
delete mode 100644 packages/js/components/src/tag/stories/index.js
create mode 100644 packages/js/components/src/tag/stories/index.tsx
rename packages/js/components/src/tag/test/__snapshots__/{index.js.snap => index.tsx.snap} (100%)
rename packages/js/components/src/tag/test/{index.js => index.tsx} (80%)
diff --git a/packages/js/components/changelog/dev-migrate-tag-component-to-ts b/packages/js/components/changelog/dev-migrate-tag-component-to-ts
new file mode 100644
index 00000000000..e8c0ed291c6
--- /dev/null
+++ b/packages/js/components/changelog/dev-migrate-tag-component-to-ts
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Migrate Tag component to TS
diff --git a/packages/js/components/src/tag/index.js b/packages/js/components/src/tag/index.tsx
similarity index 62%
rename from packages/js/components/src/tag/index.js
rename to packages/js/components/src/tag/index.tsx
index acdc897dfaf..2da5a6f7aef 100644
--- a/packages/js/components/src/tag/index.js
+++ b/packages/js/components/src/tag/index.tsx
@@ -7,24 +7,28 @@ import classnames from 'classnames';
import { Button, Popover } from '@wordpress/components';
import { Icon, closeSmall } from '@wordpress/icons';
import { decodeEntities } from '@wordpress/html-entities';
-import PropTypes from 'prop-types';
import { withInstanceId } from '@wordpress/compose';
-/**
- * This component can be used to show an item styled as a "tag", optionally with an `X` + "remove"
- * or with a popover that is shown on click.
- *
- * @param {Object} props
- * @param {number|string} props.id
- * @param {string} props.instanceId
- * @param {string} props.label
- * @param {Object} props.popoverContents
- * @param {Function} props.remove
- * @param {string} props.screenReaderLabel
- * @param {string} props.className
- * @return {Object} -
- */
-const Tag = ( {
+type Props = {
+ /** A unique ID for this instance of the component. This is automatically generated by withInstanceId. */
+ instanceId: number | string;
+ /** The name for this item, displayed as the tag's text. */
+ label: string;
+ /** A unique ID for this item. This is used to identify the item when the remove button is clicked. */
+ id?: number | string;
+ /** Contents to display on click in a popover */
+ popoverContents?: React.ReactNode;
+ /** A function called when the remove X is clicked. If not used, no X icon will display.*/
+ remove?: (
+ id: number | string | undefined
+ ) => React.MouseEventHandler< HTMLButtonElement >;
+ /** A more descriptive label for screen reader users. Defaults to the `name` prop. */
+ screenReaderLabel?: string;
+ /** Additional CSS classes. */
+ className?: string;
+};
+
+const Tag: React.VFC< Props > = ( {
id,
instanceId,
label,
@@ -77,6 +81,7 @@ const Tag = ( {
@@ -91,28 +96,4 @@ const Tag = ( {
);
};
-Tag.propTypes = {
- /**
- * The ID for this item, used in the remove function.
- */
- id: PropTypes.oneOfType( [ PropTypes.number, PropTypes.string ] ),
-
- /**
- * The name for this item, displayed as the tag's text.
- */
- label: PropTypes.string.isRequired,
- /**
- * Contents to display on click in a popover
- */
- popoverContents: PropTypes.node,
- /**
- * A function called when the remove X is clicked. If not used, no X icon will display.
- */
- remove: PropTypes.func,
- /**
- * A more descriptive label for screen reader users. Defaults to the `name` prop.
- */
- screenReaderLabel: PropTypes.string,
-};
-
export default withInstanceId( Tag );
diff --git a/packages/js/components/src/tag/stories/index.js b/packages/js/components/src/tag/stories/index.js
deleted file mode 100644
index a4a864c24bc..00000000000
--- a/packages/js/components/src/tag/stories/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * External dependencies
- */
-import { Tag } from '@woocommerce/components';
-
-export const Basic = () => (
- <>
-
- {} } />
- This is a popover
}
- />
- >
-);
-
-export default {
- title: 'WooCommerce Admin/components/Tag',
- component: Tag,
-};
diff --git a/packages/js/components/src/tag/stories/index.tsx b/packages/js/components/src/tag/stories/index.tsx
new file mode 100644
index 00000000000..25c3b1a993b
--- /dev/null
+++ b/packages/js/components/src/tag/stories/index.tsx
@@ -0,0 +1,31 @@
+/**
+ * External dependencies
+ */
+import React from 'react';
+import { createElement } from '@wordpress/element';
+
+/**
+ * Internal dependencies
+ */
+import Tag from '../';
+
+export const Basic = () => (
+ <>
+
+ () => window.alert( `Remove ID ${ id }` ) }
+ />
+ This is a popover }
+ />
+ >
+);
+
+export default {
+ title: 'WooCommerce Admin/components/Tag',
+ component: Tag,
+};
diff --git a/packages/js/components/src/tag/test/__snapshots__/index.js.snap b/packages/js/components/src/tag/test/__snapshots__/index.tsx.snap
similarity index 100%
rename from packages/js/components/src/tag/test/__snapshots__/index.js.snap
rename to packages/js/components/src/tag/test/__snapshots__/index.tsx.snap
diff --git a/packages/js/components/src/tag/test/index.js b/packages/js/components/src/tag/test/index.tsx
similarity index 80%
rename from packages/js/components/src/tag/test/index.js
rename to packages/js/components/src/tag/test/index.tsx
index a5151513997..ff6f3ae6223 100644
--- a/packages/js/components/src/tag/test/index.js
+++ b/packages/js/components/src/tag/test/index.tsx
@@ -1,15 +1,15 @@
/**
* External dependencies
*/
-import { render, fireEvent } from '@testing-library/react';
+import { render, fireEvent, screen } from '@testing-library/react';
import { createElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import Tag from '../';
+import Tag from '..';
-const noop = () => {};
+const noop = () => () => {};
describe( 'Tag', () => {
test( ' should render a tag with the label foo', () => {
@@ -44,17 +44,14 @@ describe( 'Tag', () => {
} );
test( 'Show popoverContents after clicking the button', () => {
- const { queryByText, queryByRole } = render(
- This is a popover }
- />
+ const { queryByText } = render(
+ This is a popover } />
);
- fireEvent.click(
- queryByRole( 'button', { id: 'woocommerce-tag__label-1' } )
- );
+ const button = screen.getByRole( 'button', {
+ name: 'foo',
+ } );
+ fireEvent.click( button );
expect( queryByText( 'This is a popover' ) ).toBeDefined();
} );
} );
From 230e79fbdf3fb16424dd8f297c7b6fb16e2bc9ec Mon Sep 17 00:00:00 2001
From: Fernando Marichal
Date: Fri, 6 Jan 2023 08:53:03 -0300
Subject: [PATCH 47/98] Fix reordering items logic in attributes/options lists
(#36296)
* Fix reordering list items bug
* Add tests
* Remove orphan comment
* Add changelog
* Rename const
* Update plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
Co-authored-by: Joshua T Flowers
* Rename `objectKey` to `attributeKey`
Co-authored-by: Fernando Marichal
Co-authored-by: Joshua T Flowers
---
.../attribute-field/attribute-field.tsx | 14 +++++--
.../fields/attribute-field/test/utils.spec.ts | 40 +++++++++----------
.../products/fields/attribute-field/utils.ts | 27 +++++++------
.../products/hooks/use-variations-order.ts | 4 --
.../changelog/fix-36255_reordering_list_items | 4 ++
5 files changed, 48 insertions(+), 41 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36255_reordering_list_items
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
index 88a97d01cd3..7c867af4a0d 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/attribute-field.tsx
@@ -245,7 +245,7 @@ export const AttributeField: React.FC< AttributeFieldProps > = ( {
const sortedAttributes = filteredAttributes.sort(
( a, b ) => a.position - b.position
);
- const attributeKeyValues = filteredAttributes.reduce(
+ const attributeKeyValues = value.reduce(
(
keyValue: Record< number | string, ProductAttribute >,
attribute: ProductAttribute
@@ -253,7 +253,7 @@ export const AttributeField: React.FC< AttributeFieldProps > = ( {
keyValue[ getAttributeKey( attribute ) ] = attribute;
return keyValue;
},
- {} as Record< number, ProductAttribute >
+ {} as Record< number | string, ProductAttribute >
);
const attribute = hydratedAttributes.find(
@@ -274,9 +274,17 @@ export const AttributeField: React.FC< AttributeFieldProps > = ( {
{
+ const itemPositions = items.reduce(
+ ( positions, { props }, index ) => {
+ positions[ getAttributeKey( props.attribute ) ] =
+ index;
+ return positions;
+ },
+ {} as Record< number | string, number >
+ );
onChange(
reorderSortableProductAttributePositions(
- items,
+ itemPositions,
attributeKeyValues
)
);
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
index 0c3812eafda..3a4d3628e67 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/test/utils.spec.ts
@@ -11,7 +11,7 @@ import {
reorderSortableProductAttributePositions,
} from '../utils';
-const attributeList: Record< number, ProductAttribute > = {
+const attributeList: Record< number | string, ProductAttribute > = {
15: {
id: 15,
name: 'Automotive',
@@ -28,10 +28,18 @@ const attributeList: Record< number, ProductAttribute > = {
variation: true,
options: [ 'Beige', 'black', 'Blue' ],
},
+ Quality: {
+ id: 0,
+ name: 'Quality',
+ position: 2,
+ visible: true,
+ variation: false,
+ options: [ 'low', 'high' ],
+ },
3: {
id: 3,
name: 'Random',
- position: 2,
+ position: 3,
visible: true,
variation: true,
options: [ 'Beige', 'black', 'Blue' ],
@@ -40,35 +48,25 @@ const attributeList: Record< number, ProductAttribute > = {
describe( 'reorderSortableProductAttributePositions', () => {
it( 'should update product attribute positions depending on JSX.Element order', () => {
- const elements = [
- { props: { attribute: attributeList[ '3' ] } },
- { props: { attribute: attributeList[ '15' ] } },
- { props: { attribute: attributeList[ '1' ] } },
- ] as JSX.Element[];
+ const elements = { 1: 0, 15: 1, 3: 2, Quality: 3 };
const newList = reorderSortableProductAttributePositions(
elements,
attributeList
);
expect( newList[ 0 ].position ).toEqual( 0 );
- expect( newList[ 0 ].id ).toEqual( 3 );
- expect( newList[ 1 ].position ).toEqual( 1 );
- expect( newList[ 1 ].id ).toEqual( 15 );
- expect( newList[ 2 ].position ).toEqual( 2 );
- expect( newList[ 2 ].id ).toEqual( 1 );
+ expect( newList[ 0 ].id ).toEqual( 1 );
+ expect( newList[ 1 ].position ).toEqual( 2 );
+ expect( newList[ 1 ].id ).toEqual( 3 );
+ expect( newList[ 2 ].position ).toEqual( 1 );
+ expect( newList[ 2 ].id ).toEqual( 15 );
+ expect( newList[ 3 ].position ).toEqual( 3 );
+ expect( newList[ 3 ].id ).toEqual( 0 );
} );
} );
describe( 'getAttributeKey', () => {
- attributeList[ '20' ] = {
- id: 0,
- name: 'Quality',
- position: 3,
- visible: true,
- variation: true,
- options: [ 'low', 'high' ],
- };
it( 'should return the attribute key', () => {
expect( getAttributeKey( attributeList[ '15' ] ) ).toEqual( 15 );
- expect( getAttributeKey( attributeList[ '20' ] ) ).toEqual( 'Quality' );
+ expect( getAttributeKey( attributeList.Quality ) ).toEqual( 'Quality' );
} );
} );
diff --git a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
index 8548e335bf6..a4928fe75f4 100644
--- a/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
+++ b/plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts
@@ -16,27 +16,28 @@ export function getAttributeKey(
}
/**
- * Updates the position of a product attribute from the new items JSX.Element list.
+ * Updates the position of a product attribute from the new items list.
*
- * @param { JSX.Element[] } items list of JSX elements coming back from sortable container.
- * @param { Object } attributeKeyValues key value pair of product attributes.
+ * @param { Object } items key value pair of list items positions.
+ * @param { Object } attributeKeyValues key value pair of product attributes.
*/
export function reorderSortableProductAttributePositions(
- items: JSX.Element[],
+ items: Record< number | string, number >,
attributeKeyValues: Record< number | string, ProductAttribute >
): ProductAttribute[] {
- return items
- .map( ( { props }, index ): ProductAttribute | undefined => {
- const key = getAttributeKey( props?.attribute );
- if ( attributeKeyValues[ key ] ) {
+ return Object.keys( attributeKeyValues ).map(
+ ( attributeKey: number | string ): ProductAttribute => {
+ if ( ! isNaN( items[ attributeKey ] ) ) {
return {
- ...attributeKeyValues[ key ],
- position: index,
+ ...attributeKeyValues[ attributeKey ],
+ position: items[ attributeKey ],
};
}
- return undefined;
- } )
- .filter( ( attr ): attr is ProductAttribute => attr !== undefined );
+ return {
+ ...attributeKeyValues[ attributeKey ],
+ };
+ }
+ );
}
/**
diff --git a/plugins/woocommerce-admin/client/products/hooks/use-variations-order.ts b/plugins/woocommerce-admin/client/products/hooks/use-variations-order.ts
index 99b2ffc4e37..e1747b43b46 100644
--- a/plugins/woocommerce-admin/client/products/hooks/use-variations-order.ts
+++ b/plugins/woocommerce-admin/client/products/hooks/use-variations-order.ts
@@ -4,10 +4,6 @@
import { useFormContext } from '@woocommerce/components';
import type { ProductVariation } from '@woocommerce/data';
-/**
- * Internal dependencies
- */
-
const KEY_SEPARATOR = ':';
function getVariationKey( variation: ProductVariation ) {
diff --git a/plugins/woocommerce/changelog/fix-36255_reordering_list_items b/plugins/woocommerce/changelog/fix-36255_reordering_list_items
new file mode 100644
index 00000000000..556c96c166e
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36255_reordering_list_items
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Fix reordering list items error
From a9005c58f057c762ff4887c4fdc3ed7c34470084 Mon Sep 17 00:00:00 2001
From: Fernando Marichal
Date: Fri, 6 Jan 2023 08:53:33 -0300
Subject: [PATCH 48/98] Fix moving list item also moves image gallery item
(#36262)
* Fix list id
# Conflicts:
# pnpm-lock.yaml
* Add changelog
* Add package changelog
* Remove changelog
* Add `-` between the item `index` and `id`
Co-authored-by: Fernando Marichal
---
.../fix-36256_moving_list_item_moves_image | 4 +
packages/js/components/package.json | 2 +
.../js/components/src/sortable/sortable.tsx | 3 +-
pnpm-lock.yaml | 972 +++++++-----------
4 files changed, 354 insertions(+), 627 deletions(-)
create mode 100644 packages/js/components/changelog/fix-36256_moving_list_item_moves_image
diff --git a/packages/js/components/changelog/fix-36256_moving_list_item_moves_image b/packages/js/components/changelog/fix-36256_moving_list_item_moves_image
new file mode 100644
index 00000000000..2584c971946
--- /dev/null
+++ b/packages/js/components/changelog/fix-36256_moving_list_item_moves_image
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Fix SortableItem duplicated id
diff --git a/packages/js/components/package.json b/packages/js/components/package.json
index 46839c72d33..93dd1d7cb21 100644
--- a/packages/js/components/package.json
+++ b/packages/js/components/package.json
@@ -118,6 +118,7 @@
"@types/prop-types": "^15.7.4",
"@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3",
+ "@types/uuid": "^8.3.0",
"@types/wordpress__components": "^19.10.1",
"@types/wordpress__data": "^6.0.0",
"@types/wordpress__media-utils": "^3.0.0",
@@ -137,6 +138,7 @@
"sass-loader": "^10.2.1",
"ts-jest": "^27.1.3",
"typescript": "^4.8.3",
+ "uuid": "^8.3.0",
"webpack": "^5.70.0",
"webpack-cli": "^3.3.12"
},
diff --git a/packages/js/components/src/sortable/sortable.tsx b/packages/js/components/src/sortable/sortable.tsx
index 66f4e0250da..97ec6c40728 100644
--- a/packages/js/components/src/sortable/sortable.tsx
+++ b/packages/js/components/src/sortable/sortable.tsx
@@ -14,6 +14,7 @@ import {
import { DragEvent, DragEventHandler, KeyboardEvent } from 'react';
import { speak } from '@wordpress/a11y';
import { throttle } from 'lodash';
+import { v4 } from 'uuid';
/**
* Internal dependencies
@@ -265,7 +266,7 @@ export const Sortable = ( {
=6.9.0'}
dependencies:
- '@babel/highlight': 7.16.10
+ '@babel/highlight': 7.18.6
/@babel/code-frame/7.18.6:
resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==}
@@ -2608,14 +2612,6 @@ packages:
dependencies:
'@babel/types': 7.19.3
- /@babel/helper-builder-binary-assignment-operator-visitor/7.16.0:
- resolution: {integrity: sha512-9KuleLT0e77wFUku6TUkqZzCEymBdtuQQ27MhEKzf9UOOJu3cYj98kyaDAzxpC7lV6DGiZFuC8XqDsq8/Kl6aQ==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-explode-assignable-expression': 7.18.6
- '@babel/types': 7.19.3
- dev: true
-
/@babel/helper-builder-binary-assignment-operator-visitor/7.18.9:
resolution: {integrity: sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==}
engines: {node: '>=6.9.0'}
@@ -2632,7 +2628,7 @@ packages:
'@babel/compat-data': 7.19.3
'@babel/core': 7.12.9
'@babel/helper-validator-option': 7.18.6
- browserslist: 4.20.4
+ browserslist: 4.21.4
semver: 6.3.0
dev: true
@@ -2713,23 +2709,6 @@ packages:
browserslist: 4.21.4
semver: 6.3.0
- /@babel/helper-create-class-features-plugin/7.16.0_@babel+core@7.12.9:
- resolution: {integrity: sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/core': 7.12.9
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-function-name': 7.19.0
- '@babel/helper-member-expression-to-functions': 7.18.9
- '@babel/helper-optimise-call-expression': 7.18.6
- '@babel/helper-replace-supers': 7.19.1
- '@babel/helper-split-export-declaration': 7.18.6
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@babel/helper-create-class-features-plugin/7.17.6_@babel+core@7.12.9:
resolution: {integrity: sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==}
engines: {node: '>=6.9.0'}
@@ -2836,17 +2815,6 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/helper-create-regexp-features-plugin/7.16.0_@babel+core@7.12.9:
- resolution: {integrity: sha512-3DyG0zAFAZKcOp7aVr33ddwkxJ0Z0Jr5V99y3I690eYLpukJsJvAbzTy1ewoCqsML8SbIrjH14Jc/nSQ4TvNPA==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/core': 7.12.9
- '@babel/helper-annotate-as-pure': 7.18.6
- regexpu-core: 4.8.0
- dev: true
-
/@babel/helper-create-regexp-features-plugin/7.19.0_@babel+core@7.12.9:
resolution: {integrity: sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==}
engines: {node: '>=6.9.0'}
@@ -2897,96 +2865,6 @@ packages:
- supports-color
dev: true
- /@babel/helper-define-polyfill-provider/0.3.0_@babel+core@7.12.9:
- resolution: {integrity: sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/core': 7.12.9
- '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.12.9
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.19.0
- '@babel/traverse': 7.19.3
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/helper-define-polyfill-provider/0.3.0_@babel+core@7.16.12:
- resolution: {integrity: sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/core': 7.16.12
- '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.16.12
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.19.0
- '@babel/traverse': 7.19.3
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
- dev: false
-
- /@babel/helper-define-polyfill-provider/0.3.0_@babel+core@7.17.8:
- resolution: {integrity: sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/core': 7.17.8
- '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.17.8
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.19.0
- '@babel/traverse': 7.19.3
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/helper-define-polyfill-provider/0.3.1_@babel+core@7.12.9:
- resolution: {integrity: sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/core': 7.12.9
- '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.12.9
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.19.0
- '@babel/traverse': 7.19.3
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/helper-define-polyfill-provider/0.3.1_@babel+core@7.16.12:
- resolution: {integrity: sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/core': 7.16.12
- '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.16.12
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.19.0
- '@babel/traverse': 7.19.3
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
- dev: false
-
/@babel/helper-define-polyfill-provider/0.3.3_@babel+core@7.12.9:
resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==}
peerDependencies:
@@ -3034,12 +2912,6 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/helper-environment-visitor/7.16.7:
- resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
-
/@babel/helper-environment-visitor/7.18.9:
resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==}
engines: {node: '>=6.9.0'}
@@ -3050,23 +2922,6 @@ packages:
dependencies:
'@babel/types': 7.19.3
- /@babel/helper-function-name/7.16.0:
- resolution: {integrity: sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-get-function-arity': 7.16.7
- '@babel/template': 7.18.10
- '@babel/types': 7.19.3
- dev: true
-
- /@babel/helper-function-name/7.16.7:
- resolution: {integrity: sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-get-function-arity': 7.16.7
- '@babel/template': 7.18.10
- '@babel/types': 7.19.3
-
/@babel/helper-function-name/7.19.0:
resolution: {integrity: sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==}
engines: {node: '>=6.9.0'}
@@ -3074,25 +2929,6 @@ packages:
'@babel/template': 7.18.10
'@babel/types': 7.19.3
- /@babel/helper-get-function-arity/7.16.7:
- resolution: {integrity: sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
-
- /@babel/helper-hoist-variables/7.16.0:
- resolution: {integrity: sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
- dev: true
-
- /@babel/helper-hoist-variables/7.16.7:
- resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
-
/@babel/helper-hoist-variables/7.18.6:
resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==}
engines: {node: '>=6.9.0'}
@@ -3127,11 +2963,11 @@ packages:
resolution: {integrity: sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-environment-visitor': 7.16.7
- '@babel/helper-module-imports': 7.16.7
- '@babel/helper-simple-access': 7.17.7
- '@babel/helper-split-export-declaration': 7.16.7
- '@babel/helper-validator-identifier': 7.16.7
+ '@babel/helper-environment-visitor': 7.18.9
+ '@babel/helper-module-imports': 7.18.6
+ '@babel/helper-simple-access': 7.18.6
+ '@babel/helper-split-export-declaration': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
'@babel/template': 7.18.10
'@babel/traverse': 7.19.3
'@babel/types': 7.19.3
@@ -3153,13 +2989,6 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/helper-optimise-call-expression/7.16.0:
- resolution: {integrity: sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
- dev: true
-
/@babel/helper-optimise-call-expression/7.18.6:
resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==}
engines: {node: '>=6.9.0'}
@@ -3186,8 +3015,8 @@ packages:
resolution: {integrity: sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-annotate-as-pure': 7.16.0
- '@babel/helper-wrap-function': 7.16.0
+ '@babel/helper-annotate-as-pure': 7.18.6
+ '@babel/helper-wrap-function': 7.19.0
'@babel/types': 7.19.3
transitivePeerDependencies:
- supports-color
@@ -3247,18 +3076,6 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/helper-replace-supers/7.16.0:
- resolution: {integrity: sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-member-expression-to-functions': 7.18.9
- '@babel/helper-optimise-call-expression': 7.18.6
- '@babel/traverse': 7.19.3
- '@babel/types': 7.19.3
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@babel/helper-replace-supers/7.19.1:
resolution: {integrity: sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==}
engines: {node: '>=6.9.0'}
@@ -3271,51 +3088,18 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/helper-simple-access/7.16.0:
- resolution: {integrity: sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
- dev: true
-
- /@babel/helper-simple-access/7.17.7:
- resolution: {integrity: sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
-
/@babel/helper-simple-access/7.18.6:
resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.19.3
- /@babel/helper-skip-transparent-expression-wrappers/7.16.0:
- resolution: {integrity: sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
- dev: true
-
/@babel/helper-skip-transparent-expression-wrappers/7.18.9:
resolution: {integrity: sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/types': 7.19.3
- /@babel/helper-split-export-declaration/7.16.0:
- resolution: {integrity: sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
- dev: true
-
- /@babel/helper-split-export-declaration/7.16.7:
- resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/types': 7.19.3
-
/@babel/helper-split-export-declaration/7.18.6:
resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==}
engines: {node: '>=6.9.0'}
@@ -3326,14 +3110,6 @@ packages:
resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==}
engines: {node: '>=6.9.0'}
- /@babel/helper-validator-identifier/7.15.7:
- resolution: {integrity: sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==}
- engines: {node: '>=6.9.0'}
-
- /@babel/helper-validator-identifier/7.16.7:
- resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==}
- engines: {node: '>=6.9.0'}
-
/@babel/helper-validator-identifier/7.19.1:
resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==}
engines: {node: '>=6.9.0'}
@@ -3351,18 +3127,6 @@ packages:
resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==}
engines: {node: '>=6.9.0'}
- /@babel/helper-wrap-function/7.16.0:
- resolution: {integrity: sha512-VVMGzYY3vkWgCJML+qVLvGIam902mJW0FvT7Avj1zEe0Gn7D93aWdLblYARTxEw+6DhZmtzhBM2zv0ekE5zg1g==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-function-name': 7.19.0
- '@babel/template': 7.18.10
- '@babel/traverse': 7.19.3
- '@babel/types': 7.19.3
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@babel/helper-wrap-function/7.19.0:
resolution: {integrity: sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==}
engines: {node: '>=6.9.0'}
@@ -3384,14 +3148,6 @@ packages:
transitivePeerDependencies:
- supports-color
- /@babel/highlight/7.16.10:
- resolution: {integrity: sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==}
- engines: {node: '>=6.9.0'}
- dependencies:
- '@babel/helper-validator-identifier': 7.19.1
- chalk: 2.4.2
- js-tokens: 4.0.0
-
/@babel/highlight/7.18.6:
resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==}
engines: {node: '>=6.9.0'}
@@ -3577,7 +3333,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-class-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
transitivePeerDependencies:
- supports-color
@@ -3590,7 +3346,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.12.9
+ '@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
transitivePeerDependencies:
- supports-color
@@ -3603,7 +3359,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.16.12
- '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.16.12
+ '@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.16.12
'@babel/helper-plugin-utils': 7.19.0
transitivePeerDependencies:
- supports-color
@@ -4177,7 +3933,7 @@ packages:
dependencies:
'@babel/core': 7.12.9
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-skip-transparent-expression-wrappers': 7.16.0
+ '@babel/helper-skip-transparent-expression-wrappers': 7.18.9
'@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.12.9
dev: true
@@ -4258,7 +4014,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-class-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
transitivePeerDependencies:
- supports-color
@@ -4324,7 +4080,7 @@ packages:
'@babel/core': 7.12.9
'@babel/helper-annotate-as-pure': 7.16.7
'@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.12.9
- '@babel/helper-plugin-utils': 7.18.9
+ '@babel/helper-plugin-utils': 7.19.0
'@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.12.9
transitivePeerDependencies:
- supports-color
@@ -4339,7 +4095,7 @@ packages:
'@babel/core': 7.16.12
'@babel/helper-annotate-as-pure': 7.16.7
'@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.16.12
- '@babel/helper-plugin-utils': 7.18.9
+ '@babel/helper-plugin-utils': 7.19.0
'@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.16.12
transitivePeerDependencies:
- supports-color
@@ -4381,7 +4137,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-regexp-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-regexp-features-plugin': 7.19.0_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
dev: true
@@ -5016,9 +4772,9 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-module-imports': 7.16.0
+ '@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-remap-async-to-generator': 7.16.4
+ '@babel/helper-remap-async-to-generator': 7.18.9_@babel+core@7.12.9
transitivePeerDependencies:
- supports-color
dev: true
@@ -5183,12 +4939,12 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-annotate-as-pure': 7.16.0
- '@babel/helper-function-name': 7.16.0
- '@babel/helper-optimise-call-expression': 7.16.0
+ '@babel/helper-annotate-as-pure': 7.18.6
+ '@babel/helper-function-name': 7.19.0
+ '@babel/helper-optimise-call-expression': 7.18.6
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-replace-supers': 7.16.0
- '@babel/helper-split-export-declaration': 7.16.0
+ '@babel/helper-replace-supers': 7.19.1
+ '@babel/helper-split-export-declaration': 7.18.6
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -5375,7 +5131,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-regexp-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-regexp-features-plugin': 7.19.0_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
dev: true
@@ -5500,7 +5256,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-builder-binary-assignment-operator-visitor': 7.16.0
+ '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.9
'@babel/helper-plugin-utils': 7.19.0
dev: true
@@ -5613,7 +5369,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-function-name': 7.16.0
+ '@babel/helper-function-name': 7.19.0
'@babel/helper-plugin-utils': 7.19.0
dev: true
@@ -5840,7 +5596,7 @@ packages:
'@babel/core': 7.12.9
'@babel/helper-module-transforms': 7.19.0
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-simple-access': 7.16.0
+ '@babel/helper-simple-access': 7.18.6
babel-plugin-dynamic-import-node: 2.3.3
transitivePeerDependencies:
- supports-color
@@ -5911,10 +5667,10 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-hoist-variables': 7.16.0
+ '@babel/helper-hoist-variables': 7.18.6
'@babel/helper-module-transforms': 7.19.0
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-validator-identifier': 7.15.7
+ '@babel/helper-validator-identifier': 7.19.1
babel-plugin-dynamic-import-node: 2.3.3
transitivePeerDependencies:
- supports-color
@@ -6054,7 +5810,7 @@ packages:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-regexp-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-regexp-features-plugin': 7.19.0_@babel+core@7.12.9
dev: true
/@babel/plugin-transform-named-capturing-groups-regex/7.16.8_@babel+core@7.12.9:
@@ -6154,7 +5910,7 @@ packages:
dependencies:
'@babel/core': 7.12.9
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-replace-supers': 7.16.0
+ '@babel/helper-replace-supers': 7.19.1
transitivePeerDependencies:
- supports-color
dev: true
@@ -6664,7 +6420,7 @@ packages:
dependencies:
'@babel/core': 7.12.9
'@babel/helper-plugin-utils': 7.19.0
- '@babel/helper-skip-transparent-expression-wrappers': 7.16.0
+ '@babel/helper-skip-transparent-expression-wrappers': 7.18.9
dev: true
/@babel/plugin-transform-spread/7.16.7_@babel+core@7.12.9:
@@ -6953,7 +6709,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-create-regexp-features-plugin': 7.16.0_@babel+core@7.12.9
+ '@babel/helper-create-regexp-features-plugin': 7.19.0_@babel+core@7.12.9
'@babel/helper-plugin-utils': 7.19.0
dev: true
@@ -7595,10 +7351,10 @@ packages:
dependencies:
'@babel/code-frame': 7.18.6
'@babel/generator': 7.19.3
- '@babel/helper-environment-visitor': 7.16.7
- '@babel/helper-function-name': 7.16.7
- '@babel/helper-hoist-variables': 7.16.7
- '@babel/helper-split-export-declaration': 7.16.7
+ '@babel/helper-environment-visitor': 7.18.9
+ '@babel/helper-function-name': 7.19.0
+ '@babel/helper-hoist-variables': 7.18.6
+ '@babel/helper-split-export-declaration': 7.18.6
'@babel/parser': 7.19.3
'@babel/types': 7.19.3
debug: 4.3.4
@@ -7627,14 +7383,14 @@ packages:
resolution: {integrity: sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-validator-identifier': 7.15.7
+ '@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
/@babel/types/7.17.0:
resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-validator-identifier': 7.16.7
+ '@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
/@babel/types/7.19.3:
@@ -10340,7 +10096,7 @@ packages:
'@storybook/node-logger': 6.4.19
'@storybook/postinstall': 6.4.19
'@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/react': 6.4.19_bgawh2hvs42ew64xztrhknnlry
+ '@storybook/react': 6.4.19_a55upwwpdj22rf6pemjk4qxjbi
'@storybook/source-loader': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
'@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -10453,7 +10209,7 @@ packages:
'@storybook/node-logger': 6.4.19
'@storybook/postinstall': 6.4.19
'@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/react': 6.4.19_hyxuuzpmppcxva5upf6kk6zg4m
+ '@storybook/react': 6.4.19_oycjqkyefi4akx2twppuux3udq
'@storybook/source-loader': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
'@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -10669,6 +10425,99 @@ packages:
util-deprecate: 1.0.2
dev: true
+ /@storybook/builder-webpack4/6.4.19_3n4gsnmxucj3bywv6syggoiztm:
+ resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0
+ react-dom: ^16.8.0 || ^17.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@babel/core': 7.17.8
+ '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.17.8
+ '@babel/plugin-proposal-decorators': 7.16.4_@babel+core@7.17.8
+ '@babel/plugin-proposal-export-default-from': 7.16.7_@babel+core@7.17.8
+ '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6_@babel+core@7.17.8
+ '@babel/plugin-proposal-object-rest-spread': 7.18.9_@babel+core@7.17.8
+ '@babel/plugin-proposal-optional-chaining': 7.18.9_@babel+core@7.17.8
+ '@babel/plugin-proposal-private-methods': 7.18.6_@babel+core@7.17.8
+ '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.8
+ '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.17.8
+ '@babel/plugin-transform-block-scoping': 7.18.9_@babel+core@7.17.8
+ '@babel/plugin-transform-classes': 7.19.0_@babel+core@7.17.8
+ '@babel/plugin-transform-destructuring': 7.18.13_@babel+core@7.17.8
+ '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.17.8
+ '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.17.8
+ '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.17.8
+ '@babel/plugin-transform-spread': 7.19.0_@babel+core@7.17.8
+ '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.8
+ '@babel/preset-env': 7.19.3_@babel+core@7.17.8
+ '@babel/preset-react': 7.16.7_@babel+core@7.17.8
+ '@babel/preset-typescript': 7.18.6_@babel+core@7.17.8
+ '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/channel-postmessage': 6.4.19
+ '@storybook/channels': 6.4.19
+ '@storybook/client-api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/client-logger': 6.4.19
+ '@storybook/components': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
+ '@storybook/core-events': 6.4.19
+ '@storybook/node-logger': 6.4.19
+ '@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/semver': 7.3.2
+ '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/ui': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@types/node': 14.14.33
+ '@types/webpack': 4.41.32
+ autoprefixer: 9.8.6
+ babel-loader: 8.2.3_w4x3pzrj2omidyjy5w3nzug7xy
+ babel-plugin-macros: 2.8.0
+ babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.8
+ case-sensitive-paths-webpack-plugin: 2.4.0
+ core-js: 3.25.5
+ css-loader: 3.6.0_webpack@4.46.0
+ file-loader: 6.2.0_webpack@4.46.0
+ find-up: 5.0.0
+ fork-ts-checker-webpack-plugin: 4.1.6_lasgyenclx45ngbljrbo537mpe
+ glob: 7.2.0
+ glob-promise: 3.4.0_glob@7.2.0
+ global: 4.4.0
+ html-webpack-plugin: 4.5.2_webpack@4.46.0
+ pnp-webpack-plugin: 1.6.4_typescript@4.8.4
+ postcss: 7.0.39
+ postcss-flexbugs-fixes: 4.2.1
+ postcss-loader: 4.2.0_gzaxsinx64nntyd3vmdqwl7coe
+ raw-loader: 4.0.2_webpack@4.46.0
+ react: 17.0.2
+ react-dom: 17.0.2_react@17.0.2
+ stable: 0.1.8
+ style-loader: 1.3.0_webpack@4.46.0
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
+ ts-dedent: 2.2.0
+ typescript: 4.8.4
+ url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
+ util-deprecate: 1.0.2
+ webpack: 4.46.0
+ webpack-dev-middleware: 3.7.3_webpack@4.46.0
+ webpack-filter-warnings-plugin: 1.2.1_webpack@4.46.0
+ webpack-hot-middleware: 2.25.1
+ webpack-virtual-modules: 0.2.2
+ transitivePeerDependencies:
+ - '@types/react'
+ - acorn
+ - bluebird
+ - eslint
+ - supports-color
+ - vue-template-compiler
+ - webpack-cli
+ - webpack-command
+ dev: true
+
/@storybook/builder-webpack4/6.4.19_6fawffbhajw2qfspjn7er622zq:
resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==}
peerDependencies:
@@ -10762,7 +10611,7 @@ packages:
- webpack-command
dev: true
- /@storybook/builder-webpack4/6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu:
+ /@storybook/builder-webpack4/6.4.19_fukhgakaronpnxxxb7r2advxsa:
resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -10834,7 +10683,7 @@ packages:
react-dom: 17.0.2_react@17.0.2
stable: 0.1.8
style-loader: 1.3.0_webpack@4.46.0
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
ts-dedent: 2.2.0
typescript: 4.8.4
url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
@@ -10855,100 +10704,7 @@ packages:
- webpack-command
dev: true
- /@storybook/builder-webpack4/6.4.19_bwojc7ty2esajt4slmy7gzriiq:
- resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==}
- peerDependencies:
- react: ^16.8.0 || ^17.0.0
- react-dom: ^16.8.0 || ^17.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@babel/core': 7.17.8
- '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.17.8
- '@babel/plugin-proposal-decorators': 7.16.4_@babel+core@7.17.8
- '@babel/plugin-proposal-export-default-from': 7.16.7_@babel+core@7.17.8
- '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6_@babel+core@7.17.8
- '@babel/plugin-proposal-object-rest-spread': 7.18.9_@babel+core@7.17.8
- '@babel/plugin-proposal-optional-chaining': 7.18.9_@babel+core@7.17.8
- '@babel/plugin-proposal-private-methods': 7.18.6_@babel+core@7.17.8
- '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.17.8
- '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.17.8
- '@babel/plugin-transform-block-scoping': 7.18.9_@babel+core@7.17.8
- '@babel/plugin-transform-classes': 7.19.0_@babel+core@7.17.8
- '@babel/plugin-transform-destructuring': 7.18.13_@babel+core@7.17.8
- '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.17.8
- '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.17.8
- '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.17.8
- '@babel/plugin-transform-spread': 7.19.0_@babel+core@7.17.8
- '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.8
- '@babel/preset-env': 7.19.3_@babel+core@7.17.8
- '@babel/preset-react': 7.16.7_@babel+core@7.17.8
- '@babel/preset-typescript': 7.18.6_@babel+core@7.17.8
- '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/channel-postmessage': 6.4.19
- '@storybook/channels': 6.4.19
- '@storybook/client-api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/client-logger': 6.4.19
- '@storybook/components': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
- '@storybook/core-events': 6.4.19
- '@storybook/node-logger': 6.4.19
- '@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/semver': 7.3.2
- '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/ui': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@types/node': 14.14.33
- '@types/webpack': 4.41.32
- autoprefixer: 9.8.6
- babel-loader: 8.2.3_w4x3pzrj2omidyjy5w3nzug7xy
- babel-plugin-macros: 2.8.0
- babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.8
- case-sensitive-paths-webpack-plugin: 2.4.0
- core-js: 3.25.5
- css-loader: 3.6.0_webpack@4.46.0
- file-loader: 6.2.0_webpack@4.46.0
- find-up: 5.0.0
- fork-ts-checker-webpack-plugin: 4.1.6_lasgyenclx45ngbljrbo537mpe
- glob: 7.2.0
- glob-promise: 3.4.0_glob@7.2.0
- global: 4.4.0
- html-webpack-plugin: 4.5.2_webpack@4.46.0
- pnp-webpack-plugin: 1.6.4_typescript@4.8.4
- postcss: 7.0.39
- postcss-flexbugs-fixes: 4.2.1
- postcss-loader: 4.2.0_gzaxsinx64nntyd3vmdqwl7coe
- raw-loader: 4.0.2_webpack@4.46.0
- react: 17.0.2
- react-dom: 17.0.2_react@17.0.2
- stable: 0.1.8
- style-loader: 1.3.0_webpack@4.46.0
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
- ts-dedent: 2.2.0
- typescript: 4.8.4
- url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
- util-deprecate: 1.0.2
- webpack: 4.46.0
- webpack-dev-middleware: 3.7.3_webpack@4.46.0
- webpack-filter-warnings-plugin: 1.2.1_webpack@4.46.0
- webpack-hot-middleware: 2.25.1
- webpack-virtual-modules: 0.2.2
- transitivePeerDependencies:
- - '@types/react'
- - acorn
- - bluebird
- - eslint
- - supports-color
- - vue-template-compiler
- - webpack-cli
- - webpack-command
- dev: true
-
- /@storybook/builder-webpack4/6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm:
+ /@storybook/builder-webpack4/6.4.19_kdglyhz445ek5yhe73f5yegd3m:
resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -11020,7 +10776,7 @@ packages:
react-dom: 17.0.2_react@17.0.2
stable: 0.1.8
style-loader: 1.3.0_webpack@4.46.0
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
ts-dedent: 2.2.0
typescript: 4.8.4
url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
@@ -11134,7 +10890,7 @@ packages:
- webpack-command
dev: true
- /@storybook/builder-webpack5/6.4.19_bwojc7ty2esajt4slmy7gzriiq:
+ /@storybook/builder-webpack5/6.4.19_3n4gsnmxucj3bywv6syggoiztm:
resolution: {integrity: sha512-AWM4YMN1gPaf7jfntqZTCGpIQ1tF6YRU1JtczPG4ox28rTaO6NMfOBi9aRhBre/59pPOh9bF6u2gu/MIHmRW+w==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -11189,14 +10945,14 @@ packages:
fork-ts-checker-webpack-plugin: 6.5.0_27qmdvvfdw5s3nqwnln6yerdsa
glob: 7.2.0
glob-promise: 3.4.0_glob@7.2.0
- html-webpack-plugin: 5.5.0_acorn@8.8.0+webpack@5.70.0
+ html-webpack-plugin: 5.5.0_acorn@8.8.1+webpack@5.70.0
path-browserify: 1.0.1
process: 0.11.10
react: 17.0.2
react-dom: 17.0.2_react@17.0.2
stable: 0.1.8
style-loader: 2.0.0_webpack@5.70.0
- terser-webpack-plugin: 5.2.5_acorn@8.8.0+webpack@5.70.0
+ terser-webpack-plugin: 5.2.5_acorn@8.8.1+webpack@5.70.0
ts-dedent: 2.2.0
typescript: 4.8.4
util-deprecate: 1.0.2
@@ -11676,14 +11432,14 @@ packages:
dependencies:
'@discoveryjs/json-ext': 0.5.7
'@storybook/builder-webpack4': 6.4.19_6fawffbhajw2qfspjn7er622zq
- '@storybook/builder-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/builder-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
'@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
'@storybook/core-events': 6.4.19
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/csf-tools': 6.4.19
'@storybook/manager-webpack4': 6.4.19_6fawffbhajw2qfspjn7er622zq
- '@storybook/manager-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/manager-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/node-logger': 6.4.19
'@storybook/semver': 7.3.2
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -11735,7 +11491,7 @@ packages:
- webpack-command
dev: true
- /@storybook/core-server/6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu:
+ /@storybook/core-server/6.4.19_fukhgakaronpnxxxb7r2advxsa:
resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==}
peerDependencies:
'@storybook/builder-webpack5': 6.4.19
@@ -11752,13 +11508,13 @@ packages:
optional: true
dependencies:
'@discoveryjs/json-ext': 0.5.7
- '@storybook/builder-webpack4': 6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu
+ '@storybook/builder-webpack4': 6.4.19_fukhgakaronpnxxxb7r2advxsa
'@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
'@storybook/core-common': 6.4.19_bhvadzvbuq4c4gucumdoppg3by
'@storybook/core-events': 6.4.19
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/csf-tools': 6.4.19
- '@storybook/manager-webpack4': 6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu
+ '@storybook/manager-webpack4': 6.4.19_fukhgakaronpnxxxb7r2advxsa
'@storybook/node-logger': 6.4.19
'@storybook/semver': 7.3.2
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -11810,7 +11566,7 @@ packages:
- webpack-command
dev: true
- /@storybook/core-server/6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm:
+ /@storybook/core-server/6.4.19_kdglyhz445ek5yhe73f5yegd3m:
resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==}
peerDependencies:
'@storybook/builder-webpack5': 6.4.19
@@ -11827,13 +11583,13 @@ packages:
optional: true
dependencies:
'@discoveryjs/json-ext': 0.5.7
- '@storybook/builder-webpack4': 6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm
+ '@storybook/builder-webpack4': 6.4.19_kdglyhz445ek5yhe73f5yegd3m
'@storybook/core-client': 6.4.19_4khy3msxr4lnrhwh6cbg2lwt64
'@storybook/core-common': 6.4.19_bhvadzvbuq4c4gucumdoppg3by
'@storybook/core-events': 6.4.19
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/csf-tools': 6.4.19
- '@storybook/manager-webpack4': 6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm
+ '@storybook/manager-webpack4': 6.4.19_kdglyhz445ek5yhe73f5yegd3m
'@storybook/node-logger': 6.4.19
'@storybook/semver': 7.3.2
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -11960,7 +11716,7 @@ packages:
- webpack-command
dev: true
- /@storybook/core-server/6.4.19_zfflocleqzdwelfxuvlampqgty:
+ /@storybook/core-server/6.4.19_zide44vnbwlw6buwpxyfzrhxya:
resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==}
peerDependencies:
'@storybook/builder-webpack5': 6.4.19
@@ -11977,15 +11733,15 @@ packages:
optional: true
dependencies:
'@discoveryjs/json-ext': 0.5.7
- '@storybook/builder-webpack4': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
- '@storybook/builder-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/builder-webpack4': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
+ '@storybook/builder-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
'@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
'@storybook/core-events': 6.4.19
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/csf-tools': 6.4.19
- '@storybook/manager-webpack4': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
- '@storybook/manager-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/manager-webpack4': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
+ '@storybook/manager-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/node-logger': 6.4.19
'@storybook/semver': 7.3.2
'@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
@@ -12037,7 +11793,7 @@ packages:
- webpack-command
dev: true
- /@storybook/core/6.4.19_cwkpkezp45pc2xqqskbtjzmzb4:
+ /@storybook/core/6.4.19_4cb7vxhorbasgfyagprjvpaxzu:
resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==}
peerDependencies:
'@storybook/builder-webpack5': 6.4.19
@@ -12051,9 +11807,9 @@ packages:
typescript:
optional: true
dependencies:
- '@storybook/builder-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/builder-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
- '@storybook/core-server': 6.4.19_zfflocleqzdwelfxuvlampqgty
+ '@storybook/core-server': 6.4.19_zide44vnbwlw6buwpxyfzrhxya
react: 17.0.2
react-dom: 17.0.2_react@17.0.2
typescript: 4.8.4
@@ -12073,7 +11829,7 @@ packages:
- webpack-command
dev: true
- /@storybook/core/6.4.19_khiz5aumqhidkhlg2zv2fpwlya:
+ /@storybook/core/6.4.19_hxw5eumcvhbkoh74pcqihkovhi:
resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==}
peerDependencies:
'@storybook/builder-webpack5': 6.4.19
@@ -12088,7 +11844,42 @@ packages:
optional: true
dependencies:
'@storybook/core-client': 6.4.19_4khy3msxr4lnrhwh6cbg2lwt64
- '@storybook/core-server': 6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm
+ '@storybook/core-server': 6.4.19_kdglyhz445ek5yhe73f5yegd3m
+ react: 17.0.2
+ react-dom: 17.0.2_react@17.0.2
+ typescript: 4.8.4
+ webpack: 4.46.0_webpack-cli@3.3.12
+ transitivePeerDependencies:
+ - '@storybook/manager-webpack5'
+ - '@types/react'
+ - acorn
+ - bluebird
+ - bufferutil
+ - encoding
+ - eslint
+ - supports-color
+ - utf-8-validate
+ - vue-template-compiler
+ - webpack-cli
+ - webpack-command
+ dev: true
+
+ /@storybook/core/6.4.19_p3r3fihtzjpxjnglz4l5qyfmaa:
+ resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==}
+ peerDependencies:
+ '@storybook/builder-webpack5': 6.4.19
+ react: ^16.8.0 || ^17.0.0
+ react-dom: ^16.8.0 || ^17.0.0
+ typescript: '*'
+ webpack: '*'
+ peerDependenciesMeta:
+ '@storybook/builder-webpack5':
+ optional: true
+ typescript:
+ optional: true
+ dependencies:
+ '@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
+ '@storybook/core-server': 6.4.19_fukhgakaronpnxxxb7r2advxsa
react: 17.0.2
react-dom: 17.0.2_react@17.0.2
typescript: 4.8.4
@@ -12143,41 +11934,6 @@ packages:
- webpack-command
dev: true
- /@storybook/core/6.4.19_xzab24xk2ppqlw525pofyj44uy:
- resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==}
- peerDependencies:
- '@storybook/builder-webpack5': 6.4.19
- react: ^16.8.0 || ^17.0.0
- react-dom: ^16.8.0 || ^17.0.0
- typescript: '*'
- webpack: '*'
- peerDependenciesMeta:
- '@storybook/builder-webpack5':
- optional: true
- typescript:
- optional: true
- dependencies:
- '@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
- '@storybook/core-server': 6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu
- react: 17.0.2
- react-dom: 17.0.2_react@17.0.2
- typescript: 4.8.4
- webpack: 4.46.0_webpack-cli@3.3.12
- transitivePeerDependencies:
- - '@storybook/manager-webpack5'
- - '@types/react'
- - acorn
- - bluebird
- - bufferutil
- - encoding
- - eslint
- - supports-color
- - utf-8-validate
- - vue-template-compiler
- - webpack-cli
- - webpack-command
- dev: true
-
/@storybook/core/6.4.19_ybd46eyevy5nesjyz6rrqmwwmu:
resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==}
peerDependencies:
@@ -12192,7 +11948,7 @@ packages:
typescript:
optional: true
dependencies:
- '@storybook/builder-webpack5': 6.4.19_bwojc7ty2esajt4slmy7gzriiq
+ '@storybook/builder-webpack5': 6.4.19_3n4gsnmxucj3bywv6syggoiztm
'@storybook/core-client': 6.4.19_i57eoi6p2gbobism6oxgcmupsa
'@storybook/core-server': 6.4.19_2x3ckvxqfngstqwiutxqcrgnby
react: 17.0.2
@@ -12244,6 +12000,67 @@ packages:
lodash: 4.17.21
dev: true
+ /@storybook/manager-webpack4/6.4.19_3n4gsnmxucj3bywv6syggoiztm:
+ resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0
+ react-dom: ^16.8.0 || ^17.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@babel/core': 7.17.8
+ '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.8
+ '@babel/preset-react': 7.16.7_@babel+core@7.17.8
+ '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
+ '@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
+ '@storybook/node-logger': 6.4.19
+ '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@storybook/ui': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
+ '@types/node': 14.14.33
+ '@types/webpack': 4.41.32
+ babel-loader: 8.2.3_w4x3pzrj2omidyjy5w3nzug7xy
+ case-sensitive-paths-webpack-plugin: 2.4.0
+ chalk: 4.1.2
+ core-js: 3.25.5
+ css-loader: 3.6.0_webpack@4.46.0
+ express: 4.18.1
+ file-loader: 6.2.0_webpack@4.46.0
+ file-system-cache: 1.0.5
+ find-up: 5.0.0
+ fs-extra: 9.1.0
+ html-webpack-plugin: 4.5.2_webpack@4.46.0
+ node-fetch: 2.6.7
+ pnp-webpack-plugin: 1.6.4_typescript@4.8.4
+ react: 17.0.2
+ react-dom: 17.0.2_react@17.0.2
+ read-pkg-up: 7.0.1
+ regenerator-runtime: 0.13.9
+ resolve-from: 5.0.0
+ style-loader: 1.3.0_webpack@4.46.0
+ telejson: 5.3.3
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
+ ts-dedent: 2.2.0
+ typescript: 4.8.4
+ url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
+ util-deprecate: 1.0.2
+ webpack: 4.46.0
+ webpack-dev-middleware: 3.7.3_webpack@4.46.0
+ webpack-virtual-modules: 0.2.2
+ transitivePeerDependencies:
+ - '@types/react'
+ - acorn
+ - bluebird
+ - encoding
+ - eslint
+ - supports-color
+ - vue-template-compiler
+ - webpack-cli
+ - webpack-command
+ dev: true
+
/@storybook/manager-webpack4/6.4.19_6fawffbhajw2qfspjn7er622zq:
resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==}
peerDependencies:
@@ -12305,7 +12122,7 @@ packages:
- webpack-command
dev: true
- /@storybook/manager-webpack4/6.4.19_b6dfd6k5wi6kl4hmm6xmva7dfu:
+ /@storybook/manager-webpack4/6.4.19_fukhgakaronpnxxxb7r2advxsa:
resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -12346,7 +12163,7 @@ packages:
resolve-from: 5.0.0
style-loader: 1.3.0_webpack@4.46.0
telejson: 5.3.3
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
ts-dedent: 2.2.0
typescript: 4.8.4
url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
@@ -12366,68 +12183,7 @@ packages:
- webpack-command
dev: true
- /@storybook/manager-webpack4/6.4.19_bwojc7ty2esajt4slmy7gzriiq:
- resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==}
- peerDependencies:
- react: ^16.8.0 || ^17.0.0
- react-dom: ^16.8.0 || ^17.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@babel/core': 7.17.8
- '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.17.8
- '@babel/preset-react': 7.16.7_@babel+core@7.17.8
- '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/core-client': 6.4.19_lb6j7tllhltqtas2n635xqdotu
- '@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
- '@storybook/node-logger': 6.4.19
- '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/ui': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@types/node': 14.14.33
- '@types/webpack': 4.41.32
- babel-loader: 8.2.3_w4x3pzrj2omidyjy5w3nzug7xy
- case-sensitive-paths-webpack-plugin: 2.4.0
- chalk: 4.1.2
- core-js: 3.25.5
- css-loader: 3.6.0_webpack@4.46.0
- express: 4.18.1
- file-loader: 6.2.0_webpack@4.46.0
- file-system-cache: 1.0.5
- find-up: 5.0.0
- fs-extra: 9.1.0
- html-webpack-plugin: 4.5.2_webpack@4.46.0
- node-fetch: 2.6.7
- pnp-webpack-plugin: 1.6.4_typescript@4.8.4
- react: 17.0.2
- react-dom: 17.0.2_react@17.0.2
- read-pkg-up: 7.0.1
- regenerator-runtime: 0.13.9
- resolve-from: 5.0.0
- style-loader: 1.3.0_webpack@4.46.0
- telejson: 5.3.3
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
- ts-dedent: 2.2.0
- typescript: 4.8.4
- url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
- util-deprecate: 1.0.2
- webpack: 4.46.0
- webpack-dev-middleware: 3.7.3_webpack@4.46.0
- webpack-virtual-modules: 0.2.2
- transitivePeerDependencies:
- - '@types/react'
- - acorn
- - bluebird
- - encoding
- - eslint
- - supports-color
- - vue-template-compiler
- - webpack-cli
- - webpack-command
- dev: true
-
- /@storybook/manager-webpack4/6.4.19_udsk7p7oupcmsdx7ikf7zdk4sm:
+ /@storybook/manager-webpack4/6.4.19_kdglyhz445ek5yhe73f5yegd3m:
resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -12468,7 +12224,7 @@ packages:
resolve-from: 5.0.0
style-loader: 1.3.0_webpack@4.46.0
telejson: 5.3.3
- terser-webpack-plugin: 4.2.3_acorn@8.8.0+webpack@4.46.0
+ terser-webpack-plugin: 4.2.3_acorn@8.8.1+webpack@4.46.0
ts-dedent: 2.2.0
typescript: 4.8.4
url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy
@@ -12549,7 +12305,7 @@ packages:
- webpack-command
dev: true
- /@storybook/manager-webpack5/6.4.19_bwojc7ty2esajt4slmy7gzriiq:
+ /@storybook/manager-webpack5/6.4.19_3n4gsnmxucj3bywv6syggoiztm:
resolution: {integrity: sha512-hVjWhWAOgWaymBy0HeRskN+MfKLpqLP4Txfw+3Xqg1qplgexV0w2O4BQrS/SNEH4V/1qF9h8XTsk3L3oQIj3Mg==}
peerDependencies:
react: ^16.8.0 || ^17.0.0
@@ -12578,7 +12334,7 @@ packages:
file-system-cache: 1.0.5
find-up: 5.0.0
fs-extra: 9.1.0
- html-webpack-plugin: 5.5.0_acorn@8.8.0+webpack@5.70.0
+ html-webpack-plugin: 5.5.0_acorn@8.8.1+webpack@5.70.0
node-fetch: 2.6.7
process: 0.11.10
react: 17.0.2
@@ -12588,7 +12344,7 @@ packages:
resolve-from: 5.0.0
style-loader: 2.0.0_webpack@5.70.0
telejson: 5.3.3
- terser-webpack-plugin: 5.2.5_acorn@8.8.0+webpack@5.70.0
+ terser-webpack-plugin: 5.2.5_acorn@8.8.1+webpack@5.70.0
ts-dedent: 2.2.0
typescript: 4.8.4
util-deprecate: 1.0.2
@@ -12670,7 +12426,7 @@ packages:
- supports-color
dev: true
- /@storybook/react/6.4.19_bgawh2hvs42ew64xztrhknnlry:
+ /@storybook/react/6.4.19_a55upwwpdj22rf6pemjk4qxjbi:
resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==}
engines: {node: '>=10.13.0'}
hasBin: true
@@ -12690,7 +12446,7 @@ packages:
'@babel/preset-react': 7.16.7_@babel+core@7.17.8
'@pmmmwh/react-refresh-webpack-plugin': 0.5.1_a3gyllrqvxpec3fpybsrposvju
'@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/core': 6.4.19_cwkpkezp45pc2xqqskbtjzmzb4
+ '@storybook/core': 6.4.19_4cb7vxhorbasgfyagprjvpaxzu
'@storybook/core-common': 6.4.19_56jbash75ng5psbctf36wqywr4
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/node-logger': 6.4.19
@@ -12735,7 +12491,7 @@ packages:
- webpack-plugin-serve
dev: true
- /@storybook/react/6.4.19_hyxuuzpmppcxva5upf6kk6zg4m:
+ /@storybook/react/6.4.19_glozp6fblhaty2oacwbjl7ao2i:
resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==}
engines: {node: '>=10.13.0'}
hasBin: true
@@ -12755,7 +12511,7 @@ packages:
'@babel/preset-react': 7.16.7_@babel+core@7.17.8
'@pmmmwh/react-refresh-webpack-plugin': 0.5.1_a3gyllrqvxpec3fpybsrposvju
'@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/core': 6.4.19_khiz5aumqhidkhlg2zv2fpwlya
+ '@storybook/core': 6.4.19_p3r3fihtzjpxjnglz4l5qyfmaa
'@storybook/core-common': 6.4.19_bhvadzvbuq4c4gucumdoppg3by
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/node-logger': 6.4.19
@@ -12800,7 +12556,7 @@ packages:
- webpack-plugin-serve
dev: true
- /@storybook/react/6.4.19_rs26ab2uzoae75jlo5at3ry5ie:
+ /@storybook/react/6.4.19_oycjqkyefi4akx2twppuux3udq:
resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==}
engines: {node: '>=10.13.0'}
hasBin: true
@@ -12820,7 +12576,7 @@ packages:
'@babel/preset-react': 7.16.7_@babel+core@7.17.8
'@pmmmwh/react-refresh-webpack-plugin': 0.5.1_a3gyllrqvxpec3fpybsrposvju
'@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m
- '@storybook/core': 6.4.19_xzab24xk2ppqlw525pofyj44uy
+ '@storybook/core': 6.4.19_hxw5eumcvhbkoh74pcqihkovhi
'@storybook/core-common': 6.4.19_bhvadzvbuq4c4gucumdoppg3by
'@storybook/csf': 0.0.2--canary.87bc651.0
'@storybook/node-logger': 6.4.19
@@ -13826,7 +13582,6 @@ packages:
/@types/uuid/8.3.4:
resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==}
- dev: false
/@types/vinyl/2.0.6:
resolution: {integrity: sha512-ayJ0iOCDNHnKpKTgBG6Q6JOnHTj9zFta+3j2b8Ejza0e4cvRyMn0ZoLEmbPrTHe5YYRlDYPvPWVdV4cTaRyH7g==}
@@ -15297,7 +15052,7 @@ packages:
'@babel/preset-typescript': 7.16.7_@babel+core@7.16.12
'@babel/runtime': 7.17.7
'@wordpress/babel-plugin-import-jsx-pragma': 3.1.0_@babel+core@7.16.12
- '@wordpress/browserslist-config': 4.1.0
+ '@wordpress/browserslist-config': 4.1.3
'@wordpress/element': 4.20.0
'@wordpress/warning': 2.2.2
browserslist: 4.19.3
@@ -15317,7 +15072,7 @@ packages:
'@babel/preset-typescript': 7.16.7_@babel+core@7.17.8
'@babel/runtime': 7.17.7
'@wordpress/babel-plugin-import-jsx-pragma': 3.1.2_@babel+core@7.17.8
- '@wordpress/browserslist-config': 4.1.2
+ '@wordpress/browserslist-config': 4.1.3
'@wordpress/element': 4.20.0
'@wordpress/warning': 2.4.1
browserslist: 4.20.2
@@ -15337,7 +15092,7 @@ packages:
'@babel/preset-typescript': 7.18.6_@babel+core@7.17.8
'@babel/runtime': 7.19.0
'@wordpress/babel-plugin-import-jsx-pragma': 4.2.0_@babel+core@7.17.8
- '@wordpress/browserslist-config': 5.2.0
+ '@wordpress/browserslist-config': 5.7.0
'@wordpress/element': 4.20.0
'@wordpress/warning': 2.19.0
browserslist: 4.21.4
@@ -15616,6 +15371,7 @@ packages:
/@wordpress/browserslist-config/4.1.0:
resolution: {integrity: sha512-RSJhgY2xmz6yAdDNhz/NvAO6JS+91vv9cVL7VDG2CftbyjTXBef05vWt3FzZhfeF0xUrYdpZL1PVpxmJiKvbEg==}
engines: {node: '>=12'}
+ dev: true
/@wordpress/browserslist-config/4.1.2:
resolution: {integrity: sha512-UH0Ifmm4tEjVPOtiqH6yxDvk2EKtqSAhnyhyfSIb0wUnEoGsWTjREZjzuhgjt/I2nTqfg+0gUSzL5D0yQH6wDQ==}
@@ -15625,12 +15381,6 @@ packages:
/@wordpress/browserslist-config/4.1.3:
resolution: {integrity: sha512-M4WQ0C4zCfMWyCmK40git3rfPdNkRwg5boGjoTL4LSdhrY+rtchFAtfOHS9KovAZ5ZzTB0gyZsCu/QKZlPClog==}
engines: {node: '>=12'}
- dev: true
-
- /@wordpress/browserslist-config/5.2.0:
- resolution: {integrity: sha512-19PdasKR0tfZDitra72XFYCvTYRzeQMb0fA39lkPaM8th80s5U03RZx50mKeKFZLPMF1tVJmBG5wD367LNIoeg==}
- engines: {node: '>=14'}
- dev: false
/@wordpress/browserslist-config/5.7.0:
resolution: {integrity: sha512-d0wx5DXjGsMDurijJe006lm4FFKjbj2mM9I3MoXR0HCzMy8xk5fl6ZY2574yx4pea+f/UTKfDBi8ArUvhsjGOA==}
@@ -17525,7 +17275,7 @@ packages:
dependencies:
'@svgr/webpack': 5.5.0
'@wordpress/babel-preset-default': 6.6.1
- '@wordpress/browserslist-config': 4.1.2
+ '@wordpress/browserslist-config': 4.1.3
'@wordpress/dependency-extraction-webpack-plugin': 3.4.1_webpack@5.70.0
'@wordpress/eslint-plugin': 9.3.0_gvdiv7jt74qfcmw4bmvrh4kane
'@wordpress/jest-preset-default': 7.1.3_3kt4xu3sgkhoqdvxwcvxppk7nm
@@ -17932,12 +17682,12 @@ packages:
acorn: 7.4.1
acorn-walk: 7.2.0
- /acorn-import-assertions/1.8.0_acorn@8.8.0:
+ /acorn-import-assertions/1.8.0_acorn@8.8.1:
resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==}
peerDependencies:
acorn: ^8
dependencies:
- acorn: 8.8.0
+ acorn: 8.8.1
/acorn-jsx/5.3.2_acorn@6.4.2:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
@@ -19077,7 +18827,7 @@ packages:
dependencies:
'@babel/compat-data': 7.19.3
'@babel/core': 7.12.9
- '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.12.9
+ '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.12.9
semver: 6.3.0
transitivePeerDependencies:
- supports-color
@@ -19090,7 +18840,7 @@ packages:
dependencies:
'@babel/compat-data': 7.19.3
'@babel/core': 7.16.12
- '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.16.12
+ '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.16.12
semver: 6.3.0
transitivePeerDependencies:
- supports-color
@@ -19152,7 +18902,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.12.9
- '@babel/helper-define-polyfill-provider': 0.3.0_@babel+core@7.12.9
+ '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.12.9
core-js-compat: 3.25.5
transitivePeerDependencies:
- supports-color
@@ -19164,7 +18914,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.16.12
- '@babel/helper-define-polyfill-provider': 0.3.0_@babel+core@7.16.12
+ '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.16.12
core-js-compat: 3.25.5
transitivePeerDependencies:
- supports-color
@@ -19176,7 +18926,7 @@ packages:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.17.8
- '@babel/helper-define-polyfill-provider': 0.3.0_@babel+core@7.17.8
+ '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.17.8
core-js-compat: 3.25.5
transitivePeerDependencies:
- supports-color
@@ -21027,7 +20777,7 @@ packages:
resolution: {integrity: sha512-WpAmaKbMNmS3OProfHIdJiNleNJdgUrJfbKArXua28QF7+0CoZjlLn0lp6vlc+dl5r2/X9GQiQRQQU4BzSa69w==}
/concat-map/0.0.1:
- resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
+ resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
/concat-stream/1.6.2:
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
@@ -21194,7 +20944,7 @@ packages:
/core-js-compat/3.19.1:
resolution: {integrity: sha512-Q/VJ7jAF/y68+aUsQJ/afPOewdsGkDtcMb40J8MbuWKlK3Y+wtHq8bTHKPj2WKWLIqmS5JhHs4CzHtz6pT2W6g==}
dependencies:
- browserslist: 4.20.4
+ browserslist: 4.21.4
semver: 7.0.0
dev: true
@@ -21493,7 +21243,7 @@ packages:
postcss-value-parser: 4.2.0
schema-utils: 2.7.1
semver: 6.3.0
- webpack: 5.70.0_webpack-cli@3.3.12
+ webpack: 5.70.0
/css-loader/5.2.7_webpack@5.70.0:
resolution: {integrity: sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==}
@@ -26843,7 +26593,7 @@ packages:
terser: 4.8.0
dev: true
- /html-minifier-terser/6.1.0_acorn@8.8.0:
+ /html-minifier-terser/6.1.0_acorn@8.8.1:
resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==}
engines: {node: '>=12'}
hasBin: true
@@ -26854,7 +26604,7 @@ packages:
he: 1.2.0
param-case: 3.0.4
relateurl: 0.2.7
- terser: 5.10.0_acorn@8.8.0
+ terser: 5.10.0_acorn@8.8.1
transitivePeerDependencies:
- acorn
dev: true
@@ -26886,14 +26636,14 @@ packages:
webpack: 4.46.0
dev: true
- /html-webpack-plugin/5.5.0_acorn@8.8.0+webpack@5.70.0:
+ /html-webpack-plugin/5.5.0_acorn@8.8.1+webpack@5.70.0:
resolution: {integrity: sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==}
engines: {node: '>=10.13.0'}
peerDependencies:
webpack: ^5.20.0
dependencies:
'@types/html-minifier-terser': 6.1.0
- html-minifier-terser: 6.1.0_acorn@8.8.0
+ html-minifier-terser: 6.1.0_acorn@8.8.1
lodash: 4.17.21
pretty-error: 4.0.0
tapable: 2.2.1
@@ -36456,13 +36206,6 @@ packages:
dependencies:
regenerate: 1.4.2
- /regenerate-unicode-properties/9.0.0:
- resolution: {integrity: sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==}
- engines: {node: '>=4'}
- dependencies:
- regenerate: 1.4.2
- dev: true
-
/regenerate/1.4.2:
resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==}
@@ -36506,18 +36249,6 @@ packages:
resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==}
engines: {node: '>=8'}
- /regexpu-core/4.8.0:
- resolution: {integrity: sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==}
- engines: {node: '>=4'}
- dependencies:
- regenerate: 1.4.2
- regenerate-unicode-properties: 9.0.0
- regjsgen: 0.5.2
- regjsparser: 0.7.0
- unicode-match-property-ecmascript: 2.0.0
- unicode-match-property-value-ecmascript: 2.0.0
- dev: true
-
/regexpu-core/5.2.1:
resolution: {integrity: sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==}
engines: {node: '>=4'}
@@ -36552,20 +36283,9 @@ packages:
rc: 1.2.8
dev: true
- /regjsgen/0.5.2:
- resolution: {integrity: sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==}
- dev: true
-
/regjsgen/0.7.1:
resolution: {integrity: sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==}
- /regjsparser/0.7.0:
- resolution: {integrity: sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==}
- hasBin: true
- dependencies:
- jsesc: 0.5.0
- dev: true
-
/regjsparser/0.9.1:
resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==}
hasBin: true
@@ -37135,7 +36855,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
semver: 7.3.5
- webpack: 5.70.0_webpack-cli@3.3.12
+ webpack: 5.70.0
/sass-loader/12.6.0_sass@1.49.9+webpack@5.70.0:
resolution: {integrity: sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==}
@@ -38976,7 +38696,7 @@ packages:
- bluebird
dev: true
- /terser-webpack-plugin/4.2.3_acorn@8.8.0+webpack@4.46.0:
+ /terser-webpack-plugin/4.2.3_acorn@8.8.1+webpack@4.46.0:
resolution: {integrity: sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -38989,7 +38709,7 @@ packages:
schema-utils: 3.1.1
serialize-javascript: 5.0.1
source-map: 0.6.1
- terser: 5.10.0_acorn@8.8.0
+ terser: 5.10.0_acorn@8.8.1
webpack: 4.46.0
webpack-sources: 1.4.3
transitivePeerDependencies:
@@ -38997,6 +38717,33 @@ packages:
- bluebird
dev: true
+ /terser-webpack-plugin/5.2.5_2afcvd4rlhgtdg42ipbhcxtcri:
+ resolution: {integrity: sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==}
+ engines: {node: '>= 10.13.0'}
+ peerDependencies:
+ '@swc/core': '*'
+ esbuild: '*'
+ uglify-js: '*'
+ webpack: ^5.1.0
+ peerDependenciesMeta:
+ '@swc/core':
+ optional: true
+ esbuild:
+ optional: true
+ uglify-js:
+ optional: true
+ dependencies:
+ jest-worker: 27.5.1
+ schema-utils: 3.1.1
+ serialize-javascript: 6.0.0
+ source-map: 0.6.1
+ terser: 5.10.0_acorn@8.8.1
+ uglify-js: 3.14.5
+ webpack: 5.70.0_bgqcrdgdviybk52kjcpjat65sa
+ transitivePeerDependencies:
+ - acorn
+ dev: true
+
/terser-webpack-plugin/5.2.5_5ksa6e7vqalagerztjs2ao5siy:
resolution: {integrity: sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==}
engines: {node: '>= 10.13.0'}
@@ -39024,7 +38771,7 @@ packages:
- acorn
dev: true
- /terser-webpack-plugin/5.2.5_acorn@8.8.0+webpack@5.70.0:
+ /terser-webpack-plugin/5.2.5_acorn@8.8.1+webpack@5.70.0:
resolution: {integrity: sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -39044,38 +38791,11 @@ packages:
schema-utils: 3.1.1
serialize-javascript: 6.0.0
source-map: 0.6.1
- terser: 5.10.0_acorn@8.8.0
- webpack: 5.70.0_webpack-cli@3.3.12
+ terser: 5.10.0_acorn@8.8.1
+ webpack: 5.70.0
transitivePeerDependencies:
- acorn
- /terser-webpack-plugin/5.2.5_olxr47tjskqvb6jdynqnsbbqhq:
- resolution: {integrity: sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==}
- engines: {node: '>= 10.13.0'}
- peerDependencies:
- '@swc/core': '*'
- esbuild: '*'
- uglify-js: '*'
- webpack: ^5.1.0
- peerDependenciesMeta:
- '@swc/core':
- optional: true
- esbuild:
- optional: true
- uglify-js:
- optional: true
- dependencies:
- jest-worker: 27.5.1
- schema-utils: 3.1.1
- serialize-javascript: 6.0.0
- source-map: 0.6.1
- terser: 5.10.0_acorn@8.8.0
- uglify-js: 3.14.5
- webpack: 5.70.0_bgqcrdgdviybk52kjcpjat65sa
- transitivePeerDependencies:
- - acorn
- dev: true
-
/terser/4.8.0:
resolution: {integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==}
engines: {node: '>=6.0.0'}
@@ -39119,7 +38839,7 @@ packages:
source-map-support: 0.5.20
dev: true
- /terser/5.10.0_acorn@8.8.0:
+ /terser/5.10.0_acorn@8.8.1:
resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==}
engines: {node: '>=10'}
hasBin: true
@@ -39129,7 +38849,7 @@ packages:
acorn:
optional: true
dependencies:
- acorn: 8.8.0
+ acorn: 8.8.1
commander: 2.20.3
source-map: 0.7.3
source-map-support: 0.5.20
@@ -40871,7 +40591,7 @@ packages:
engines: {node: '>= 10.13.0'}
hasBin: true
dependencies:
- acorn: 8.8.0
+ acorn: 8.8.1
acorn-walk: 8.2.0
chalk: 4.1.2
commander: 7.2.0
@@ -41233,8 +40953,8 @@ packages:
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.0
- acorn-import-assertions: 1.8.0_acorn@8.8.0
+ acorn: 8.8.1
+ acorn-import-assertions: 1.8.0_acorn@8.8.1
browserslist: 4.21.4
chrome-trace-event: 1.0.3
enhanced-resolve: 5.9.2
@@ -41249,7 +40969,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.1
- terser-webpack-plugin: 5.2.5_acorn@8.8.0+webpack@5.70.0
+ terser-webpack-plugin: 5.2.5_acorn@8.8.1+webpack@5.70.0
watchpack: 2.3.1
webpack-sources: 3.2.3
transitivePeerDependencies:
@@ -41272,8 +40992,8 @@ packages:
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.0
- acorn-import-assertions: 1.8.0_acorn@8.8.0
+ acorn: 8.8.1
+ acorn-import-assertions: 1.8.0_acorn@8.8.1
browserslist: 4.21.4
chrome-trace-event: 1.0.3
enhanced-resolve: 5.9.2
@@ -41288,7 +41008,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.1
- terser-webpack-plugin: 5.2.5_olxr47tjskqvb6jdynqnsbbqhq
+ terser-webpack-plugin: 5.2.5_2afcvd4rlhgtdg42ipbhcxtcri
watchpack: 2.3.1
webpack-cli: 4.9.2_webpack@5.70.0
webpack-sources: 3.2.3
@@ -41313,8 +41033,8 @@ packages:
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.0
- acorn-import-assertions: 1.8.0_acorn@8.8.0
+ acorn: 8.8.1
+ acorn-import-assertions: 1.8.0_acorn@8.8.1
browserslist: 4.21.4
chrome-trace-event: 1.0.3
enhanced-resolve: 5.9.2
@@ -41329,7 +41049,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.1
- terser-webpack-plugin: 5.2.5_acorn@8.8.0+webpack@5.70.0
+ terser-webpack-plugin: 5.2.5_acorn@8.8.1+webpack@5.70.0
watchpack: 2.3.1
webpack-cli: 3.3.12_webpack@5.70.0
webpack-sources: 3.2.3
@@ -41353,8 +41073,8 @@ packages:
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.0
- acorn-import-assertions: 1.8.0_acorn@8.8.0
+ acorn: 8.8.1
+ acorn-import-assertions: 1.8.0_acorn@8.8.1
browserslist: 4.21.4
chrome-trace-event: 1.0.3
enhanced-resolve: 5.9.2
@@ -41369,7 +41089,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.1
- terser-webpack-plugin: 5.2.5_acorn@8.8.0+webpack@5.70.0
+ terser-webpack-plugin: 5.2.5_acorn@8.8.1+webpack@5.70.0
watchpack: 2.3.1
webpack-cli: 4.9.2_wbg6qaiqcwsayvtung7xs6mhka
webpack-sources: 3.2.3
From 1ab678c13fed5df393805f0000a8fd0db991772a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maikel=20David=20P=C3=A9rez=20G=C3=B3mez?=
Date: Fri, 6 Jan 2023 09:41:45 -0300
Subject: [PATCH 49/98] Include tax options in pricing section (#36299)
* Add Charge sales tax on sub section to pricing section when enable taxes is set to yes
* Add tax classes datastore
* Load tax classes in pricing section
* Set empty value when tax class is standard rate
* Add changelog files
* Add custom resolver to use slug as id for tax classes
* Add helper text and learn more link to tax class radio group
---
packages/js/data/changelog/add-36164 | 4 +
packages/js/data/src/index.ts | 10 +-
packages/js/data/src/tax-classes/constants.ts | 3 +
packages/js/data/src/tax-classes/index.ts | 18 +++
packages/js/data/src/tax-classes/resolvers.ts | 45 ++++++
packages/js/data/src/tax-classes/types.ts | 47 +++++++
packages/js/data/src/utils.ts | 1 -
.../client/products/constants.ts | 1 +
.../client/products/product-page.scss | 7 +
.../products/sections/pricing-section.tsx | 132 +++++++++++++++++-
plugins/woocommerce/changelog/add-36164 | 4 +
11 files changed, 263 insertions(+), 9 deletions(-)
create mode 100644 packages/js/data/changelog/add-36164
create mode 100644 packages/js/data/src/tax-classes/constants.ts
create mode 100644 packages/js/data/src/tax-classes/index.ts
create mode 100644 packages/js/data/src/tax-classes/resolvers.ts
create mode 100644 packages/js/data/src/tax-classes/types.ts
create mode 100644 plugins/woocommerce/changelog/add-36164
diff --git a/packages/js/data/changelog/add-36164 b/packages/js/data/changelog/add-36164
new file mode 100644
index 00000000000..14b717dc4e0
--- /dev/null
+++ b/packages/js/data/changelog/add-36164
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add tax classes datastore
diff --git a/packages/js/data/src/index.ts b/packages/js/data/src/index.ts
index 8805b6dc794..51c0d88a515 100644
--- a/packages/js/data/src/index.ts
+++ b/packages/js/data/src/index.ts
@@ -25,6 +25,7 @@ export { EXPERIMENTAL_PRODUCT_TAGS_STORE_NAME } from './product-tags';
export { EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME } from './product-categories';
export { EXPERIMENTAL_PRODUCT_ATTRIBUTE_TERMS_STORE_NAME } from './product-attribute-terms';
export { EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME } from './product-variations';
+export { EXPERIMENTAL_TAX_CLASSES_STORE_NAME } from './tax-classes';
export { PaymentGateway } from './payment-gateways/types';
// Export hooks
@@ -97,6 +98,7 @@ export {
ProductCategoryImage,
ProductCategorySelectors,
} from './product-categories/types';
+export { TaxClass } from './tax-classes/types';
/**
* Internal dependencies
@@ -122,6 +124,7 @@ import type { EXPERIMENTAL_PRODUCT_TAGS_STORE_NAME } from './product-tags';
import type { EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME } from './product-categories';
import type { EXPERIMENTAL_PRODUCT_ATTRIBUTE_TERMS_STORE_NAME } from './product-attribute-terms';
import type { EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME } from './product-variations';
+import type { EXPERIMENTAL_TAX_CLASSES_STORE_NAME } from './tax-classes';
export type WCDataStoreName =
| typeof REVIEWS_STORE_NAME
@@ -144,7 +147,8 @@ export type WCDataStoreName =
| typeof EXPERIMENTAL_SHIPPING_ZONES_STORE_NAME
| typeof EXPERIMENTAL_PRODUCT_TAGS_STORE_NAME
| typeof EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME
- | typeof EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME;
+ | typeof EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME
+ | typeof EXPERIMENTAL_TAX_CLASSES_STORE_NAME;
/**
* Internal dependencies
@@ -163,6 +167,7 @@ import { ProductTagSelectors } from './product-tags/types';
import { ProductCategorySelectors } from './product-categories/types';
import { ProductAttributeTermsSelectors } from './product-attribute-terms/types';
import { ProductVariationSelectors } from './product-variations/types';
+import { TaxClassSelectors } from './tax-classes/types';
// As we add types to all the package selectors we can fill out these unknown types with real ones. See one
// of the already typed selectors for an example of how you can do this.
@@ -208,6 +213,8 @@ export type WCSelectorType< T > = T extends typeof REVIEWS_STORE_NAME
? OrdersSelectors
: T extends typeof EXPERIMENTAL_SHIPPING_ZONES_STORE_NAME
? ShippingZonesSelectors
+ : T extends typeof EXPERIMENTAL_TAX_CLASSES_STORE_NAME
+ ? TaxClassSelectors
: never;
export interface WCDataSelector {
@@ -224,3 +231,4 @@ export { ActionDispatchers as ProductVariationsActions } from './product-variati
export { ActionDispatchers as ProductsStoreActions } from './products/actions';
export { ActionDispatchers as ProductShippingClassesActions } from './product-shipping-classes/types';
export { ActionDispatchers as ShippingZonesActions } from './shipping-zones/types';
+export { ActionDispatchers as TaxClassActions } from './tax-classes/types';
diff --git a/packages/js/data/src/tax-classes/constants.ts b/packages/js/data/src/tax-classes/constants.ts
new file mode 100644
index 00000000000..8b64e032eab
--- /dev/null
+++ b/packages/js/data/src/tax-classes/constants.ts
@@ -0,0 +1,3 @@
+export const STORE_NAME = 'experimental/wc/admin/tax-classes';
+
+export const WC_TAX_CLASSES_NAMESPACE = '/wc/v3/taxes/classes';
diff --git a/packages/js/data/src/tax-classes/index.ts b/packages/js/data/src/tax-classes/index.ts
new file mode 100644
index 00000000000..0228df3a461
--- /dev/null
+++ b/packages/js/data/src/tax-classes/index.ts
@@ -0,0 +1,18 @@
+/**
+ * Internal dependencies
+ */
+import { createCrudDataStore } from '../crud';
+import { STORE_NAME, WC_TAX_CLASSES_NAMESPACE } from './constants';
+import * as resolvers from './resolvers';
+
+createCrudDataStore( {
+ storeName: STORE_NAME,
+ resourceName: 'TaxClass',
+ pluralResourceName: 'TaxClasses',
+ namespace: WC_TAX_CLASSES_NAMESPACE,
+ storeConfig: {
+ resolvers,
+ },
+} );
+
+export const EXPERIMENTAL_TAX_CLASSES_STORE_NAME = STORE_NAME;
diff --git a/packages/js/data/src/tax-classes/resolvers.ts b/packages/js/data/src/tax-classes/resolvers.ts
new file mode 100644
index 00000000000..11ad39e2ac0
--- /dev/null
+++ b/packages/js/data/src/tax-classes/resolvers.ts
@@ -0,0 +1,45 @@
+/**
+ * Internal dependencies
+ */
+import {
+ getItemsError,
+ getItemsSuccess,
+ getItemsTotalCountError,
+ getItemsTotalCountSuccess,
+} from '../crud/actions';
+import { getUrlParameters, getRestPath, cleanQuery } from '../crud/utils';
+import { Item, ItemQuery } from '../crud/types';
+import { request } from '../utils';
+import { WC_TAX_CLASSES_NAMESPACE } from './constants';
+
+export function* getTaxClasses( query?: Partial< ItemQuery > ) {
+ const urlParameters = getUrlParameters(
+ WC_TAX_CLASSES_NAMESPACE,
+ query || {}
+ );
+ const resourceQuery = cleanQuery( query || {}, WC_TAX_CLASSES_NAMESPACE );
+
+ try {
+ const path = getRestPath(
+ WC_TAX_CLASSES_NAMESPACE,
+ query || {},
+ urlParameters
+ );
+ const { items }: { items: Item[]; totalCount: number } = yield request<
+ ItemQuery,
+ Item
+ >( path, resourceQuery );
+
+ yield getItemsTotalCountSuccess( query, items.length );
+ yield getItemsSuccess(
+ query,
+ items.map( ( item ) => ( { ...item, id: item.id ?? item.slug } ) ),
+ urlParameters
+ );
+ return items;
+ } catch ( error ) {
+ yield getItemsTotalCountError( query, error );
+ yield getItemsError( query, error );
+ throw error;
+ }
+}
diff --git a/packages/js/data/src/tax-classes/types.ts b/packages/js/data/src/tax-classes/types.ts
new file mode 100644
index 00000000000..f55c6c129db
--- /dev/null
+++ b/packages/js/data/src/tax-classes/types.ts
@@ -0,0 +1,47 @@
+/**
+ * External dependencies
+ */
+import { DispatchFromMap } from '@automattic/data-stores';
+
+/**
+ * Internal dependencies
+ */
+import { CrudActions, CrudSelectors } from '../crud/types';
+import { BaseQueryParams } from '../types';
+
+/**
+ * Tax class properties
+ */
+export interface TaxClass {
+ /**
+ * Unique identifier for the resource.
+ */
+ readonly slug: string;
+ /**
+ * Tax class name.
+ */
+ name: string;
+}
+
+type Query = BaseQueryParams< keyof TaxClass >;
+
+type ReadOnlyProperties = 'slug';
+
+type MutableProperties = Omit< TaxClass, ReadOnlyProperties >;
+
+type TaxClassActions = CrudActions<
+ 'TaxClass',
+ TaxClass,
+ MutableProperties,
+ 'name'
+>;
+
+export type TaxClassSelectors = CrudSelectors<
+ 'TaxClass',
+ 'TaxClasses',
+ TaxClass,
+ Query,
+ MutableProperties
+>;
+
+export type ActionDispatchers = DispatchFromMap< TaxClassActions >;
diff --git a/packages/js/data/src/utils.ts b/packages/js/data/src/utils.ts
index 25f970a40fe..3ef273b813f 100644
--- a/packages/js/data/src/utils.ts
+++ b/packages/js/data/src/utils.ts
@@ -71,7 +71,6 @@ export function* request< Query extends BaseQueryParams, DataType >(
path: url,
method: 'GET',
} );
-
if ( isUnboundedRequest && ! ( 'data' in response ) ) {
return { items: response, totalCount: response.length };
}
diff --git a/plugins/woocommerce-admin/client/products/constants.ts b/plugins/woocommerce-admin/client/products/constants.ts
index 090e98116df..0aa72fd516a 100644
--- a/plugins/woocommerce-admin/client/products/constants.ts
+++ b/plugins/woocommerce-admin/client/products/constants.ts
@@ -6,3 +6,4 @@ export const ADD_NEW_SHIPPING_CLASS_OPTION_VALUE =
'__ADD_NEW_SHIPPING_CLASS_OPTION__';
export const UNCATEGORIZED_CATEGORY_SLUG = 'uncategorized';
export const PRODUCT_VARIATION_TITLE_LIMIT = 32;
+export const STANDARD_RATE_TAX_CLASS_SLUG = 'standard';
diff --git a/plugins/woocommerce-admin/client/products/product-page.scss b/plugins/woocommerce-admin/client/products/product-page.scss
index 56e8832e113..864dfdb0ecb 100644
--- a/plugins/woocommerce-admin/client/products/product-page.scss
+++ b/plugins/woocommerce-admin/client/products/product-page.scss
@@ -105,6 +105,13 @@
}
width: 50%;
}
+
+ .components-base-control__label {
+ .woocommerce-product-form__secondary-text {
+ display: block;
+ font-weight: 400;
+ }
+ }
}
.woocommerce-edit-product {
diff --git a/plugins/woocommerce-admin/client/products/sections/pricing-section.tsx b/plugins/woocommerce-admin/client/products/sections/pricing-section.tsx
index ae88ab6b053..015e3fc9e79 100644
--- a/plugins/woocommerce-admin/client/products/sections/pricing-section.tsx
+++ b/plugins/woocommerce-admin/client/products/sections/pricing-section.tsx
@@ -3,6 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import {
+ CollapsibleContent,
DateTimePickerControl,
Link,
useFormContext,
@@ -12,6 +13,8 @@ import {
Product,
OPTIONS_STORE_NAME,
SETTINGS_STORE_NAME,
+ EXPERIMENTAL_TAX_CLASSES_STORE_NAME,
+ TaxClass,
} from '@woocommerce/data';
import { recordEvent } from '@woocommerce/tracks';
import { useContext, useEffect, useState } from '@wordpress/element';
@@ -26,6 +29,7 @@ import {
Card,
CardBody,
ToggleControl,
+ RadioControl,
} from '@wordpress/components';
/**
@@ -37,6 +41,7 @@ import { ProductSectionLayout } from '../layout/product-section-layout';
import { ADMIN_URL } from '../../utils/admin-settings';
import { CurrencyContext } from '../../lib/currency-context';
import { useProductHelper } from '../use-product-helper';
+import { STANDARD_RATE_TAX_CLASS_SLUG } from '../constants';
const PRODUCT_SCHEDULED_SALE_SLUG = 'product-scheduled-sale';
@@ -48,18 +53,34 @@ export const PricingSection: React.FC = () => {
useState( false );
const [ autoToggledSaleSchedule, setAutoToggledSaleSchedule ] =
useState( false );
- const { isResolving: isTaxSettingsResolving, taxSettings } = useSelect(
+ const {
+ isResolving: isTaxSettingsResolving,
+ taxSettings,
+ taxesEnabled,
+ } = useSelect( ( select ) => {
+ const { getSettings, hasFinishedResolution } =
+ select( SETTINGS_STORE_NAME );
+ return {
+ isResolving: ! hasFinishedResolution( 'getSettings', [ 'tax' ] ),
+ taxSettings: getSettings( 'tax' ).tax || {},
+ taxesEnabled:
+ getSettings( 'general' )?.general?.woocommerce_calc_taxes ===
+ 'yes',
+ };
+ } );
+
+ const { isResolving: isTaxClassesResolving, taxClasses } = useSelect(
( select ) => {
- const { getSettings, hasFinishedResolution } =
- select( SETTINGS_STORE_NAME );
+ const { hasFinishedResolution, getTaxClasses } = select(
+ EXPERIMENTAL_TAX_CLASSES_STORE_NAME
+ );
return {
- isResolving: ! hasFinishedResolution( 'getSettings', [
- 'tax',
- ] ),
- taxSettings: getSettings( 'tax' ).tax || {},
+ isResolving: ! hasFinishedResolution( 'getTaxClasses' ),
+ taxClasses: getTaxClasses< TaxClass[] >(),
};
}
);
+
const pricesIncludeTax =
taxSettings.woocommerce_prices_include_tax === 'yes';
const context = useContext( CurrencyContext );
@@ -200,6 +221,22 @@ export const PricingSection: React.FC = () => {
dateTimeFormat: dateFormat,
};
+ const taxStatusProps = getInputProps( 'tax_status' );
+ // These properties cause issues with the RadioControl component.
+ // A fix to form upstream would help if we can identify what type of input is used.
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ delete taxStatusProps.checked;
+ delete taxStatusProps.value;
+
+ const taxClassProps = getInputProps( 'tax_class' );
+ // These properties cause issues with the RadioControl component.
+ // A fix to form upstream would help if we can identify what type of input is used.
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ delete taxClassProps.checked;
+ delete taxClassProps.value;
+
return (
{
) }
+
+ { taxesEnabled && (
+
+
+
+
+
+ { ! isTaxClassesResolving &&
+ taxClasses.length > 0 && (
+
+
+ { __(
+ 'Tax class',
+ 'woocommerce'
+ ) }
+
+
+ { interpolateComponents( {
+ mixedString: __(
+ 'Apply a tax rate if this product qualifies for tax reduction or exemption. {{link}}Learn more{{/link}}',
+ 'woocommerce'
+ ),
+ components: {
+ link: (
+
+ <>>
+
+ ),
+ },
+ } ) }
+
+ >
+ }
+ options={ taxClasses.map(
+ ( taxClass ) => ( {
+ label: taxClass.name,
+ value:
+ taxClass.slug ===
+ STANDARD_RATE_TAX_CLASS_SLUG
+ ? ''
+ : taxClass.slug,
+ } )
+ ) }
+ />
+ ) }
+
+
+
+ ) }
);
};
diff --git a/plugins/woocommerce/changelog/add-36164 b/plugins/woocommerce/changelog/add-36164
new file mode 100644
index 00000000000..7cf598709f9
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36164
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Include tax options in pricing section
From aca46fb7d10045e7f605c3bd238c22a6443d813a Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Fri, 6 Jan 2023 14:04:08 -0800
Subject: [PATCH 50/98] Dev/woo ext/components (#36328)
* Add woo components and lock wp scripts dep
* Add some example usage of Woo components
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
* Update packages/js/create-woo-extension/src/index.js.mustache
Co-authored-by: jonathansadowski
Co-authored-by: jonathansadowski
---
.../changelog/dev-woo-ext-components | 4 ++
packages/js/create-woo-extension/index.js | 8 ++-
.../src/index.js.mustache | 51 ++++++++++++++++++-
3 files changed, 60 insertions(+), 3 deletions(-)
create mode 100644 packages/js/create-woo-extension/changelog/dev-woo-ext-components
diff --git a/packages/js/create-woo-extension/changelog/dev-woo-ext-components b/packages/js/create-woo-extension/changelog/dev-woo-ext-components
new file mode 100644
index 00000000000..acf55a6444d
--- /dev/null
+++ b/packages/js/create-woo-extension/changelog/dev-woo-ext-components
@@ -0,0 +1,4 @@
+Significance: patch
+Type: add
+
+Add examples of Woo components package
diff --git a/packages/js/create-woo-extension/index.js b/packages/js/create-woo-extension/index.js
index 8f8f0c0a5d0..088a4835709 100644
--- a/packages/js/create-woo-extension/index.js
+++ b/packages/js/create-woo-extension/index.js
@@ -1,12 +1,16 @@
module.exports = {
templatesPath: __dirname,
defaultValues: {
- npmDependencies: [ '@wordpress/hooks', '@wordpress/i18n' ],
+ npmDependencies: [
+ '@wordpress/hooks',
+ '@wordpress/i18n',
+ '@woocommerce/components',
+ ],
npmDevDependencies: [
'@woocommerce/dependency-extraction-webpack-plugin',
'@woocommerce/eslint-plugin',
'@wordpress/prettier-config',
- '@wordpress/scripts',
+ '@wordpress/scripts@24.6.0',
],
namespace: 'extension',
license: 'GPL-3.0+',
diff --git a/packages/js/create-woo-extension/src/index.js.mustache b/packages/js/create-woo-extension/src/index.js.mustache
index f4ea611bfc8..521b2fae1a4 100644
--- a/packages/js/create-woo-extension/src/index.js.mustache
+++ b/packages/js/create-woo-extension/src/index.js.mustache
@@ -3,6 +3,9 @@
*/
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
+import { Dropdown } from '@wordpress/components';
+import * as Woo from '@woocommerce/components';
+import { Fragment } from '@wordpress/element';
/**
* Internal dependencies
@@ -10,7 +13,53 @@ import { __ } from '@wordpress/i18n';
import './index.scss';
const MyExamplePage = () => (
- { __( 'My Example Extension', '{{textdomain}}' ) }
+
+
+
+ setInlineSelect( items ) }
+ inlineTags
+ />
+
+
+
+
+ (
+
+ ) }
+ renderContent={ () => Dropdown content here
}
+ />
+
+
+
+
+
+ { __( 'Pill Shape Container', '{{textdomain}}' ) }
+
+
+
+
+
+ I am a spinner!
+
+
+
+
+
+
+
+
);
addFilter( 'woocommerce_admin_pages_list', '{{slug}}', ( pages ) => {
From 74768f4c56a956ed15ffcb952db169624b14ddb7 Mon Sep 17 00:00:00 2001
From: Lucio Giannotta
Date: Sun, 8 Jan 2023 20:02:17 +0100
Subject: [PATCH 51/98] Update WooCommerce Blocks to 9.1.4 (#36314)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This update removes compatibility of the “Products (Beta)” block from
WordPress versions below 6.1.
---
.../changelog/update-woocommerce-blocks-9.1.4 | 4 ++++
plugins/woocommerce/composer.json | 2 +-
plugins/woocommerce/composer.lock | 14 +++++++-------
3 files changed, 12 insertions(+), 8 deletions(-)
create mode 100644 plugins/woocommerce/changelog/update-woocommerce-blocks-9.1.4
diff --git a/plugins/woocommerce/changelog/update-woocommerce-blocks-9.1.4 b/plugins/woocommerce/changelog/update-woocommerce-blocks-9.1.4
new file mode 100644
index 00000000000..a6644966078
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-woocommerce-blocks-9.1.4
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Update WooCommerce Blocks to 9.1.4
diff --git a/plugins/woocommerce/composer.json b/plugins/woocommerce/composer.json
index a5c66e2a55f..973a2216fd2 100644
--- a/plugins/woocommerce/composer.json
+++ b/plugins/woocommerce/composer.json
@@ -21,7 +21,7 @@
"maxmind-db/reader": "^1.11",
"pelago/emogrifier": "^6.0",
"woocommerce/action-scheduler": "3.4.2",
- "woocommerce/woocommerce-blocks": "9.1.3"
+ "woocommerce/woocommerce-blocks": "9.1.4"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
diff --git a/plugins/woocommerce/composer.lock b/plugins/woocommerce/composer.lock
index 489d1160c49..d018bb3388d 100644
--- a/plugins/woocommerce/composer.lock
+++ b/plugins/woocommerce/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e07f604ec32eb59e76bf37b0126d4533",
+ "content-hash": "5d6aa45a4ccd532e09383828f396c06d",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@@ -628,16 +628,16 @@
},
{
"name": "woocommerce/woocommerce-blocks",
- "version": "v9.1.3",
+ "version": "v9.1.4",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-blocks.git",
- "reference": "6e49666a8270f395d15c6b58cd0c5ce111df5ecf"
+ "reference": "03d5efd33206aa11684dee2c493bbbe9a4e417c8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/6e49666a8270f395d15c6b58cd0c5ce111df5ecf",
- "reference": "6e49666a8270f395d15c6b58cd0c5ce111df5ecf",
+ "url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/03d5efd33206aa11684dee2c493bbbe9a4e417c8",
+ "reference": "03d5efd33206aa11684dee2c493bbbe9a4e417c8",
"shasum": ""
},
"require": {
@@ -683,9 +683,9 @@
],
"support": {
"issues": "https://github.com/woocommerce/woocommerce-blocks/issues",
- "source": "https://github.com/woocommerce/woocommerce-blocks/tree/v9.1.3"
+ "source": "https://github.com/woocommerce/woocommerce-blocks/tree/v9.1.4"
},
- "time": "2022-12-22T09:15:52+00:00"
+ "time": "2023-01-05T23:41:26+00:00"
}
],
"packages-dev": [
From b03cb80c0c98b02a9ff8d3ba30d8ac4665aadd7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9stor=20Soriano?=
Date: Mon, 9 Jan 2023 10:59:22 +0100
Subject: [PATCH 52/98] Fix: order refunds REST API endpoint reading from posts
table even with HPOS active (#36308)
Move HPOS-aware orders retrieval code from REST API v3 to v2.
This has two effects:
1. Make the /orders endpoint compatible with REST API v2 when HPOS
is active, additionally to v3 (v1 would require additional work).
2. Fix the /orders//refunds endpoints for v2 and v3, which was
retrieving data from the posts table even when HPOS active
The class hierarchy is: RefundsV3 extends RefundsV2 extends OrdersV2
and OrdersV3 extends OrdersV2.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
---
.../changelog/fix-rest-api-refunds-for-hpos | 4 +++
.../class-wc-rest-orders-v2-controller.php | 33 +++++++++++++++++--
.../class-wc-rest-orders-controller.php | 33 ++-----------------
3 files changed, 38 insertions(+), 32 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-rest-api-refunds-for-hpos
diff --git a/plugins/woocommerce/changelog/fix-rest-api-refunds-for-hpos b/plugins/woocommerce/changelog/fix-rest-api-refunds-for-hpos
new file mode 100644
index 00000000000..e6e45f39c4a
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-rest-api-refunds-for-hpos
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix REST API order refunds enpoint when HPOS is active, and make v2 orders endpoint compatible with HPOS
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
index 39cf28d7a59..9f49bb546c9 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php
@@ -8,10 +8,10 @@
* @since 2.6.0
*/
-use Automattic\WooCommerce\Utilities\OrderUtil;
-
defined( 'ABSPATH' ) || exit;
+use Automattic\WooCommerce\Utilities\OrderUtil;
+
// phpcs:disable Squiz.Classes.ClassFileName.NoMatch, Squiz.Classes.ValidClassName.NotCamelCaps -- Legacy class name, can't change without breaking backward compat.
/**
* REST API Orders controller class.
@@ -2000,4 +2000,33 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
return $params;
}
+
+ /**
+ * Get objects.
+ *
+ * @param array $query_args Query args.
+ * @return array
+ */
+ protected function get_objects( $query_args ) {
+ // Do not use WC_Order_Query for the CPT datastore.
+ if ( ! OrderUtil::custom_orders_table_usage_is_enabled() ) {
+ return parent::get_objects( $query_args );
+ }
+
+ $query = new \WC_Order_Query(
+ array_merge(
+ $query_args,
+ array(
+ 'paginate' => true,
+ )
+ )
+ );
+ $results = $query->get_orders();
+
+ return array(
+ 'objects' => $results->orders,
+ 'total' => $results->total,
+ 'pages' => $results->max_num_pages,
+ );
+ }
}
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
index e52856a4d4b..b594de2284f 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-orders-controller.php
@@ -158,6 +158,8 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
* The dynamic portion of the hook name, `$this->post_type`,
* refers to the object type slug.
*
+ * @since 7.4.0
+ *
* @param WC_Data $order Object object.
* @param WP_REST_Request $request Request object.
* @param bool $creating If is creating a new object.
@@ -244,7 +246,7 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
$cpt_hidden_keys = array();
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
- $cpt_hidden_keys = (new \WC_Order_Data_Store_CPT())->get_internal_meta_keys();
+ $cpt_hidden_keys = ( new \WC_Order_Data_Store_CPT() )->get_internal_meta_keys();
}
// XXX: This might be removed once we finalize the design for internal keys vs meta vs props in COT.
@@ -310,35 +312,6 @@ class WC_REST_Orders_Controller extends WC_REST_Orders_V2_Controller {
return $args;
}
- /**
- * Get objects.
- *
- * @param array $query_args Query args.
- * @return array
- */
- protected function get_objects( $query_args ) {
- // Do not use WC_Order_Query for the CPT datastore.
- if ( ! OrderUtil::custom_orders_table_usage_is_enabled() ) {
- return parent::get_objects( $query_args );
- }
-
- $query = new \WC_Order_Query(
- array_merge(
- $query_args,
- array(
- 'paginate' => true,
- )
- )
- );
- $results = $query->get_orders();
-
- return array(
- 'objects' => $results->orders,
- 'total' => $results->total,
- 'pages' => $results->max_num_pages,
- );
- }
-
/**
* Get the Order's schema, conforming to JSON Schema.
*
From af9389d50d0fda30bcde695e24a8c688cf981ece Mon Sep 17 00:00:00 2001
From: Alexandre Faustino
Date: Mon, 9 Jan 2023 10:52:41 +0000
Subject: [PATCH 53/98] Adds 2 new order status filters for bacs and cheque
email instructions (#35849)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Néstor Soriano
---
.../woocommerce/changelog/2023-01-05-09-16-47-168455 | 4 ++++
.../includes/gateways/bacs/class-wc-gateway-bacs.php | 10 ++++++++--
.../gateways/cheque/class-wc-gateway-cheque.php | 9 ++++++++-
3 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 plugins/woocommerce/changelog/2023-01-05-09-16-47-168455
diff --git a/plugins/woocommerce/changelog/2023-01-05-09-16-47-168455 b/plugins/woocommerce/changelog/2023-01-05-09-16-47-168455
new file mode 100644
index 00000000000..6a084e8bc3f
--- /dev/null
+++ b/plugins/woocommerce/changelog/2023-01-05-09-16-47-168455
@@ -0,0 +1,4 @@
+Significance: patch
+Type: enhancement
+
+Adds new order status filters for bacs and cheque email instructions.
diff --git a/plugins/woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php b/plugins/woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php
index 3d98230c900..9b593fb859d 100644
--- a/plugins/woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php
+++ b/plugins/woocommerce/includes/gateways/bacs/class-wc-gateway-bacs.php
@@ -259,8 +259,14 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
* @param bool $plain_text Email format: plain text or HTML.
*/
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
-
- if ( ! $sent_to_admin && 'bacs' === $order->get_payment_method() && $order->has_status( 'on-hold' ) ) {
+ /**
+ * Filter the email instructions order status.
+ *
+ * @since 7.4
+ * @param string $terms The order status.
+ * @param object $order The order object.
+ */
+ if ( ! $sent_to_admin && 'bacs' === $order->get_payment_method() && $order->has_status( apply_filters( 'woocommerce_bacs_email_instructions_order_status', 'on-hold', $order ) ) ) {
if ( $this->instructions ) {
echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) . PHP_EOL );
}
diff --git a/plugins/woocommerce/includes/gateways/cheque/class-wc-gateway-cheque.php b/plugins/woocommerce/includes/gateways/cheque/class-wc-gateway-cheque.php
index 7023a7fb6e8..022c2e3235d 100644
--- a/plugins/woocommerce/includes/gateways/cheque/class-wc-gateway-cheque.php
+++ b/plugins/woocommerce/includes/gateways/cheque/class-wc-gateway-cheque.php
@@ -102,7 +102,14 @@ class WC_Gateway_Cheque extends WC_Payment_Gateway {
* @param bool $plain_text Email format: plain text or HTML.
*/
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
- if ( $this->instructions && ! $sent_to_admin && 'cheque' === $order->get_payment_method() && $order->has_status( 'on-hold' ) ) {
+ /**
+ * Filter the email instructions order status.
+ *
+ * @since 7.4
+ * @param string $terms The order status.
+ * @param object $order The order object.
+ */
+ if ( $this->instructions && ! $sent_to_admin && 'cheque' === $order->get_payment_method() && $order->has_status( apply_filters( 'woocommerce_cheque_email_instructions_order_status', 'on-hold', $order ) ) ) {
echo wp_kses_post( wpautop( wptexturize( $this->instructions ) ) . PHP_EOL );
}
}
From 01e8a2029a022674676d5bc2ffafe623b59b0a78 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Mon, 9 Jan 2023 16:38:06 +0530
Subject: [PATCH 54/98] Make HPOS UX more consistent with posts (so that same
e2e tests passes). (#36282)
---
.../changelog/fix-order-edit-consistency | 4 ++
.../src/Internal/Admin/Orders/Edit.php | 68 ++++++++++++++++++-
.../Internal/Admin/Orders/PageController.php | 3 +-
3 files changed, 71 insertions(+), 4 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-order-edit-consistency
diff --git a/plugins/woocommerce/changelog/fix-order-edit-consistency b/plugins/woocommerce/changelog/fix-order-edit-consistency
new file mode 100644
index 00000000000..c4e9da59cf3
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-order-edit-consistency
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Make HPOS UX more consistent with posts UI (so that same e2e tests passes for both).
diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
index 9dc6553ca1e..c1df8e59130 100644
--- a/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
+++ b/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php
@@ -33,6 +33,20 @@ class Edit {
*/
private $order;
+ /**
+ * Action name that the form is currently handling. Could be new_order or edit_order.
+ *
+ * @var string
+ */
+ private $current_action;
+
+ /**
+ * Message to be displayed to the user. Index of message from the messages array registered when declaring shop_order post type.
+ *
+ * @var int
+ */
+ private $message;
+
/**
* Hooks all meta-boxes for order edit page. This is static since this may be called by post edit form rendering.
*
@@ -123,6 +137,15 @@ class Edit {
$this->enqueue_scripts();
}
+ /**
+ * Set the current action for the form.
+ *
+ * @param string $action Action name.
+ */
+ public function set_current_action( string $action ) {
+ $this->current_action = $action;
+ }
+
/**
* Hooks meta box for order specific meta.
*/
@@ -163,6 +186,9 @@ class Edit {
*/
do_action( 'woocommerce_process_shop_order_meta', $this->order->get_id(), $this->order );
+ // Order updated message.
+ $this->message = 1;
+
// Refresh the order from DB.
$this->order = wc_get_order( $this->order->get_id() );
$theorder = $this->order;
@@ -188,7 +214,39 @@ class Edit {
* Render order edit page.
*/
public function display() {
- $this->render_wrapper_start();
+ /**
+ * This is used by the order edit page to show messages in the notice fields.
+ * It should be similar to post_updated_messages filter, i.e.:
+ * array(
+ * {order_type} => array(
+ * 1 => 'Order updated.',
+ * 2 => 'Custom field updated.',
+ * ...
+ * ).
+ *
+ * The index to be displayed is computed from the $_GET['message'] variable.
+ *
+ * @since 7.4.0.
+ */
+ $messages = apply_filters( 'woocommerce_order_updated_messages', array() );
+
+ /**
+ * Backward compatibility for displaying messages using the post fields.
+ *
+ * @since 7.4.0. (Although available earlier by the posts based screen).
+ */
+ $messages = apply_filters( 'post_updated_messages', $messages );
+
+ $message = $this->message;
+ if ( isset( $_GET['message'] ) ) {
+ $message = absint( $_GET['message'] );
+ }
+
+ if ( isset( $message ) ) {
+ $message = $messages[ $this->order->get_type() ][ $message ] ?? false;
+ }
+
+ $this->render_wrapper_start( '', $message );
$this->render_meta_boxes();
$this->render_wrapper_end();
}
@@ -210,10 +268,14 @@ class Edit {
?>
- labels->edit_item ); ?>
+ current_action ? esc_html( $post_type->labels->add_new_item ) : esc_html( $post_type->labels->edit_item );
+ ?>
' . esc_html( $post_type->labels->add_new ) . '';
+ if ( 'edit_order' === $this->current_action ) {
+ echo '
' . esc_html( $post_type->labels->add_new ) . ' ';
+ }
?>
diff --git a/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php b/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php
index 16558b2b831..b2e93628844 100644
--- a/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php
+++ b/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php
@@ -211,6 +211,7 @@ class PageController {
$this->order_edit_form = new Edit();
$this->order_edit_form->setup( $this->order );
}
+ $this->order_edit_form->set_current_action( $this->current_action );
$this->order_edit_form->display();
break;
case 'list_orders':
@@ -285,7 +286,7 @@ class PageController {
$this->order = new $order_class_name();
$this->order->set_object_read( false );
- $this->order->set_status( 'auto-draft' );
+ $this->order->set_status( 'pending' );
$this->order->save();
$theorder = $this->order;
From 0f37590021c5c315c4afd0607b7de5ff7b742560 Mon Sep 17 00:00:00 2001
From: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Date: Mon, 9 Jan 2023 03:11:22 -0800
Subject: [PATCH 55/98] Validate Norweigan postcodes/rework code for 4-digit
post code validation (#36277)
Also gather countries that use four digit postcodes in one single case in the `switch` statement.
Co-authored-by: Stian
---
plugins/woocommerce/changelog/four-digit-postcodes | 4 ++++
.../woocommerce/includes/class-wc-validation.php | 13 ++++---------
2 files changed, 8 insertions(+), 9 deletions(-)
create mode 100644 plugins/woocommerce/changelog/four-digit-postcodes
diff --git a/plugins/woocommerce/changelog/four-digit-postcodes b/plugins/woocommerce/changelog/four-digit-postcodes
new file mode 100644
index 00000000000..9616e6d6f13
--- /dev/null
+++ b/plugins/woocommerce/changelog/four-digit-postcodes
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Validation of Norweigan postcodes has been added.
diff --git a/plugins/woocommerce/includes/class-wc-validation.php b/plugins/woocommerce/includes/class-wc-validation.php
index fed369ed25b..cc509dbf049 100644
--- a/plugins/woocommerce/includes/class-wc-validation.php
+++ b/plugins/woocommerce/includes/class-wc-validation.php
@@ -51,20 +51,18 @@ class WC_Validation {
switch ( $country ) {
case 'AT':
+ case 'BE':
+ case 'CH':
+ case 'HU':
+ case 'NO':
$valid = (bool) preg_match( '/^([0-9]{4})$/', $postcode );
break;
case 'BA':
$valid = (bool) preg_match( '/^([7-8]{1})([0-9]{4})$/', $postcode );
break;
- case 'BE':
- $valid = (bool) preg_match( '/^([0-9]{4})$/i', $postcode );
- break;
case 'BR':
$valid = (bool) preg_match( '/^([0-9]{5})([-])?([0-9]{3})$/', $postcode );
break;
- case 'CH':
- $valid = (bool) preg_match( '/^([0-9]{4})$/i', $postcode );
- break;
case 'DE':
$valid = (bool) preg_match( '/^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$/', $postcode );
break;
@@ -79,9 +77,6 @@ class WC_Validation {
case 'GB':
$valid = self::is_gb_postcode( $postcode );
break;
- case 'HU':
- $valid = (bool) preg_match( '/^([0-9]{4})$/i', $postcode );
- break;
case 'IE':
$valid = (bool) preg_match( '/([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}/', wc_normalize_postcode( $postcode ) );
break;
From 0774e0506a7dd53484e473ddd07305ec4b93fb52 Mon Sep 17 00:00:00 2001
From: Joris Van Steenberghe
Date: Mon, 9 Jan 2023 13:48:36 +0100
Subject: [PATCH 56/98] Make sure setting sort order of all variations takes
private variations into account (#32833)
---
.../includes/data-stores/class-wc-product-data-store-cpt.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php b/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php
index 8864155371f..6e780300bd4 100644
--- a/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php
+++ b/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php
@@ -1238,7 +1238,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
// phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery
$ids = $wpdb->get_col(
$wpdb->prepare(
- "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'product_variation' AND post_parent = %d AND post_status = 'publish' ORDER BY menu_order ASC, ID ASC",
+ "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'product_variation' AND post_parent = %d AND post_status in ( 'publish', 'private' ) ORDER BY menu_order ASC, ID ASC",
$parent_id
)
);
From 422b24770b473c71ece948f1d05aefa1a7c52bd7 Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Mon, 9 Jan 2023 05:36:54 -0800
Subject: [PATCH 57/98] Add workflow for bumping wp l-2 version support
(#36312)
---
.github/workflows/bump-wp-l-2-support.yml | 287 ++++++++++++++++++++++
1 file changed, 287 insertions(+)
create mode 100644 .github/workflows/bump-wp-l-2-support.yml
diff --git a/.github/workflows/bump-wp-l-2-support.yml b/.github/workflows/bump-wp-l-2-support.yml
new file mode 100644
index 00000000000..71ea90ad73e
--- /dev/null
+++ b/.github/workflows/bump-wp-l-2-support.yml
@@ -0,0 +1,287 @@
+name: Bump WP L-2 Support
+on:
+ workflow_dispatch:
+ inputs:
+ releaseBranch:
+ description: Provide the release branch you want to bump the WP L-2 support. Example release/6.9. Note that trunk will also be bumped to match.
+ default: ''
+ required: true
+
+permissions: {}
+
+env:
+ GIT_COMMITTER_NAME: 'WooCommerce Bot'
+ GIT_COMMITTER_EMAIL: 'no-reply@woocommerce.com'
+ GIT_AUTHOR_NAME: 'WooCommerce Bot'
+ GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
+
+jobs:
+ check-release-branch-exists:
+ name: Check for existence of release branch
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check for release branch
+ id: release-branch-check
+ uses: actions/github-script@v6
+ with:
+ script: |
+ // This will throw an error for non-200 responses, which prevents subsequent jobs from completing, as desired.
+ await github.request( 'GET /repos/{owner}/{repo}/branches/{branch}', {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ branch: '${{ inputs.releaseBranch }}',
+ } );
+
+ validate-bump:
+ name: Validate and bump WP L-2 support version
+ runs-on: ubuntu-20.04
+ needs: check-release-branch-exists
+ if: success()
+ permissions:
+ actions: write
+ contents: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Get latest WP version
+ id: latestWP
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const https = require( 'https' );
+
+ https.get( 'https://api.wordpress.org/core/stable-check/1.0/', ( resp ) => {
+ let data = '';
+
+ // A chunk of data has been received.
+ resp.on( 'data', ( chunk ) => {
+ data += chunk;
+ } );
+
+ // The whole response has been received. Print out the result.
+ resp.on( 'end', () => {
+ JSON.parse(data, ( key, val ) => {
+ if ( val === 'latest' ) {
+ core.setOutput( 'version', key )
+ }
+ } );
+ } );
+
+ } ).on( 'error', ( err ) => {
+ console.log( 'Error: ' + err.message );
+ } );
+
+ - name: Get L-2 WP version
+ id: l2Version
+ if: steps.latestWP.outputs.version != '' && steps.latestWP.outputs.version != null
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const version = "${{ steps.latestWP.outputs.version }}";
+ const latestWPVersionMajor = version.split( '.' )[0];
+ const latestWPVersionMinor = version.split( '.' )[1];
+ const l2 = (parseInt( ( latestWPVersionMajor + latestWPVersionMinor ), 10 ) - 2 ).toString();
+ const l2Major = l2.split( '' )[0];
+ const l2Minor = l2.split( '' )[1];
+ core.setOutput( 'version', l2Major + '.' + l2Minor );
+
+ - name: Git fetch the release branch
+ run: git fetch origin ${{ inputs.releaseBranch }}
+
+ - name: Checkout release branch
+ run: git checkout ${{ inputs.releaseBranch }}
+
+ - name: Create a PR branch based on release branch
+ run: git checkout -b WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}
+
+ - name: Check if WP L-2 support needs to be bumped the release branch
+ id: readmeWPVersion
+ if: steps.l2Version.outputs.version != '' && steps.l2Version.outputs.version != null
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const fs = require( 'node:fs' );
+ const l2Version = "${{ steps.l2Version.outputs.version }}";
+ let readme = '';
+
+ fs.readFile( './plugins/woocommerce/readme.txt', 'utf-8', function( err, data ) {
+ if ( err ) {
+ console.error( err );
+ }
+
+ readme = data.split( "\n" );
+ const newReadme = [];
+ let needsChange = false;
+
+ for ( const line of readme ) {
+ if ( line.match( /Requires\sat\sleast:\s\d+\.\d/ ) ) {
+ const readmeVersion = line.match( /\d+\.\d/ );
+
+ // If the versions don't match, means we need to make a change.
+ if ( readmeVersion != l2Version ) {
+ needsChange = true;
+
+ newReadme.push( 'Requires at least: ' + l2Version );
+ continue;
+ }
+ }
+
+ newReadme.push( line );
+ }
+
+ if ( needsChange ) {
+ fs.writeFile( './plugins/woocommerce/readme.txt', newReadme.join( "\n" ), err => {
+ if ( err ) {
+ core.setFailed( `Unable to bump the WP L-2 support version. ${err}` );
+ }
+
+ core.setOutput( 'needsChange', needsChange );
+
+ // Copy the readme.txt file to the root of VM to be used later.
+ fs.writeFile( '../../readme.txt', newReadme.join( "\n" ), err => {
+ if ( err ) {
+ core.setFailed( `Unable to copy the readme.txt file to the root of VM. ${err}` );
+ }
+ } );
+ } );
+ } else {
+ core.setFailed( 'No changes needed. WP Version is L-2 compatible.' );
+ }
+ } );
+
+ - name: Commit changes
+ if: steps.readmeWPVersion.outputs.needsChange == 'true'
+ run: git commit --no-verify -am "Update readme.txt WP L-2 support version."
+
+ - name: Push changes
+ if: steps.readmeWPVersion.outputs.needsChange == 'true'
+ run: git push origin WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}
+
+ - name: Push the PR up to GitHub
+ id: release-branch-pr
+ if: steps.readmeWPVersion.outputs.needsChange == 'true'
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const PRBody = "This PR bumps the WP version to L-2 compatible for the release branch ${{ inputs.releaseBranch }}.\n";
+
+ const pr = await github.rest.pulls.create( {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ title: "Bump WP Version to L-2 compatible for ${{ inputs.releaseBranch }}",
+ head: "WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }}",
+ base: "${{ inputs.releaseBranch }}",
+ body: PRBody
+ } );
+
+ if ( pr.status != 201 ) {
+ core.setFailed( "Unable to push WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/${{ inputs.releaseBranch }} to GitHub." );
+ }
+
+ core.setOutput( 'pr', pr.data.number );
+
+ await github.rest.pulls.requestReviewers( {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pr.data.number,
+ reviewers: [ context.actor ]
+ } );
+
+ - name: Checkout trunk branch
+ if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
+ run: git checkout trunk
+
+ - name: Create a branch based on trunk branch
+ if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
+ run: git checkout -b WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk
+
+ - name: Check if WP L-2 support needs to be bumped for trunk
+ id: readmeWPVersionTrunk
+ if: steps.release-branch-pr.outputs.pr != '' && steps.release-branch-pr.outputs.pr != null
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const fs = require( 'node:fs' );
+ const l2Version = "${{ steps.l2Version.outputs.version }}";
+ let readme = '';
+
+ fs.readFile( './plugins/woocommerce/readme.txt', 'utf-8', function( err, data ) {
+ if ( err ) {
+ console.error( err );
+ }
+
+ readme = data.split( "\n" );
+ const newReadme = [];
+ let needsChange = false;
+
+ for ( const line of readme ) {
+ if ( line.match( /Requires\sat\sleast:\s\d+\.\d/ ) ) {
+ const readmeVersion = line.match( /\d+\.\d/ );
+
+ // If the versions don't match, means we need to make a change.
+ if ( readmeVersion != l2Version ) {
+ needsChange = true;
+
+ newReadme.push( 'Requires at least: ' + l2Version );
+ continue;
+ }
+ }
+
+ newReadme.push( line );
+ }
+
+ if ( needsChange ) {
+ fs.writeFile( './plugins/woocommerce/readme.txt', newReadme.join( "\n" ), err => {
+ if ( err ) {
+ core.setFailed( `Unable to bump the WP L-2 support version. ${err}` );
+ }
+
+ core.setOutput( 'needsChange', needsChange );
+
+ // Copy the readme.txt file to the root of VM to be used later.
+ fs.writeFile( '../../readme.txt', newReadme.join( "\n" ), err => {
+ if ( err ) {
+ core.setFailed( `Unable to copy the readme.txt file to the root of VM. ${err}` );
+ }
+ } );
+ } );
+ } else {
+ core.setFailed( 'No changes needed. WP Version is L-2 compatible.' );
+ }
+ } );
+
+ - name: Commit changes
+ if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
+ run: git commit --no-verify -am "Update readme.txt WP L-2 support version."
+
+ - name: Push changes
+ if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
+ run: git push origin WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk
+
+ - name: Push the PR up to GitHub
+ if: steps.readmeWPVersionTrunk.outputs.needsChange == 'true'
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const PRBody = "This PR bumps the WP version to L-2 compatible for trunk.\n";
+
+ const pr = await github.rest.pulls.create( {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ title: "Bump WP Version to L-2 compatible for trunk",
+ head: "WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk",
+ base: "trunk",
+ body: PRBody
+ } );
+
+ if ( pr.status != 201 ) {
+ core.setFailed( "Unable to push WP-L-2-version-support-${{ steps.l2Version.outputs.version }}/trunk to GitHub." );
+ }
+
+ await github.rest.pulls.requestReviewers( {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: pr.data.number,
+ reviewers: [ context.actor ]
+ } );
From a1ce90b306efb20424b571d871def248f491234b Mon Sep 17 00:00:00 2001
From: barryhughes <3594411+barryhughes@users.noreply.github.com>
Date: Mon, 9 Jan 2023 10:05:26 -0800
Subject: [PATCH 58/98] Changelog.
---
.../woocommerce/changelog/joris-36343-variation-sort-order | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/joris-36343-variation-sort-order
diff --git a/plugins/woocommerce/changelog/joris-36343-variation-sort-order b/plugins/woocommerce/changelog/joris-36343-variation-sort-order
new file mode 100644
index 00000000000..dbfacafe943
--- /dev/null
+++ b/plugins/woocommerce/changelog/joris-36343-variation-sort-order
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Ensures product variation sort order is correctly persisted.
From 929fd09fb623d927a6655c1d25069bc52b6452dc Mon Sep 17 00:00:00 2001
From: Roy Ho
Date: Mon, 9 Jan 2023 12:43:33 -0800
Subject: [PATCH 59/98] Add permissions to issues endpoint (#36344)
---
.github/workflows/community-label.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml
index 979add9fe55..b4d772af526 100644
--- a/.github/workflows/community-label.yml
+++ b/.github/workflows/community-label.yml
@@ -19,6 +19,7 @@ jobs:
permissions:
contents: read
pull-requests: write
+ issues: write
steps:
- uses: actions/checkout@v3
From 301182fc8aaefd9f3bb7f9ae653ee629539e2b81 Mon Sep 17 00:00:00 2001
From: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Date: Tue, 10 Jan 2023 00:49:59 -0800
Subject: [PATCH 60/98] When product is sold individually, hide quantity
selector (#36350)
---
.../changelog/fix-36007-sold-individually | 4 ++++
.../woocommerce/client/legacy/css/_common.scss | 8 ++++++++
.../client/legacy/css/twenty-nineteen.scss | 1 +
.../client/legacy/css/twenty-seventeen.scss | 1 +
.../client/legacy/css/twenty-twenty-one.scss | 1 +
.../client/legacy/css/twenty-twenty-three.scss | 17 +++++++++--------
.../client/legacy/css/twenty-twenty-two.scss | 1 +
.../client/legacy/css/twenty-twenty.scss | 1 +
.../legacy/css/woocommerce-blocktheme.scss | 1 +
.../client/legacy/css/woocommerce.scss | 1 +
10 files changed, 28 insertions(+), 8 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-36007-sold-individually
create mode 100644 plugins/woocommerce/client/legacy/css/_common.scss
diff --git a/plugins/woocommerce/changelog/fix-36007-sold-individually b/plugins/woocommerce/changelog/fix-36007-sold-individually
new file mode 100644
index 00000000000..727cdd0ccc2
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36007-sold-individually
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+By default, hide the quantity selector within the single product page if a product is sold individually.
diff --git a/plugins/woocommerce/client/legacy/css/_common.scss b/plugins/woocommerce/client/legacy/css/_common.scss
new file mode 100644
index 00000000000..1d645c1e305
--- /dev/null
+++ b/plugins/woocommerce/client/legacy/css/_common.scss
@@ -0,0 +1,8 @@
+/**
+ * Contains rules common to all supported frontend themes.
+ */
+
+/* We do not wish to display the quantity selector (within single product pages) if the product is sold individually. */
+.woocommerce.single-product .product.sold-individually input[name="quantity"] {
+ display: none;
+}
diff --git a/plugins/woocommerce/client/legacy/css/twenty-nineteen.scss b/plugins/woocommerce/client/legacy/css/twenty-nineteen.scss
index fd257184f74..41630ae0b43 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-nineteen.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-nineteen.scss
@@ -1,3 +1,4 @@
+@import "common";
@import 'mixins';
/**
diff --git a/plugins/woocommerce/client/legacy/css/twenty-seventeen.scss b/plugins/woocommerce/client/legacy/css/twenty-seventeen.scss
index f2c0af5bb9f..7e77f25c820 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-seventeen.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-seventeen.scss
@@ -1,6 +1,7 @@
/**
* Twenty Seventeen integration styles
*/
+@import "common";
@import "mixins";
@import "animation";
diff --git a/plugins/woocommerce/client/legacy/css/twenty-twenty-one.scss b/plugins/woocommerce/client/legacy/css/twenty-twenty-one.scss
index 199deae3fc8..e7bbab55a2f 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-twenty-one.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-twenty-one.scss
@@ -1,3 +1,4 @@
+@import "common";
@import "mixins";
/**
diff --git a/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss b/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss
index d33508ed3bd..6c6a8fa48d9 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-twenty-three.scss
@@ -25,6 +25,7 @@
font-style: normal;
}
+@import "common";
@import "mixins";
@import "animation";
@@ -1130,7 +1131,7 @@
list-style: none;
font-size: var( --wp--preset--font-size--small );
display: flow-root;
-
+
&[role='alert']::before {
background: #d5d5d5;
color: black;
@@ -1140,10 +1141,10 @@
padding-right: 3px;
margin-right: 1rem;
}
-
+
a {
color: var( --wp--preset--color--contrast );
-
+
.button {
margin-top: -0.5rem;
border: none;
@@ -1151,24 +1152,24 @@
}
}
}
-
+
.woocommerce-error[role='alert'] {
margin: 0;
-
+
&::before {
content: 'X';
padding-right: 4px;
padding-left: 4px;
}
-
+
li {
display: inline-block;
}
}
-
+
.woocommerce-message {
&[role='alert']::before {
content: '\2713';
}
}
-
+
diff --git a/plugins/woocommerce/client/legacy/css/twenty-twenty-two.scss b/plugins/woocommerce/client/legacy/css/twenty-twenty-two.scss
index 3105e01ce15..7a54fe2318d 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-twenty-two.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-twenty-two.scss
@@ -25,6 +25,7 @@
font-style: normal;
}
+@import "common";
@import "mixins";
@import "animation";
@import "variables";
diff --git a/plugins/woocommerce/client/legacy/css/twenty-twenty.scss b/plugins/woocommerce/client/legacy/css/twenty-twenty.scss
index 6f91033da6c..0e758990c06 100644
--- a/plugins/woocommerce/client/legacy/css/twenty-twenty.scss
+++ b/plugins/woocommerce/client/legacy/css/twenty-twenty.scss
@@ -1,3 +1,4 @@
+@import "common";
@import "mixins";
/**
diff --git a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss
index 1701887309a..41b17b64088 100644
--- a/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss
+++ b/plugins/woocommerce/client/legacy/css/woocommerce-blocktheme.scss
@@ -2,6 +2,7 @@
* woocommerce-blocktheme.scss
* Block theme default styles to ensure WooCommerce looks better out of the box with block themes that are not optimised for WooCommerce specifically.
*/
+@import "common";
@import "fonts";
@import "variables";
diff --git a/plugins/woocommerce/client/legacy/css/woocommerce.scss b/plugins/woocommerce/client/legacy/css/woocommerce.scss
index efa4f5432d6..9b475942929 100644
--- a/plugins/woocommerce/client/legacy/css/woocommerce.scss
+++ b/plugins/woocommerce/client/legacy/css/woocommerce.scss
@@ -7,6 +7,7 @@
/**
* Imports
*/
+@import "common";
@import "mixins";
@import "variables";
@import "animation";
From 4927a2e41203b0f84692e46ca082fdb1d3040d4c Mon Sep 17 00:00:00 2001
From: RJ <27843274+rjchow@users.noreply.github.com>
Date: Tue, 10 Jan 2023 19:12:22 +0800
Subject: [PATCH 61/98] dev: migrate @woocommerce/components/link to ts
(#36285)
---
.../components/changelog/dev-migrate-link-ts | 4 +
packages/js/components/src/index.ts | 2 +-
packages/js/components/src/link/index.js | 77 ---------------
packages/js/components/src/link/index.tsx | 94 +++++++++++++++++++
.../src/link/stories/{index.js => index.tsx} | 3 +-
.../src/link/test/{index.js => index.tsx} | 10 +-
6 files changed, 107 insertions(+), 83 deletions(-)
create mode 100644 packages/js/components/changelog/dev-migrate-link-ts
delete mode 100644 packages/js/components/src/link/index.js
create mode 100644 packages/js/components/src/link/index.tsx
rename packages/js/components/src/link/stories/{index.js => index.tsx} (95%)
rename packages/js/components/src/link/test/{index.js => index.tsx} (92%)
diff --git a/packages/js/components/changelog/dev-migrate-link-ts b/packages/js/components/changelog/dev-migrate-link-ts
new file mode 100644
index 00000000000..774c442e98f
--- /dev/null
+++ b/packages/js/components/changelog/dev-migrate-link-ts
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Migrate Link component to TS
\ No newline at end of file
diff --git a/packages/js/components/src/index.ts b/packages/js/components/src/index.ts
index f19e35f5a5e..17c970dfb2c 100644
--- a/packages/js/components/src/index.ts
+++ b/packages/js/components/src/index.ts
@@ -21,7 +21,7 @@ export { default as FilterPicker } from './filter-picker';
export { H, Section } from './section';
export { ImageGallery, ImageGalleryItem } from './image-gallery';
export { default as ImageUpload } from './image-upload';
-export { default as Link } from './link';
+export { Link } from './link';
export { default as List } from './list';
export { MediaUploader } from './media-uploader';
export { default as MenuItem } from './ellipsis-menu/menu-item';
diff --git a/packages/js/components/src/link/index.js b/packages/js/components/src/link/index.js
deleted file mode 100644
index 50cf32b1064..00000000000
--- a/packages/js/components/src/link/index.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * External dependencies
- */
-import PropTypes from 'prop-types';
-import { partial } from 'lodash';
-import { createElement } from '@wordpress/element';
-import { getHistory } from '@woocommerce/navigation';
-
-/**
- * Use `Link` to create a link to another resource. It accepts a type to automatically
- * create wp-admin links, wc-admin links, and external links.
- */
-
-function Link( { children, href, type, ...props } ) {
- // @todo Investigate further if we can use directly.
- // With React Router 5+, cannot be used outside of the main elements,
- // which seems to include components imported from @woocommerce/components. For now, we can use the history object directly.
- const wcAdminLinkHandler = ( onClick, event ) => {
- // If cmd, ctrl, alt, or shift are used, use default behavior to allow opening in a new tab.
- if (
- event.ctrlKey ||
- event.metaKey ||
- event.altKey ||
- event.shiftKey
- ) {
- return;
- }
-
- event.preventDefault();
-
- // If there is an onclick event, execute it.
- const onClickResult = onClick ? onClick( event ) : true;
-
- // Mimic browser behavior and only continue if onClickResult is not explicitly false.
- if ( onClickResult === false ) {
- return;
- }
-
- getHistory().push( event.target.closest( 'a' ).getAttribute( 'href' ) );
- };
-
- const passProps = {
- ...props,
- 'data-link-type': type,
- };
-
- if ( type === 'wc-admin' ) {
- passProps.onClick = partial( wcAdminLinkHandler, passProps.onClick );
- }
-
- return (
-
- { children }
-
- );
-}
-
-Link.propTypes = {
- /**
- * The resource to link to.
- */
- href: PropTypes.string.isRequired,
- /**
- * Type of link. For wp-admin and wc-admin, the correct prefix is appended.
- */
- type: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] ).isRequired,
-};
-
-Link.defaultProps = {
- type: 'wc-admin',
-};
-
-Link.contextTypes = {
- router: PropTypes.object,
-};
-
-export default Link;
diff --git a/packages/js/components/src/link/index.tsx b/packages/js/components/src/link/index.tsx
new file mode 100644
index 00000000000..79f5aba23b4
--- /dev/null
+++ b/packages/js/components/src/link/index.tsx
@@ -0,0 +1,94 @@
+/**
+ * External dependencies
+ */
+import PropTypes from 'prop-types';
+import { partial } from 'lodash';
+import { createElement } from '@wordpress/element';
+import { getHistory } from '@woocommerce/navigation';
+import React from 'react';
+
+interface LinkProps {
+ /** Type of link. For wp-admin and wc-admin, the correct prefix is appended. */
+ type?: 'wc-admin' | 'wp-admin' | 'external';
+ /** The resource to link to. */
+ href: string;
+}
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+type LinkOnClickHandlerFunction = ( ...props: any ) => any; // we don't want to restrict this function at all
+type LinkOnclickHandler = (
+ onClick: LinkOnClickHandlerFunction | undefined,
+ event: React.MouseEvent< Element > | undefined
+) => void;
+
+/**
+ * Use `Link` to create a link to another resource. It accepts a type to automatically
+ * create wp-admin links, wc-admin links, and external links.
+ */
+export const Link = ( {
+ href,
+ children,
+ type = 'wc-admin',
+ ...props
+}: React.AnchorHTMLAttributes< HTMLAnchorElement > &
+ LinkProps ): React.ReactElement => {
+ // ( { children, href, type, ...props } ) => {
+ // @todo Investigate further if we can use directly.
+ // With React Router 5+, cannot be used outside of the main elements,
+ // which seems to include components imported from @woocommerce/components. For now, we can use the history object directly.
+ const wcAdminLinkHandler: LinkOnclickHandler = ( onClick, event ) => {
+ // If cmd, ctrl, alt, or shift are used, use default behavior to allow opening in a new tab.
+ if (
+ event?.ctrlKey ||
+ event?.metaKey ||
+ event?.altKey ||
+ event?.shiftKey
+ ) {
+ return;
+ }
+
+ event?.preventDefault();
+
+ // If there is an onclick event, execute it.
+ const onClickResult = onClick && event ? onClick( event ) : true;
+
+ // Mimic browser behavior and only continue if onClickResult is not explicitly false.
+ if ( onClickResult === false ) {
+ return;
+ }
+
+ if ( event?.target instanceof Element ) {
+ const closestEventTarget = event.target
+ .closest( 'a' )
+ ?.getAttribute( 'href' );
+ if ( closestEventTarget ) {
+ getHistory().push( closestEventTarget );
+ } else {
+ // eslint-disable-next-line no-console
+ console.error(
+ '@woocommerce/components/link is trying to push an undefined state into navigation stack'
+ ); // This shouldn't happen as we wrap with below
+ }
+ }
+ };
+
+ const passProps = {
+ ...props,
+ 'data-link-type': type,
+ };
+
+ if ( type === 'wc-admin' ) {
+ passProps.onClick = partial( wcAdminLinkHandler, passProps.onClick );
+ }
+
+ return (
+
+ { children }
+
+ );
+};
+
+Link.contextTypes = {
+ router: PropTypes.object,
+};
+
+export default Link;
diff --git a/packages/js/components/src/link/stories/index.js b/packages/js/components/src/link/stories/index.tsx
similarity index 95%
rename from packages/js/components/src/link/stories/index.js
rename to packages/js/components/src/link/stories/index.tsx
index b3ca2a03af0..dc048043a2a 100644
--- a/packages/js/components/src/link/stories/index.js
+++ b/packages/js/components/src/link/stories/index.tsx
@@ -3,11 +3,12 @@
*/
import { withConsole } from '@storybook/addon-console';
import { createElement } from '@wordpress/element';
+import React from 'react';
/**
* Internal dependencies
*/
-import Link from '../';
+import Link from '..';
function logLinkClick( event ) {
const a = event.currentTarget;
diff --git a/packages/js/components/src/link/test/index.js b/packages/js/components/src/link/test/index.tsx
similarity index 92%
rename from packages/js/components/src/link/test/index.js
rename to packages/js/components/src/link/test/index.tsx
index d5d54b9b42d..c800ed0c789 100644
--- a/packages/js/components/src/link/test/index.js
+++ b/packages/js/components/src/link/test/index.tsx
@@ -1,13 +1,13 @@
/**
* External dependencies
*/
-import { fireEvent, render } from '@testing-library/react';
+import { render, screen, fireEvent } from '@testing-library/react';
import { createElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import Link from '../index';
+import { Link } from '..';
describe( 'Link', () => {
it( 'should render `external` links', () => {
@@ -112,7 +112,7 @@ describe( 'Link', () => {
return false;
} );
- const { container } = render(
+ render(
{
);
- fireEvent.click( container.firstChild );
+ const testLink = screen.getByText( 'WooCommerce.com' );
+
+ fireEvent.click( testLink );
expect( clickHandler ).toHaveBeenCalled();
} );
From 1d234b5ac017ca0c43e87cbf5eb613656ab697db Mon Sep 17 00:00:00 2001
From: Rodrigo Primo
Date: Tue, 10 Jan 2023 13:13:49 -0300
Subject: [PATCH 62/98] Update TaskLists::add_task() to reflect changes in
TaskList::add_task() (#36104)
* Update TaskLists::add_task() to reflect changes in TaskList::add_task()
In
https://github.com/woocommerce/woocommerce/commit/8ff08ea0c96833e58564590bdb5ca4584f1d49c2#diff-061f664bd417ad78d47c53ad5e6cc7e2eb1243af4e55b6fbf68750225acb06a3R173
`TaskList::add_task()` was refactored to receive an instance of `Task`
instead of an `array` as its first parameter.
This commit updates `TaskLists::add_task()` (easy to miss that it is a
different method as the only difference is the plural in the class
name) to reflect the changes from the commit mentioned above. It
updates the type of the second parameter from `array` to `Task` and
renames the parameter from `$args` to `$task`.
I found this while using `TaskLists::add_task()` to add a MailPoet task
as our PHPStan checks complained that I was passing the wrong parameter
to this WooCommerce method.
* Add missing changelog file
---
plugins/woocommerce/changelog/update-tasklists-addtask | 4 ++++
.../src/Admin/Features/OnboardingTasks/TaskLists.php | 7 ++++---
2 files changed, 8 insertions(+), 3 deletions(-)
create mode 100644 plugins/woocommerce/changelog/update-tasklists-addtask
diff --git a/plugins/woocommerce/changelog/update-tasklists-addtask b/plugins/woocommerce/changelog/update-tasklists-addtask
new file mode 100644
index 00000000000..c1f178b56fc
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-tasklists-addtask
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Update TaskLists::add_task() to reflect changes in TaskList::add_task()
diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php
index ab81e5c0983..b374bd9d760 100644
--- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php
+++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php
@@ -288,10 +288,11 @@ class TaskLists {
* Add task to a given task list.
*
* @param string $list_id List ID to add the task to.
- * @param array $args Task properties.
+ * @param Task $task Task object.
+ *
* @return \WP_Error|Task
*/
- public static function add_task( $list_id, $args ) {
+ public static function add_task( $list_id, $task ) {
if ( ! isset( self::$lists[ $list_id ] ) ) {
return new \WP_Error(
'woocommerce_task_list_invalid_list',
@@ -299,7 +300,7 @@ class TaskLists {
);
}
- self::$lists[ $list_id ]->add_task( $args );
+ self::$lists[ $list_id ]->add_task( $task );
}
/**
From c6e1fb767e5d412fea96307d7fe40813fccba610 Mon Sep 17 00:00:00 2001
From: Shani
Date: Tue, 10 Jan 2023 13:09:05 -0500
Subject: [PATCH 63/98] Update README to add slack link and update issue
submission denial language (#36347)
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8fef4f3d463..a16ac1fbde5 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,10 @@ This repository is not suitable for support. Please don't use our issue tracker
* [The Official WooCommerce Facebook Group](https://www.facebook.com/groups/advanced.woocommerce).
* For customizations, you may want to check our list of [WooExperts](https://woocommerce.com/experts/) or [Codeable](https://codeable.io/).
-Support requests in issues on this repository will be closed on sight.
+NOTE: Unfortunately, we are unable to honor support requests in issues on this repository; as a result, any requests submitted in this manner will be closed.
+
+## Community
+For peer to peer support, real-time announcements, and office hours, please [join our slack community](https://woocommerce.com/community-slack/)!
## Contributing to WooCommerce
If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our [contributor guidelines](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md) for more information on how you can do this.
From f429b9444c44d994f0913bdf77e78781880c92cb Mon Sep 17 00:00:00 2001
From: Joel Thiessen <444632+joelclimbsthings@users.noreply.github.com>
Date: Tue, 10 Jan 2023 10:13:02 -0800
Subject: [PATCH 64/98] Adding WooProductFieldItem slotfill (#36315)
---
.../changelog/add-36014-mvp-field-slot | 4 +
packages/js/components/src/index.ts | 2 +
packages/js/components/src/utils.tsx | 43 +++++++
.../src/woo-product-field-item/README.md | 42 +++++++
.../src/woo-product-field-item/index.ts | 1 +
.../woo-product-field-item.tsx | 58 +++++++++
.../products/layout/product-field-layout.tsx | 31 -----
.../layout/product-section-layout.scss | 2 +-
.../layout/product-section-layout.tsx | 8 +-
.../layout/test/product-field-layout.test.tsx | 115 ------------------
.../test/product-section-layout.test.tsx | 27 +---
.../layout/woo-product-field-item.tsx | 79 ------------
.../sections/product-details-section.tsx | 2 +
.../changelog/add-36014-mvp-field-slot | 4 +
14 files changed, 161 insertions(+), 257 deletions(-)
create mode 100644 packages/js/components/changelog/add-36014-mvp-field-slot
create mode 100644 packages/js/components/src/utils.tsx
create mode 100644 packages/js/components/src/woo-product-field-item/README.md
create mode 100644 packages/js/components/src/woo-product-field-item/index.ts
create mode 100644 packages/js/components/src/woo-product-field-item/woo-product-field-item.tsx
delete mode 100644 plugins/woocommerce-admin/client/products/layout/product-field-layout.tsx
delete mode 100644 plugins/woocommerce-admin/client/products/layout/test/product-field-layout.test.tsx
delete mode 100644 plugins/woocommerce-admin/client/products/layout/woo-product-field-item.tsx
create mode 100644 plugins/woocommerce/changelog/add-36014-mvp-field-slot
diff --git a/packages/js/components/changelog/add-36014-mvp-field-slot b/packages/js/components/changelog/add-36014-mvp-field-slot
new file mode 100644
index 00000000000..d4ba7a6730e
--- /dev/null
+++ b/packages/js/components/changelog/add-36014-mvp-field-slot
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Adding WooProductFieldItem slotfill.
diff --git a/packages/js/components/src/index.ts b/packages/js/components/src/index.ts
index 17c970dfb2c..04fcd9c09e6 100644
--- a/packages/js/components/src/index.ts
+++ b/packages/js/components/src/index.ts
@@ -84,3 +84,5 @@ export { DynamicForm } from './dynamic-form';
export { default as TourKit } from './tour-kit';
export * as TourKitTypes from './tour-kit/types';
export { CollapsibleContent } from './collapsible-content';
+export { createOrderedChildren, sortFillsByOrder } from './utils';
+export { WooProductFieldItem as __experimentalWooProductFieldItem } from './woo-product-field-item';
diff --git a/packages/js/components/src/utils.tsx b/packages/js/components/src/utils.tsx
new file mode 100644
index 00000000000..682a1a0aded
--- /dev/null
+++ b/packages/js/components/src/utils.tsx
@@ -0,0 +1,43 @@
+/**
+ * External dependencies
+ */
+import React, { isValidElement, Fragment } from 'react';
+import { Slot, Fill } from '@wordpress/components';
+import { cloneElement, createElement } from '@wordpress/element';
+
+/**
+ * Ordered fill item.
+ *
+ * @param {Node} children - Node children.
+ * @param {number} order - Node order.
+ * @param {Array} props - Fill props.
+ * @return {Node} Node.
+ */
+function createOrderedChildren< T = Fill.Props >(
+ children: React.ReactNode,
+ order: number,
+ props: T
+) {
+ if ( typeof children === 'function' ) {
+ return cloneElement( children( props ), { order } );
+ } else if ( isValidElement( children ) ) {
+ return cloneElement( children, { ...props, order } );
+ }
+ throw Error( 'Invalid children type' );
+}
+export { createOrderedChildren };
+
+/**
+ * Sort fills by order for slot children.
+ *
+ * @param {Array} fills - slot's `Fill`s.
+ * @return {Node} Node.
+ */
+export const sortFillsByOrder: Slot.Props[ 'children' ] = ( fills ) => {
+ // Copy fills array here because its type is readonly array that doesn't have .sort method in Typescript definition.
+ const sortedFills = [ ...fills ].sort( ( a, b ) => {
+ return a[ 0 ].props.order - b[ 0 ].props.order;
+ } );
+
+ return { sortedFills } ;
+};
diff --git a/packages/js/components/src/woo-product-field-item/README.md b/packages/js/components/src/woo-product-field-item/README.md
new file mode 100644
index 00000000000..075a679ad08
--- /dev/null
+++ b/packages/js/components/src/woo-product-field-item/README.md
@@ -0,0 +1,42 @@
+# WooProductFieldItem Slot & Fill
+
+A Slotfill component that will allow you to add a new field to a specific section in the product editor.
+
+## Usage
+
+```jsx
+
+ { () => {
+ return (
+ console.debug( 'Changed!' ) }
+ />
+ );
+} }
+
+
+
+```
+
+### WooProductFieldItem (fill)
+
+This is the fill component. You must provide the `id` prop to identify your product field fill with a unique string. This component will accept a series of props:
+
+| Prop | Type | Description |
+| -------------| -------- | ------------------------------------------------------------------------------------------------------------------------ |
+| `id` | String | A unique string to identify your fill. Used for configuiration management. |
+| `section ` | String | The string used to identify the particular section where you want to render your field. |
+| `pluginId` | String | A unique plugin ID to identify the plugin/extension that this fill is associated with. |
+| `order` | Number | (optional) This number will dictate the order that the fields rendered by a Slot will be appear. |
+
+### WooProductFieldItem.Slot (slot)
+
+This is the slot component, and will not be used as frequently. It must also receive the required `location` prop that will be identical to the fill `location`.
+
+| Name | Type | Description |
+| ----------- | ------ | ---------------------------------------------------------------------------------------------------- |
+| `section` | String | Unique to the section that the Slot appears, and must be the same as the one provided to any fills. |
diff --git a/packages/js/components/src/woo-product-field-item/index.ts b/packages/js/components/src/woo-product-field-item/index.ts
new file mode 100644
index 00000000000..0aab6c8997b
--- /dev/null
+++ b/packages/js/components/src/woo-product-field-item/index.ts
@@ -0,0 +1 @@
+export * from './woo-product-field-item';
diff --git a/packages/js/components/src/woo-product-field-item/woo-product-field-item.tsx b/packages/js/components/src/woo-product-field-item/woo-product-field-item.tsx
new file mode 100644
index 00000000000..93bbf4c066d
--- /dev/null
+++ b/packages/js/components/src/woo-product-field-item/woo-product-field-item.tsx
@@ -0,0 +1,58 @@
+/**
+ * External dependencies
+ */
+import React from 'react';
+import { Slot, Fill } from '@wordpress/components';
+import { createElement, Children } from '@wordpress/element';
+
+/**
+ * Internal dependencies
+ */
+import { createOrderedChildren, sortFillsByOrder } from '../utils';
+
+type WooProductFieldItemProps = {
+ id: string;
+ section: string;
+ pluginId: string;
+ order?: number;
+};
+
+type WooProductFieldSlotProps = {
+ section: string;
+};
+
+export const WooProductFieldItem: React.FC< WooProductFieldItemProps > & {
+ Slot: React.FC< Slot.Props & WooProductFieldSlotProps >;
+} = ( { children, order = 1, section } ) => (
+
+ { ( fillProps: Fill.Props ) => {
+ return createOrderedChildren< Fill.Props >(
+ children,
+ order,
+ fillProps
+ );
+ } }
+
+);
+
+WooProductFieldItem.Slot = ( { fillProps, section } ) => (
+
+ { ( fills ) => {
+ if ( ! sortFillsByOrder ) {
+ return null;
+ }
+
+ return Children.map(
+ sortFillsByOrder( fills )?.props.children,
+ ( child ) => (
+
+ { child }
+
+ )
+ );
+ } }
+
+);
diff --git a/plugins/woocommerce-admin/client/products/layout/product-field-layout.tsx b/plugins/woocommerce-admin/client/products/layout/product-field-layout.tsx
deleted file mode 100644
index 853317f6f28..00000000000
--- a/plugins/woocommerce-admin/client/products/layout/product-field-layout.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Internal dependencies
- */
-import { WooProductFieldItem } from './woo-product-field-item';
-
-type ProductFieldLayoutProps = {
- fieldName: string;
- categoryName: string;
-};
-
-export const ProductFieldLayout: React.FC< ProductFieldLayoutProps > = ( {
- fieldName,
- categoryName,
- children,
-} ) => {
- return (
-
-
- { children }
-
-
- );
-};
diff --git a/plugins/woocommerce-admin/client/products/layout/product-section-layout.scss b/plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
index ebc6c9d675e..acd31a35894 100644
--- a/plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
+++ b/plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
@@ -22,7 +22,7 @@
}
}
- .woocommerce-product-form__field {
+ .woocommerce-product-form__field:not(:first-child) {
margin-top: $gap-large;
> .components-base-control {
diff --git a/plugins/woocommerce-admin/client/products/layout/product-section-layout.tsx b/plugins/woocommerce-admin/client/products/layout/product-section-layout.tsx
index b3a9cdfcbe5..c3cba276725 100644
--- a/plugins/woocommerce-admin/client/products/layout/product-section-layout.tsx
+++ b/plugins/woocommerce-admin/client/products/layout/product-section-layout.tsx
@@ -8,7 +8,6 @@ import { FormSection } from '@woocommerce/components';
* Internal dependencies
*/
import './product-section-layout.scss';
-import { ProductFieldLayout } from './product-field-layout';
type ProductSectionLayoutProps = {
title: string;
@@ -31,12 +30,7 @@ export const ProductSectionLayout: React.FC< ProductSectionLayoutProps > = ( {
{ Children.map( children, ( child ) => {
if ( isValidElement( child ) && child.props.onChange ) {
return (
-
- { child }
-
+ { child }
);
}
return child;
diff --git a/plugins/woocommerce-admin/client/products/layout/test/product-field-layout.test.tsx b/plugins/woocommerce-admin/client/products/layout/test/product-field-layout.test.tsx
deleted file mode 100644
index df9d5dedeb1..00000000000
--- a/plugins/woocommerce-admin/client/products/layout/test/product-field-layout.test.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * External dependencies
- */
-import { render } from '@testing-library/react';
-import { SlotFillProvider } from '@wordpress/components';
-
-/**
- * Internal dependencies
- */
-import { ProductFieldLayout } from '../product-field-layout';
-import { WooProductFieldItem } from '../woo-product-field-item';
-
-describe( 'ProductFieldLayout', () => {
- beforeEach( () => {
- jest.clearAllMocks();
- } );
-
- it( 'should allow adding extra fields before the field using slot fill', () => {
- const { queryByText } = render(
-
-
- Name field
-
-
-
- );
- expect( queryByText( 'New field' ) ).toBeInTheDocument();
- expect( queryByText( 'New field' )?.nextSibling?.textContent ).toEqual(
- 'Name field'
- );
- } );
-
- it( 'should allow adding extra fields after the field using slot fill', () => {
- const { queryByText } = render(
-
-
- Name field
-
-
-
- );
- expect( queryByText( 'New field' ) ).toBeInTheDocument();
- expect( queryByText( 'Name field' )?.nextSibling?.textContent ).toEqual(
- 'New field'
- );
- } );
-
- it( 'should not render new slot fills when field name does not match', () => {
- const { queryByText } = render(
-
-
- Name field
-
-
-
- );
- expect( queryByText( 'New field' ) ).not.toBeInTheDocument();
- } );
-
- it( 'should not render new slot fills when category name does not match', () => {
- const { queryByText } = render(
-
-
- Name field
-
-
-
- );
- expect( queryByText( 'New field' ) ).not.toBeInTheDocument();
- } );
-} );
diff --git a/plugins/woocommerce-admin/client/products/layout/test/product-section-layout.test.tsx b/plugins/woocommerce-admin/client/products/layout/test/product-section-layout.test.tsx
index 8f8d7e8f6ab..45aa648e1fc 100644
--- a/plugins/woocommerce-admin/client/products/layout/test/product-section-layout.test.tsx
+++ b/plugins/woocommerce-admin/client/products/layout/test/product-section-layout.test.tsx
@@ -8,28 +8,10 @@ import { render } from '@testing-library/react';
*/
import { ProductSectionLayout } from '../product-section-layout';
-jest.mock( '../product-field-layout', () => {
- const productFieldLayoutMock: React.FC< {
- fieldName: string;
- categoryName: string;
- } > = ( { children, fieldName, categoryName } ) => {
- return (
-
- fieldName: { fieldName }
- categoryName: { categoryName }
- { children }
-
- );
- };
- return {
- ProductFieldLayout: productFieldLayoutMock,
- };
-} );
-
const SampleInputField: React.FC< { name: string; onChange: () => void } > = ( {
name,
} ) => {
- return smaple-input-field-{ name }
;
+ return sample-input-field-{ name }
;
};
describe( 'ProductSectionLayout', () => {
@@ -59,12 +41,9 @@ describe( 'ProductSectionLayout', () => {
);
- expect( queryByText( 'fieldName: name' ) ).toBeInTheDocument();
- expect( queryAllByText( 'categoryName: Title' ).length ).toEqual( 2 );
-
- expect( queryByText( 'smaple-input-field-name' ) ).toBeInTheDocument();
+ expect( queryByText( 'sample-input-field-name' ) ).toBeInTheDocument();
expect(
- queryByText( 'smaple-input-field-description' )
+ queryByText( 'sample-input-field-description' )
).toBeInTheDocument();
} );
diff --git a/plugins/woocommerce-admin/client/products/layout/woo-product-field-item.tsx b/plugins/woocommerce-admin/client/products/layout/woo-product-field-item.tsx
deleted file mode 100644
index 97d73f2d8a6..00000000000
--- a/plugins/woocommerce-admin/client/products/layout/woo-product-field-item.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * External dependencies
- */
-import React from 'react';
-import { Slot, Fill } from '@wordpress/components';
-import { snakeCase } from 'lodash';
-
-/**
- * Internal dependencies
- */
-import { createOrderedChildren, sortFillsByOrder } from '~/utils';
-
-// TODO: move this to a published JS package once ready.
-
-/**
- * Create a Fill for extensions to add items to the Product edit page.
- *
- * @slotFill WooProductFieldItem
- * @scope woocommerce-admin
- * @example
- * const MyProductDetailsFieldItem = () => (
- * My header item
- * );
- *
- * registerPlugin( 'my-extension', {
- * render: MyProductDetailsFieldItem,
- * scope: 'woocommerce-admin',
- * } );
- * @param {Object} param0
- * @param {Array} param0.children - Node children.
- * @param {string} param0.fieldName - Field name.
- * @param {string} param0.categoryName - Category name.
- * @param {number} param0.order - Order of Fill component.
- * @param {string} param0.location - Location before or after.
- */
-export const WooProductFieldItem: React.FC< {
- fieldName: string;
- categoryName: string;
- order?: number;
- location: 'before' | 'after';
-} > & {
- Slot: React.FC<
- Slot.Props & {
- fieldName: string;
- categoryName: string;
- location: 'before' | 'after';
- }
- >;
-} = ( { children, fieldName, categoryName, location, order = 1 } ) => {
- const categoryKey = snakeCase( categoryName );
- const fieldKey = snakeCase( fieldName );
- return (
-
- { ( fillProps: Fill.Props ) => {
- return createOrderedChildren( children, order, fillProps );
- } }
-
- );
-};
-
-WooProductFieldItem.Slot = ( {
- fillProps,
- fieldName,
- categoryName,
- location,
-} ) => {
- const categoryKey = snakeCase( categoryName );
- const fieldKey = snakeCase( fieldName );
- return (
-
- { sortFillsByOrder }
-
- );
-};
diff --git a/plugins/woocommerce-admin/client/products/sections/product-details-section.tsx b/plugins/woocommerce-admin/client/products/sections/product-details-section.tsx
index 3002be75a1e..db2abe0848f 100644
--- a/plugins/woocommerce-admin/client/products/sections/product-details-section.tsx
+++ b/plugins/woocommerce-admin/client/products/sections/product-details-section.tsx
@@ -17,6 +17,7 @@ import {
useFormContext,
__experimentalRichTextEditor as RichTextEditor,
__experimentalTooltip as Tooltip,
+ __experimentalWooProductFieldItem as WooProductFieldItem,
} from '@woocommerce/components';
import interpolateComponents from '@automattic/interpolate-components';
import {
@@ -241,6 +242,7 @@ export const ProductDetailsSection: React.FC = () => {
'woocommerce'
) }
/>
+
diff --git a/plugins/woocommerce/changelog/add-36014-mvp-field-slot b/plugins/woocommerce/changelog/add-36014-mvp-field-slot
new file mode 100644
index 00000000000..426654d8c1f
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36014-mvp-field-slot
@@ -0,0 +1,4 @@
+Significance: minor
+Type: update
+
+Adding WooProductFieldItem slot to product details section.
From 4ab70c5e7dac110c32969797baa221ee5f745e54 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 11 Jan 2023 07:19:51 +1300
Subject: [PATCH 65/98] Delete changelog files based on PR 36170 (#36172)
Delete changelog files for 36170
Co-authored-by: WooCommerce Bot
---
plugins/woocommerce/changelog/update-requires-at-least-5.9 | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 plugins/woocommerce/changelog/update-requires-at-least-5.9
diff --git a/plugins/woocommerce/changelog/update-requires-at-least-5.9 b/plugins/woocommerce/changelog/update-requires-at-least-5.9
deleted file mode 100644
index 5807dcd8cf6..00000000000
--- a/plugins/woocommerce/changelog/update-requires-at-least-5.9
+++ /dev/null
@@ -1,5 +0,0 @@
-Significance: patch
-Type: dev
-Comment: update requires at least to same 5.9
-
-
From b3bd207baa0acbe08535875c762d9963c723d3bb Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 28 Dec 2022 16:15:39 +0530
Subject: [PATCH 66/98] Enable COT Tests for all PRs.
---
.github/workflows/cot-pr-build-and-e2e-tests.yml | 3 ---
plugins/woocommerce/changelog/enable-hpos-check | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
create mode 100644 plugins/woocommerce/changelog/enable-hpos-check
diff --git a/.github/workflows/cot-pr-build-and-e2e-tests.yml b/.github/workflows/cot-pr-build-and-e2e-tests.yml
index a212ff99769..d96c908bb40 100644
--- a/.github/workflows/cot-pr-build-and-e2e-tests.yml
+++ b/.github/workflows/cot-pr-build-and-e2e-tests.yml
@@ -1,7 +1,6 @@
name: Run tests against PR in an environment with COT enabled
on:
pull_request:
- types: [labeled]
workflow_dispatch:
concurrency:
@@ -13,7 +12,6 @@ permissions: {}
jobs:
cot-e2e-tests-run:
name: Runs E2E tests with COT enabled.
- if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}"
runs-on: ubuntu-20.04
permissions:
contents: read
@@ -70,7 +68,6 @@ jobs:
cot-api-tests-run:
name: Runs API tests with COT enabled.
- if: "${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'focus: custom order tables' }}"
runs-on: ubuntu-20.04
permissions:
contents: read
diff --git a/plugins/woocommerce/changelog/enable-hpos-check b/plugins/woocommerce/changelog/enable-hpos-check
new file mode 100644
index 00000000000..e8e159e8594
--- /dev/null
+++ b/plugins/woocommerce/changelog/enable-hpos-check
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: Build process change.
+
+
From 475f21a9851098984c0eb59934e5c23fa846a2e4 Mon Sep 17 00:00:00 2001
From: Vedanshu Jain
Date: Wed, 11 Jan 2023 10:19:25 +0530
Subject: [PATCH 67/98] Disable posting comment since it conflicts with normal
E2E report comment.
---
.../workflows/cot-pr-build-and-e2e-tests.yml | 196 +++++++++---------
1 file changed, 98 insertions(+), 98 deletions(-)
diff --git a/.github/workflows/cot-pr-build-and-e2e-tests.yml b/.github/workflows/cot-pr-build-and-e2e-tests.yml
index d96c908bb40..fd8abdaa596 100644
--- a/.github/workflows/cot-pr-build-and-e2e-tests.yml
+++ b/.github/workflows/cot-pr-build-and-e2e-tests.yml
@@ -119,101 +119,101 @@ jobs:
if-no-files-found: ignore
retention-days: 5
- test-summary:
- name: Post test results
- if: |
- always() &&
- ! github.event.pull_request.head.repo.fork &&
- (
- contains( needs.*.result, 'success' ) ||
- contains( needs.*.result, 'failure' )
- )
- runs-on: ubuntu-20.04
- permissions:
- contents: read
- needs: [cot-api-tests-run, cot-e2e-tests-run]
- steps:
- - name: Create dirs
- run: |
- mkdir -p repo
- mkdir -p artifacts/api
- mkdir -p artifacts/e2e
- mkdir -p output
-
- - name: Checkout code
- uses: actions/checkout@v3
- with:
- path: repo
-
- - name: Download API test report artifact
- uses: actions/download-artifact@v3
- with:
- name: api-test-report---pr-${{ github.event.number }}
- path: artifacts/api
-
- - name: Download Playwright E2E test report artifact
- uses: actions/download-artifact@v3
- with:
- name: e2e-test-report---pr-${{ github.event.number }}
- path: artifacts/e2e
-
- - name: Prepare test summary
- id: prepare-test-summary
- uses: actions/github-script@v6
- env:
- API_SUMMARY_PATH: ${{ github.workspace }}/artifacts/api/allure-report/widgets/summary.json
- E2E_PW_SUMMARY_PATH: ${{ github.workspace }}/artifacts/e2e/allure-report/widgets/summary.json
- PR_NUMBER: ${{ github.event.number }}
- SHA: ${{ github.event.pull_request.head.sha }}
- with:
- result-encoding: string
- script: |
- const script = require( './repo/.github/workflows/scripts/prepare-test-summary.js' )
- return await script( { core } )
-
- - name: Find PR comment by github-actions[bot]
- uses: peter-evans/find-comment@v2
- id: find-comment
- with:
- issue-number: ${{ github.event.pull_request.number }}
- comment-author: 'github-actions[bot]'
- body-includes: Test Results Summary
-
- - name: Create or update PR comment
- uses: peter-evans/create-or-update-comment@v2
- with:
- comment-id: ${{ steps.find-comment.outputs.comment-id }}
- issue-number: ${{ github.event.pull_request.number }}
- body: ${{ steps.prepare-test-summary.outputs.result }}
- edit-mode: replace
-
- publish-test-reports:
- name: Publish test reports
- if: |
- always() &&
- ! github.event.pull_request.head.repo.fork &&
- (
- contains( needs.*.result, 'success' ) ||
- contains( needs.*.result, 'failure' )
- )
- runs-on: ubuntu-20.04
- needs: [cot-api-tests-run, cot-e2e-tests-run]
- env:
- GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
- PR_NUMBER: ${{ github.event.number }}
- RUN_ID: ${{ github.run_id }}
- COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
- steps:
- - name: Publish test reports
- env:
- API_ARTIFACT: api-test-report---pr-${{ github.event.number }}
- E2E_ARTIFACT: e2e-test-report---pr-${{ github.event.number }}
- run: |
- gh workflow run publish-test-reports-pr.yml \
- -f run_id=$RUN_ID \
- -f api_artifact=$API_ARTIFACT \
- -f e2e_artifact=$E2E_ARTIFACT \
- -f pr_number=$PR_NUMBER \
- -f commit_sha=$COMMIT_SHA \
- -f s3_root=public \
- --repo woocommerce/woocommerce-test-reports
+# test-summary:
+# name: Post test results
+# if: |
+# always() &&
+# ! github.event.pull_request.head.repo.fork &&
+# (
+# contains( needs.*.result, 'success' ) ||
+# contains( needs.*.result, 'failure' )
+# )
+# runs-on: ubuntu-20.04
+# permissions:
+# contents: read
+# needs: [cot-api-tests-run, cot-e2e-tests-run]
+# steps:
+# - name: Create dirs
+# run: |
+# mkdir -p repo
+# mkdir -p artifacts/api
+# mkdir -p artifacts/e2e
+# mkdir -p output
+#
+# - name: Checkout code
+# uses: actions/checkout@v3
+# with:
+# path: repo
+#
+# - name: Download API test report artifact
+# uses: actions/download-artifact@v3
+# with:
+# name: api-test-report---pr-${{ github.event.number }}
+# path: artifacts/api
+#
+# - name: Download Playwright E2E test report artifact
+# uses: actions/download-artifact@v3
+# with:
+# name: e2e-test-report---pr-${{ github.event.number }}
+# path: artifacts/e2e
+#
+# - name: Prepare test summary
+# id: prepare-test-summary
+# uses: actions/github-script@v6
+# env:
+# API_SUMMARY_PATH: ${{ github.workspace }}/artifacts/api/allure-report/widgets/summary.json
+# E2E_PW_SUMMARY_PATH: ${{ github.workspace }}/artifacts/e2e/allure-report/widgets/summary.json
+# PR_NUMBER: ${{ github.event.number }}
+# SHA: ${{ github.event.pull_request.head.sha }}
+# with:
+# result-encoding: string
+# script: |
+# const script = require( './repo/.github/workflows/scripts/prepare-test-summary.js' )
+# return await script( { core } )
+#
+# - name: Find PR comment by github-actions[bot]
+# uses: peter-evans/find-comment@v2
+# id: find-comment
+# with:
+# issue-number: ${{ github.event.pull_request.number }}
+# comment-author: 'github-actions[bot]'
+# body-includes: Test Results Summary
+#
+# - name: Create or update PR comment
+# uses: peter-evans/create-or-update-comment@v2
+# with:
+# comment-id: ${{ steps.find-comment.outputs.comment-id }}
+# issue-number: ${{ github.event.pull_request.number }}
+# body: ${{ steps.prepare-test-summary.outputs.result }}
+# edit-mode: replace
+#
+# publish-test-reports:
+# name: Publish test reports
+# if: |
+# always() &&
+# ! github.event.pull_request.head.repo.fork &&
+# (
+# contains( needs.*.result, 'success' ) ||
+# contains( needs.*.result, 'failure' )
+# )
+# runs-on: ubuntu-20.04
+# needs: [cot-api-tests-run, cot-e2e-tests-run]
+# env:
+# GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
+# PR_NUMBER: ${{ github.event.number }}
+# RUN_ID: ${{ github.run_id }}
+# COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
+# steps:
+# - name: Publish test reports
+# env:
+# API_ARTIFACT: api-test-report---pr-${{ github.event.number }}
+# E2E_ARTIFACT: e2e-test-report---pr-${{ github.event.number }}
+# run: |
+# gh workflow run publish-test-reports-pr.yml \
+# -f run_id=$RUN_ID \
+# -f api_artifact=$API_ARTIFACT \
+# -f e2e_artifact=$E2E_ARTIFACT \
+# -f pr_number=$PR_NUMBER \
+# -f commit_sha=$COMMIT_SHA \
+# -f s3_root=public \
+# --repo woocommerce/woocommerce-test-reports
From ef3d15fcd4a5a7e7bdba40e3027172f9fc4d2835 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20P=C3=A9rez=20Pellicer?=
<5908855+puntope@users.noreply.github.com>
Date: Wed, 11 Jan 2023 18:53:36 +0700
Subject: [PATCH 68/98] Make secondQuestion and title params optional in CES
Prompt (#36270)
* Set secondQuestion and title as optional
* Update docs and changelog
* Fixes after review
---
packages/js/customer-effort-score/README.md | 9 ++-
.../changelog/update-customer-effort-score | 4 ++
.../src/customer-effort-score.tsx | 18 ++++--
.../src/customer-feedback-modal/index.tsx | 64 ++++++++++---------
.../customer-feedback-modal/test/index.tsx | 30 +++++++++
5 files changed, 86 insertions(+), 39 deletions(-)
create mode 100644 packages/js/customer-effort-score/changelog/update-customer-effort-score
diff --git a/packages/js/customer-effort-score/README.md b/packages/js/customer-effort-score/README.md
index 61aad89db1a..6d5ec81a3d5 100644
--- a/packages/js/customer-effort-score/README.md
+++ b/packages/js/customer-effort-score/README.md
@@ -29,12 +29,14 @@ export function CustomerEffortScoreConsole( { label } ) {
const onNoticeShown = () => console.log( 'onNoticeShown' );
const onModalShown = () => console.log( 'onModalShown' );
const onNoticeDismissed = () => console.log( 'onNoticeDismissed' );
- const recordScore = ( score, comments ) => console.log( { score, comments } );
+ const recordScore = ( score, score2, comments ) => console.log( { score, score2, comments } );
return (
)
diff --git a/packages/js/customer-effort-score/changelog/update-customer-effort-score b/packages/js/customer-effort-score/changelog/update-customer-effort-score
new file mode 100644
index 00000000000..4e105b28f49
--- /dev/null
+++ b/packages/js/customer-effort-score/changelog/update-customer-effort-score
@@ -0,0 +1,4 @@
+Significance: minor
+Type: tweak
+
+Set secondQuestion and title as optional
diff --git a/packages/js/customer-effort-score/src/customer-effort-score.tsx b/packages/js/customer-effort-score/src/customer-effort-score.tsx
index 4a885f400b5..c51cc99480a 100644
--- a/packages/js/customer-effort-score/src/customer-effort-score.tsx
+++ b/packages/js/customer-effort-score/src/customer-effort-score.tsx
@@ -19,11 +19,11 @@ type CustomerEffortScoreProps = {
secondScore: number,
comments: string
) => void;
- title: string;
+ title?: string;
description?: string;
noticeLabel?: string;
firstQuestion: string;
- secondQuestion: string;
+ secondQuestion?: string;
onNoticeShownCallback?: () => void;
onNoticeDismissedCallback?: () => void;
onModalShownCallback?: () => void;
@@ -39,11 +39,11 @@ type CustomerEffortScoreProps = {
*
* @param {Object} props Component props.
* @param {Function} props.recordScoreCallback Function to call when the score should be recorded.
- * @param {string} props.title The title displayed in the modal.
+ * @param {string} [props.title] The title displayed in the modal.
* @param {string} props.description The description displayed in the modal.
* @param {string} props.noticeLabel The notice label displayed in the notice.
* @param {string} props.firstQuestion The first survey question.
- * @param {string} props.secondQuestion The second survey question.
+ * @param {string} [props.secondQuestion] The second survey question.
* @param {Function} props.onNoticeShownCallback Function to call when the notice is shown.
* @param {Function} props.onNoticeDismissedCallback Function to call when the notice is dismissed.
* @param {Function} props.onModalShownCallback Function to call when the modal is shown.
@@ -120,7 +120,7 @@ CustomerEffortScore.propTypes = {
/**
* The title displayed in the modal.
*/
- title: PropTypes.string.isRequired,
+ title: PropTypes.string,
/**
* The function to call when the notice is shown.
*/
@@ -137,6 +137,14 @@ CustomerEffortScore.propTypes = {
* Icon (React component) to be displayed.
*/
icon: PropTypes.element,
+ /**
+ * The first survey question.
+ */
+ firstQuestion: PropTypes.string.isRequired,
+ /**
+ * The second survey question.
+ */
+ secondQuestion: PropTypes.string,
};
export { CustomerEffortScore };
diff --git a/packages/js/customer-effort-score/src/customer-feedback-modal/index.tsx b/packages/js/customer-effort-score/src/customer-feedback-modal/index.tsx
index 0a005f85d81..cc55823df45 100644
--- a/packages/js/customer-effort-score/src/customer-feedback-modal/index.tsx
+++ b/packages/js/customer-effort-score/src/customer-feedback-modal/index.tsx
@@ -28,14 +28,14 @@ import { __ } from '@wordpress/i18n';
* @param {string} props.title Title displayed in the modal.
* @param {string} props.description Description displayed in the modal.
* @param {string} props.firstQuestion The first survey question.
- * @param {string} props.secondQuestion The second survey question.
+ * @param {string} [props.secondQuestion] An optional second survey question.
* @param {string} props.defaultScore Default score.
* @param {Function} props.onCloseModal Callback for when user closes modal by clicking cancel.
* @param {Function} props.customOptions List of custom score options, contains label and value.
*/
function CustomerFeedbackModal( {
recordScoreCallback,
- title,
+ title = __( 'Please share your feedback', 'woocommerce' ),
description,
firstQuestion,
secondQuestion,
@@ -48,10 +48,10 @@ function CustomerFeedbackModal( {
secondScore: number,
comments: string
) => void;
- title: string;
+ title?: string;
description?: string;
firstQuestion: string;
- secondQuestion: string;
+ secondQuestion?: string;
defaultScore?: number;
onCloseModal?: () => void;
customOptions?: { label: string; value: string }[];
@@ -110,10 +110,8 @@ function CustomerFeedbackModal( {
const sendScore = () => {
if (
- ! (
- Number.isInteger( firstQuestionScore ) &&
- Number.isInteger( secondQuestionScore )
- )
+ ! Number.isInteger( firstQuestionScore ) ||
+ ( secondQuestion && ! Number.isInteger( secondQuestionScore ) )
) {
setShowNoScoreMessage( true );
return;
@@ -175,28 +173,32 @@ function CustomerFeedbackModal( {
/>
-
- { secondQuestion }
-
+ { secondQuestion && (
+
+ { secondQuestion }
+
+ ) }
-
-
- onRadioControlChange(
- value as string,
- setSecondQuestionScore
- )
- }
- />
-
+ { secondQuestion && (
+
+
+ onRadioControlChange(
+ value as string,
+ setSecondQuestionScore
+ )
+ }
+ />
+
+ ) }
{ [ firstQuestionScore, secondQuestionScore ].some(
( score ) => score === 1 || score === 2
@@ -250,9 +252,9 @@ function CustomerFeedbackModal( {
CustomerFeedbackModal.propTypes = {
recordScoreCallback: PropTypes.func.isRequired,
- title: PropTypes.string.isRequired,
+ title: PropTypes.string,
firstQuestion: PropTypes.string.isRequired,
- secondQuestion: PropTypes.string.isRequired,
+ secondQuestion: PropTypes.string,
defaultScore: PropTypes.number,
onCloseModal: PropTypes.func,
};
diff --git a/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx b/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
index b4136fd3fe6..486f5026ad8 100644
--- a/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
+++ b/packages/js/customer-effort-score/src/customer-feedback-modal/test/index.tsx
@@ -107,4 +107,34 @@ describe( 'CustomerFeedbackModal', () => {
} );
}
);
+
+ it( 'should render even if no second question is provided', async () => {
+ render(
+
+ );
+
+ // Wait for the modal to render.
+ await screen.findByRole( 'dialog' );
+ // Should be only one neutral emoji, since there is one question only
+ expect( screen.getAllByLabelText( 'Neutral' ).length ).toBe( 1 );
+ } );
+
+ it( 'should render default title if no title is provided', async () => {
+ render(
+
+ );
+
+ // Wait for the modal to render.
+ await screen.findByRole( 'dialog' );
+ expect(
+ screen.queryByLabelText( 'Please share your feedback' )
+ ).toBeInTheDocument();
+ } );
} );
From 8bada412d4c9d4329655c801eb903ca2882fbdc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maikel=20David=20P=C3=A9rez=20G=C3=B3mez?=
Date: Wed, 11 Jan 2023 11:41:25 -0300
Subject: [PATCH 69/98] Product variations should inherit parent product
properties (#36234)
Remove manage_stock 'parent' value before saving the variation
---
packages/js/data/changelog/add-35989 | 4 ++++
packages/js/data/src/product-variations/types.ts | 10 +++++++++-
.../client/products/product-variation-form-actions.tsx | 10 ++++++++--
plugins/woocommerce/changelog/add-35989 | 4 ++++
4 files changed, 25 insertions(+), 3 deletions(-)
create mode 100644 packages/js/data/changelog/add-35989
create mode 100644 plugins/woocommerce/changelog/add-35989
diff --git a/packages/js/data/changelog/add-35989 b/packages/js/data/changelog/add-35989
new file mode 100644
index 00000000000..e4d315a532e
--- /dev/null
+++ b/packages/js/data/changelog/add-35989
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add manage_stock parent value to product variation type definition
diff --git a/packages/js/data/src/product-variations/types.ts b/packages/js/data/src/product-variations/types.ts
index 5275ec24961..de021010a2f 100644
--- a/packages/js/data/src/product-variations/types.ts
+++ b/packages/js/data/src/product-variations/types.ts
@@ -55,13 +55,21 @@ export interface ProductVariationImage {
export type ProductVariation = Omit<
Product,
- 'name' | 'slug' | 'attributes' | 'images'
+ 'name' | 'slug' | 'attributes' | 'images' | 'manage_stock'
> & {
attributes: ProductVariationAttribute[];
/**
* Variation image data.
*/
image?: ProductVariationImage;
+ /**
+ * Stock management at variation level. It can have a
+ * 'parent' value if the parent product is managing
+ * the stock at the time the variation was created.
+ *
+ * @default false
+ */
+ manage_stock: boolean | 'parent';
};
type Query = Omit< ProductQuery, 'name' >;
diff --git a/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx b/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
index 8b2108ad36d..f059f1bf4aa 100644
--- a/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
+++ b/plugins/woocommerce-admin/client/products/product-variation-form-actions.tsx
@@ -36,8 +36,14 @@ export const ProductVariationFormActions: React.FC = () => {
const onSave = async () => {
setIsSaving( true );
updateProductVariation< Promise< ProductVariation > >(
- { id: variationId, product_id: productId },
- values
+ { id: variationId, product_id: productId, context: 'edit' },
+ {
+ ...values,
+ manage_stock:
+ values.manage_stock === 'parent'
+ ? undefined
+ : values?.manage_stock,
+ }
)
.then( () => {
createNotice(
diff --git a/plugins/woocommerce/changelog/add-35989 b/plugins/woocommerce/changelog/add-35989
new file mode 100644
index 00000000000..a7e18645939
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-35989
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Remove manage_stock 'parent' value before saving the variation
From 6e428201c10484b3523c644a14a0ec91e7baeca6 Mon Sep 17 00:00:00 2001
From: Joel Thiessen <444632+joelclimbsthings@users.noreply.github.com>
Date: Wed, 11 Jan 2023 10:00:20 -0800
Subject: [PATCH 70/98] Adding WooProductSectionItem slotfill (#36331)
---
.../changelog/add-36015-mvp-section-slot | 4 ++
packages/js/components/src/index.ts | 1 +
.../src/woo-product-section-item/README.md | 46 +++++++++++++++++
.../src/woo-product-section-item/index.ts | 1 +
.../woo-product-section-item.tsx | 51 +++++++++++++++++++
.../client/products/product-form-tab.tsx | 2 +-
.../client/products/product-form.tsx | 7 ++-
.../changelog/add-36015-mvp-section-slot | 4 ++
8 files changed, 114 insertions(+), 2 deletions(-)
create mode 100644 packages/js/components/changelog/add-36015-mvp-section-slot
create mode 100644 packages/js/components/src/woo-product-section-item/README.md
create mode 100644 packages/js/components/src/woo-product-section-item/index.ts
create mode 100644 packages/js/components/src/woo-product-section-item/woo-product-section-item.tsx
create mode 100644 plugins/woocommerce/changelog/add-36015-mvp-section-slot
diff --git a/packages/js/components/changelog/add-36015-mvp-section-slot b/packages/js/components/changelog/add-36015-mvp-section-slot
new file mode 100644
index 00000000000..e22146e0c31
--- /dev/null
+++ b/packages/js/components/changelog/add-36015-mvp-section-slot
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Adding the WooProductSectionItem slotfill component.
diff --git a/packages/js/components/src/index.ts b/packages/js/components/src/index.ts
index 04fcd9c09e6..8330ed8b4f2 100644
--- a/packages/js/components/src/index.ts
+++ b/packages/js/components/src/index.ts
@@ -86,3 +86,4 @@ export * as TourKitTypes from './tour-kit/types';
export { CollapsibleContent } from './collapsible-content';
export { createOrderedChildren, sortFillsByOrder } from './utils';
export { WooProductFieldItem as __experimentalWooProductFieldItem } from './woo-product-field-item';
+export { WooProductSectionItem as __experimentalWooProductSectionItem } from './woo-product-section-item';
diff --git a/packages/js/components/src/woo-product-section-item/README.md b/packages/js/components/src/woo-product-section-item/README.md
new file mode 100644
index 00000000000..cfd3ce2ae3e
--- /dev/null
+++ b/packages/js/components/src/woo-product-section-item/README.md
@@ -0,0 +1,46 @@
+# WooProductSectionItem Slot & Fill
+
+A Slotfill component that will allow you to add a new section to the product editor.
+
+## Usage
+
+```jsx
+
+ { () => {
+ return (
+
+
+ { /* Section content */ }
+
+
+ );
+} }
+
+
+
+```
+
+### WooProductSectionItem (fill)
+
+This is the fill component. You must provide the `id` prop to identify your section fill with a unique string. This component will accept a series of props:
+
+| Prop | Type | Description |
+| -------------| -------- | ------------------------------------------------------------------------------------------------------------------------ |
+| `id` | String | A unique string to identify your fill. Used for configuiration management. |
+| `location` | String | The string used to identify the particular location that you want to render your section. |
+| `pluginId` | String | A unique plugin ID to identify the plugin/extension that this fill is associated with. |
+| `order` | Number | (optional) This number will dictate the order that the sections rendered by a Slot will be appear. |
+
+### WooProductSectionItem.Slot (slot)
+
+This is the slot component, and will not be used as frequently. It must also receive the required `location` prop that will be identical to the fill `location`.
+
+| Name | Type | Description |
+| ----------- | ------ | ---------------------------------------------------------------------------------------------------- |
+| `location` | String | Unique to the location that the Slot appears, and must be the same as the one provided to any fills. |
diff --git a/packages/js/components/src/woo-product-section-item/index.ts b/packages/js/components/src/woo-product-section-item/index.ts
new file mode 100644
index 00000000000..f69863cda0f
--- /dev/null
+++ b/packages/js/components/src/woo-product-section-item/index.ts
@@ -0,0 +1 @@
+export * from './woo-product-section-item';
diff --git a/packages/js/components/src/woo-product-section-item/woo-product-section-item.tsx b/packages/js/components/src/woo-product-section-item/woo-product-section-item.tsx
new file mode 100644
index 00000000000..ead5114a62c
--- /dev/null
+++ b/packages/js/components/src/woo-product-section-item/woo-product-section-item.tsx
@@ -0,0 +1,51 @@
+/**
+ * External dependencies
+ */
+import React from 'react';
+import { Slot, Fill } from '@wordpress/components';
+import { createElement } from '@wordpress/element';
+
+/**
+ * Internal dependencies
+ */
+import { createOrderedChildren, sortFillsByOrder } from '../utils';
+
+type WooProductSectionItemProps = {
+ id: string;
+ location: string;
+ pluginId: string;
+ order?: number;
+};
+
+type WooProductFieldSlotProps = {
+ location: string;
+};
+
+export const WooProductSectionItem: React.FC< WooProductSectionItemProps > & {
+ Slot: React.FC< Slot.Props & WooProductFieldSlotProps >;
+} = ( { children, order = 1, location } ) => (
+
+ { ( fillProps: Fill.Props ) => {
+ return createOrderedChildren< Fill.Props >(
+ children,
+ order,
+ fillProps
+ );
+ } }
+
+);
+
+WooProductSectionItem.Slot = ( { fillProps, location } ) => (
+
+ { ( fills ) => {
+ if ( ! sortFillsByOrder ) {
+ return null;
+ }
+
+ return sortFillsByOrder( fills );
+ } }
+
+);
diff --git a/plugins/woocommerce-admin/client/products/product-form-tab.tsx b/plugins/woocommerce-admin/client/products/product-form-tab.tsx
index 2c2f0b9a814..cef50e510dd 100644
--- a/plugins/woocommerce-admin/client/products/product-form-tab.tsx
+++ b/plugins/woocommerce-admin/client/products/product-form-tab.tsx
@@ -8,7 +8,7 @@ export const ProductFormTab: React.FC< {
name: string;
title: string;
children: JSX.Element | JSX.Element[] | string;
-} > = ( { name, title, children } ) => {
+} > = ( { name, children } ) => {
const classes = classnames(
'woocommerce-product-form-tab',
'woocommerce-product-form-tab__' + name
diff --git a/plugins/woocommerce-admin/client/products/product-form.tsx b/plugins/woocommerce-admin/client/products/product-form.tsx
index 3605912595a..6be4974c9e8 100644
--- a/plugins/woocommerce-admin/client/products/product-form.tsx
+++ b/plugins/woocommerce-admin/client/products/product-form.tsx
@@ -1,7 +1,11 @@
/**
* External dependencies
*/
-import { Form, FormRef } from '@woocommerce/components';
+import {
+ Form,
+ FormRef,
+ __experimentalWooProductSectionItem as WooProductSectionItem,
+} from '@woocommerce/components';
import { PartialProduct, Product } from '@woocommerce/data';
import { Ref } from 'react';
@@ -47,6 +51,7 @@ export const ProductForm: React.FC< {
+
Date: Wed, 11 Jan 2023 15:25:12 -0800
Subject: [PATCH 71/98] Widen the selector used to hide the quantity input (for
products that are sold individually).
---
.../changelog/fix-36007-sold-individually-amendment | 5 +++++
plugins/woocommerce/client/legacy/css/_common.scss | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-36007-sold-individually-amendment
diff --git a/plugins/woocommerce/changelog/fix-36007-sold-individually-amendment b/plugins/woocommerce/changelog/fix-36007-sold-individually-amendment
new file mode 100644
index 00000000000..6b14c30ea53
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36007-sold-individually-amendment
@@ -0,0 +1,5 @@
+Significance: patch
+Type: tweak
+Comment: We're tweaking an unreleased change which is already covered by a changelog entry added in PR#36350.
+
+
diff --git a/plugins/woocommerce/client/legacy/css/_common.scss b/plugins/woocommerce/client/legacy/css/_common.scss
index 1d645c1e305..9737c39c898 100644
--- a/plugins/woocommerce/client/legacy/css/_common.scss
+++ b/plugins/woocommerce/client/legacy/css/_common.scss
@@ -3,6 +3,6 @@
*/
/* We do not wish to display the quantity selector (within single product pages) if the product is sold individually. */
-.woocommerce.single-product .product.sold-individually input[name="quantity"] {
+.woocommerce.single-product .product.sold-individually .quantity {
display: none;
}
From 262b2ecebdf547e6fc68a4aaf6e08d994b107194 Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Thu, 12 Jan 2023 14:09:36 +1300
Subject: [PATCH 72/98] Don't run CI checks on PRs that are just changelog
changes (#36280)
---
.../workflows/pr-build-and-e2e-tests-skip.yml | 12 ++
.github/workflows/pr-build-and-e2e-tests.yml | 16 ++-
.../workflows/pr-build-live-branch-skip.yml | 12 ++
.github/workflows/pr-build-live-branch.yml | 4 +-
.github/workflows/pr-code-coverage-skip.yml | 12 ++
.github/workflows/pr-code-coverage.yml | 95 ++++++-------
.github/workflows/pr-code-sniff-skip.yml | 12 ++
.github/workflows/pr-code-sniff.yml | 7 +-
.../workflows/pr-highlight-changes-skip.yml | 12 ++
.github/workflows/pr-highlight-changes.yml | 51 +++----
.github/workflows/pr-lint-monorepo.yml | 54 ++++----
.github/workflows/pr-lint-test-js.yml | 11 +-
.github/workflows/pr-lint-test-skip.yml | 12 ++
.github/workflows/pr-project-label.yml | 34 ++---
.github/workflows/pr-smoke-test-skip.yml | 12 ++
.github/workflows/pr-smoke-test.yml | 12 +-
.github/workflows/pr-unit-tests-skip.yml | 12 ++
.github/workflows/pr-unit-tests.yml | 126 +++++++++---------
18 files changed, 310 insertions(+), 196 deletions(-)
create mode 100644 .github/workflows/pr-build-and-e2e-tests-skip.yml
create mode 100644 .github/workflows/pr-build-live-branch-skip.yml
create mode 100644 .github/workflows/pr-code-coverage-skip.yml
create mode 100644 .github/workflows/pr-code-sniff-skip.yml
create mode 100644 .github/workflows/pr-highlight-changes-skip.yml
create mode 100644 .github/workflows/pr-lint-test-skip.yml
create mode 100644 .github/workflows/pr-smoke-test-skip.yml
create mode 100644 .github/workflows/pr-unit-tests-skip.yml
diff --git a/.github/workflows/pr-build-and-e2e-tests-skip.yml b/.github/workflows/pr-build-and-e2e-tests-skip.yml
new file mode 100644
index 00000000000..2bddb65e0dd
--- /dev/null
+++ b/.github/workflows/pr-build-and-e2e-tests-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Run tests against PR
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-build-and-e2e-tests.yml b/.github/workflows/pr-build-and-e2e-tests.yml
index c37a5c96ad3..085ff943031 100644
--- a/.github/workflows/pr-build-and-e2e-tests.yml
+++ b/.github/workflows/pr-build-and-e2e-tests.yml
@@ -1,7 +1,9 @@
name: Run tests against PR
on:
- pull_request:
workflow_dispatch:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,7 +16,7 @@ jobs:
name: Runs E2E tests.
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
@@ -84,7 +86,7 @@ jobs:
name: Runs API tests.
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report
@@ -136,7 +138,7 @@ jobs:
name: Runs k6 Performance tests
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
steps:
- uses: actions/checkout@v3
@@ -171,9 +173,9 @@ jobs:
runs-on: ubuntu-20.04
needs: [api-tests-run, e2e-tests-run]
permissions:
- contents: read
- issues: write
- pull-requests: write
+ contents: read
+ issues: write
+ pull-requests: write
env:
E2E_GRAND_TOTAL: ${{needs.e2e-tests-run.outputs.E2E_GRAND_TOTAL}}
steps:
diff --git a/.github/workflows/pr-build-live-branch-skip.yml b/.github/workflows/pr-build-live-branch-skip.yml
new file mode 100644
index 00000000000..5d7358217e5
--- /dev/null
+++ b/.github/workflows/pr-build-live-branch-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Build Live Branch
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-build-live-branch.yml b/.github/workflows/pr-build-live-branch.yml
index 01805b95b9a..838796d5351 100644
--- a/.github/workflows/pr-build-live-branch.yml
+++ b/.github/workflows/pr-build-live-branch.yml
@@ -1,6 +1,8 @@
name: Build Live Branch
on:
pull_request:
+ paths-ignore:
+ - '**/changelog/**'
concurrency:
# Cancel concurrent jobs on pull_request but not push, by including the run_id in the concurrency group for the latter.
@@ -14,7 +16,7 @@ jobs:
if: github.repository_owner == 'woocommerce'
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-code-coverage-skip.yml b/.github/workflows/pr-code-coverage-skip.yml
new file mode 100644
index 00000000000..b181d912077
--- /dev/null
+++ b/.github/workflows/pr-code-coverage-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Run code coverage on PR
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-code-coverage.yml b/.github/workflows/pr-code-coverage.yml
index cb71b873a24..826b070898d 100644
--- a/.github/workflows/pr-code-coverage.yml
+++ b/.github/workflows/pr-code-coverage.yml
@@ -1,59 +1,60 @@
name: Run code coverage on PR
on:
- pull_request:
- workflow_dispatch:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
+ workflow_dispatch:
defaults:
- run:
- shell: bash
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ run:
+ shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
permissions: {}
jobs:
- test:
- name: Code coverage (PHP 7.4, WP Latest)
- timeout-minutes: 30
- runs-on: ubuntu-20.04
- permissions:
- contents: read
- services:
- database:
- image: mysql:5.6
- env:
- MYSQL_ROOT_PASSWORD: root
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 100
+ test:
+ name: Code coverage (PHP 7.4, WP Latest)
+ timeout-minutes: 30
+ runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ services:
+ database:
+ image: mysql:5.6
+ env:
+ MYSQL_ROOT_PASSWORD: root
+ ports:
+ - 3306:3306
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 100
- - name: Setup WooCommerce Monorepo
- uses: ./.github/actions/setup-woocommerce-monorepo
+ - name: Setup WooCommerce Monorepo
+ uses: ./.github/actions/setup-woocommerce-monorepo
- - name: Tool versions
- run: |
- php --version
- composer --version
+ - name: Tool versions
+ run: |
+ php --version
+ composer --version
- - name: Build Admin feature config
- working-directory: plugins/woocommerce
- run:
- pnpm run build:feature-config
+ - name: Build Admin feature config
+ working-directory: plugins/woocommerce
+ run: pnpm run build:feature-config
- - name: Init DB and WP
- working-directory: plugins/woocommerce
- run: bash tests/bin/install.sh woo_test root root 127.0.0.1 latest
+ - name: Init DB and WP
+ working-directory: plugins/woocommerce
+ run: bash tests/bin/install.sh woo_test root root 127.0.0.1 latest
- - name: Run unit tests with code coverage. Allow to fail.
- working-directory: plugins/woocommerce
- run: |
- RUN_CODE_COVERAGE=1 bash tests/bin/phpunit.sh
- exit 0
-
- - name: Send code coverage to Codecov.
- run: |
- bash <(curl -s https://codecov.io/bash)
+ - name: Run unit tests with code coverage. Allow to fail.
+ working-directory: plugins/woocommerce
+ run: |
+ RUN_CODE_COVERAGE=1 bash tests/bin/phpunit.sh
+ exit 0
+
+ - name: Send code coverage to Codecov.
+ run: |
+ bash <(curl -s https://codecov.io/bash)
diff --git a/.github/workflows/pr-code-sniff-skip.yml b/.github/workflows/pr-code-sniff-skip.yml
new file mode 100644
index 00000000000..b181d912077
--- /dev/null
+++ b/.github/workflows/pr-code-sniff-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Run code coverage on PR
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-code-sniff.yml b/.github/workflows/pr-code-sniff.yml
index 005648861db..7578e652db6 100644
--- a/.github/workflows/pr-code-sniff.yml
+++ b/.github/workflows/pr-code-sniff.yml
@@ -1,5 +1,8 @@
name: Run code sniff on PR
-on: pull_request
+on:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
defaults:
run:
shell: bash
@@ -17,7 +20,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
steps:
- uses: actions/checkout@v3
with:
diff --git a/.github/workflows/pr-highlight-changes-skip.yml b/.github/workflows/pr-highlight-changes-skip.yml
new file mode 100644
index 00000000000..b30e97fb9d2
--- /dev/null
+++ b/.github/workflows/pr-highlight-changes-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Highlight templates changes
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-highlight-changes.yml b/.github/workflows/pr-highlight-changes.yml
index 45bb24f4df9..b856e966768 100644
--- a/.github/workflows/pr-highlight-changes.yml
+++ b/.github/workflows/pr-highlight-changes.yml
@@ -1,5 +1,8 @@
name: Highlight templates changes
-on: pull_request
+on:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
permissions: {}
@@ -8,7 +11,7 @@ jobs:
name: Check pull request changes to highlight
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
outputs:
results: ${{ steps.results.outputs.results }}
steps:
@@ -29,32 +32,32 @@ jobs:
- name: Check results
uses: actions/github-script@v6
with:
- script: |
- const template = '${{ steps.run.outputs.templates }}';
+ script: |
+ const template = '${{ steps.run.outputs.templates }}';
- if ( template === '' ) {
- return;
- }
+ if ( template === '' ) {
+ return;
+ }
- const templateArr = template.split( '\n' );
- const modTemplateArr = [];
- let needsVersionBump = false;
+ const templateArr = template.split( '\n' );
+ const modTemplateArr = [];
+ let needsVersionBump = false;
- templateArr.forEach( ( el ) => {
- if ( el.match( /NOTICE/ ) ) {
- modTemplateArr.pop();
- return;
- }
+ templateArr.forEach( ( el ) => {
+ if ( el.match( /NOTICE/ ) ) {
+ modTemplateArr.pop();
+ return;
+ }
- if ( el.match( /WARNING/ ) ) {
- needsVersionBump = true;
- }
+ if ( el.match( /WARNING/ ) ) {
+ needsVersionBump = true;
+ }
- modTemplateArr.push( el );
- } );
+ modTemplateArr.push( el );
+ } );
- const templateResult = modTemplateArr.join( '\n' );
+ const templateResult = modTemplateArr.join( '\n' );
- if ( needsVersionBump ) {
- core.setFailed( `Templates have changed but template versions were not bumped:\n${ templateResult }` );
- }
+ if ( needsVersionBump ) {
+ core.setFailed( `Templates have changed but template versions were not bumped:\n${ templateResult }` );
+ }
diff --git a/.github/workflows/pr-lint-monorepo.yml b/.github/workflows/pr-lint-monorepo.yml
index 76ed1fac7da..684e8ca1ebd 100644
--- a/.github/workflows/pr-lint-monorepo.yml
+++ b/.github/workflows/pr-lint-monorepo.yml
@@ -1,37 +1,37 @@
name: Run lint checks potentially affecting projects across the monorepo
on:
- pull_request:
- branches:
- - 'trunk'
+ pull_request:
+ branches:
+ - 'trunk'
concurrency:
- group: changelogger-${{ github.event_name }}-${{ github.ref }}
- cancel-in-progress: true
+ group: changelogger-${{ github.event_name }}-${{ github.ref }}
+ cancel-in-progress: true
permissions: {}
jobs:
- changelogger_used:
- name: Changelogger use
- runs-on: ubuntu-20.04
- permissions:
- contents: read
- timeout-minutes: 15
- steps:
- - uses: actions/checkout@v3
- with:
- ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: 0
+ changelogger_used:
+ name: Changelogger use
+ runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ timeout-minutes: 15
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ fetch-depth: 0
- - name: Setup WooCommerce Monorepo
- uses: ./.github/actions/setup-woocommerce-monorepo
- with:
- build: false
+ - name: Setup WooCommerce Monorepo
+ uses: ./.github/actions/setup-woocommerce-monorepo
+ with:
+ build: false
- - name: Check change files are touched for touched projects
- env:
- BASE: ${{ github.event.pull_request.base.sha }}
- HEAD: ${{ github.event.pull_request.head.sha }}
- run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
+ - name: Check change files are touched for touched projects
+ env:
+ BASE: ${{ github.event.pull_request.base.sha }}
+ HEAD: ${{ github.event.pull_request.head.sha }}
+ run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
- - name: Run changelog validation
- run: pnpm run -r changelog validate
+ - name: Run changelog validation
+ run: pnpm run -r changelog validate
diff --git a/.github/workflows/pr-lint-test-js.yml b/.github/workflows/pr-lint-test-js.yml
index a89cb11712c..c5a58e444a6 100644
--- a/.github/workflows/pr-lint-test-js.yml
+++ b/.github/workflows/pr-lint-test-js.yml
@@ -1,6 +1,9 @@
name: Lint and tests for JS packages and woocommerce-admin/client
-on: pull_request
+on:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -12,15 +15,15 @@ jobs:
name: Lint and Test JS
runs-on: ubuntu-20.04
permissions:
- contents: read
+ contents: read
steps:
- uses: actions/checkout@v3
- name: Setup WooCommerce Monorepo
- uses: ./.github/actions/setup-woocommerce-monorepo
+ uses: ./.github/actions/setup-woocommerce-monorepo
- name: Lint
run: pnpm run -r --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color lint
- name: Test
- run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
+ run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
diff --git a/.github/workflows/pr-lint-test-skip.yml b/.github/workflows/pr-lint-test-skip.yml
new file mode 100644
index 00000000000..14929964ae1
--- /dev/null
+++ b/.github/workflows/pr-lint-test-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Run smoke tests against pull request.
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-project-label.yml b/.github/workflows/pr-project-label.yml
index eefbe73d910..efcbda4b3d6 100644
--- a/.github/workflows/pr-project-label.yml
+++ b/.github/workflows/pr-project-label.yml
@@ -1,23 +1,23 @@
name: 'Label Pull Request Project'
on:
- pull_request_target:
- types:
- - opened
- - synchronize
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ pull_request_target:
+ types:
+ - opened
+ - synchronize
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
permissions: {}
jobs:
- label_project:
- runs-on: ubuntu-20.04
- permissions:
- contents: read
- pull-requests: write
- steps:
- - uses: actions/labeler@v3
- with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
- configuration-path: .github/project-pr-labeler.yml
+ label_project:
+ runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ pull-requests: write
+ steps:
+ - uses: actions/labeler@v3
+ with:
+ repo-token: '${{ secrets.GITHUB_TOKEN }}'
+ configuration-path: .github/project-pr-labeler.yml
diff --git a/.github/workflows/pr-smoke-test-skip.yml b/.github/workflows/pr-smoke-test-skip.yml
new file mode 100644
index 00000000000..586208c4b77
--- /dev/null
+++ b/.github/workflows/pr-smoke-test-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Lint and tests for JS packages and woocommerce-admin/client
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-smoke-test.yml b/.github/workflows/pr-smoke-test.yml
index 10cb9c671e2..897433e8936 100644
--- a/.github/workflows/pr-smoke-test.yml
+++ b/.github/workflows/pr-smoke-test.yml
@@ -1,13 +1,15 @@
name: Run smoke tests against pull request.
on:
pull_request:
+ paths-ignore:
+ - '**/changelog/**'
branches:
- trunk
types:
- labeled
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
permissions: {}
@@ -17,8 +19,8 @@ jobs:
if: "${{ contains(github.event.label.name, 'run: smoke tests') }}"
runs-on: ubuntu-20.04
permissions:
- contents: read
- pull-requests: write
+ contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/pr-unit-tests-skip.yml b/.github/workflows/pr-unit-tests-skip.yml
new file mode 100644
index 00000000000..d91241ce164
--- /dev/null
+++ b/.github/workflows/pr-unit-tests-skip.yml
@@ -0,0 +1,12 @@
+# Duplicate workflow that returns success for this check when there is no relevant file change. See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
+name: Run unit tests on PR
+on:
+ pull_request:
+ paths:
+ - '!**'
+ - '**/changelog/**'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - run: 'echo "No build required"'
diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml
index 6142d55689b..63a87c54e1c 100644
--- a/.github/workflows/pr-unit-tests.yml
+++ b/.github/workflows/pr-unit-tests.yml
@@ -1,73 +1,75 @@
name: Run unit tests on PR
-on:
- pull_request
+on:
+ pull_request:
+ paths-ignore:
+ - '**/changelog/**'
defaults:
- run:
- shell: bash
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ run:
+ shell: bash
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
permissions: {}
jobs:
- test:
- name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}
- timeout-minutes: 30
- runs-on: ubuntu-20.04
- permissions:
- contents: read
- continue-on-error: ${{ matrix.wp == 'nightly' }}
- strategy:
- fail-fast: false
- matrix:
- php: [ '7.4', '8.0' ]
- wp: [ "latest" ]
- include:
- - wp: nightly
- php: '7.4'
- - wp: '5.9'
- php: 7.4
- - wp: '5.8'
- php: 7.4
- services:
- database:
- image: mysql:5.6
- env:
- MYSQL_ROOT_PASSWORD: root
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
- steps:
- - uses: actions/checkout@v3
+ test:
+ name: PHP ${{ matrix.php }} WP ${{ matrix.wp }}
+ timeout-minutes: 30
+ runs-on: ubuntu-20.04
+ permissions:
+ contents: read
+ continue-on-error: ${{ matrix.wp == 'nightly' }}
+ strategy:
+ fail-fast: false
+ matrix:
+ php: ['7.4', '8.0']
+ wp: ['latest']
+ include:
+ - wp: nightly
+ php: '7.4'
+ - wp: '5.9'
+ php: 7.4
+ - wp: '5.8'
+ php: 7.4
+ services:
+ database:
+ image: mysql:5.6
+ env:
+ MYSQL_ROOT_PASSWORD: root
+ ports:
+ - 3306:3306
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
+ steps:
+ - uses: actions/checkout@v3
- - name: Setup WooCommerce Monorepo
- uses: ./.github/actions/setup-woocommerce-monorepo
- with:
- php-version: ${{ matrix.php }}
+ - name: Setup WooCommerce Monorepo
+ uses: ./.github/actions/setup-woocommerce-monorepo
+ with:
+ php-version: ${{ matrix.php }}
- - name: Tool versions
- run: |
- php --version
- composer --version
+ - name: Tool versions
+ run: |
+ php --version
+ composer --version
- - name: Add PHP8 Compatibility.
- run: |
- if [ "$(php -r "echo version_compare(PHP_VERSION,'8.0','>=');")" ]; then
- cd plugins/woocommerce
- curl -L https://github.com/woocommerce/phpunit/archive/add-compatibility-with-php8-to-phpunit-7.zip -o /tmp/phpunit-7.5-fork.zip
- unzip -d /tmp/phpunit-7.5-fork /tmp/phpunit-7.5-fork.zip
- composer bin phpunit config --unset platform
- composer bin phpunit config repositories.0 '{"type": "path", "url": "/tmp/phpunit-7.5-fork/phpunit-add-compatibility-with-php8-to-phpunit-7", "options": {"symlink": false}}'
- composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
- rm -rf ./vendor/phpunit/
- composer dump-autoload
- fi
+ - name: Add PHP8 Compatibility.
+ run: |
+ if [ "$(php -r "echo version_compare(PHP_VERSION,'8.0','>=');")" ]; then
+ cd plugins/woocommerce
+ curl -L https://github.com/woocommerce/phpunit/archive/add-compatibility-with-php8-to-phpunit-7.zip -o /tmp/phpunit-7.5-fork.zip
+ unzip -d /tmp/phpunit-7.5-fork /tmp/phpunit-7.5-fork.zip
+ composer bin phpunit config --unset platform
+ composer bin phpunit config repositories.0 '{"type": "path", "url": "/tmp/phpunit-7.5-fork/phpunit-add-compatibility-with-php8-to-phpunit-7", "options": {"symlink": false}}'
+ composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
+ rm -rf ./vendor/phpunit/
+ composer dump-autoload
+ fi
- - name: Init DB and WP
- working-directory: plugins/woocommerce
- run: ./tests/bin/install.sh woo_test root root 127.0.0.1 ${{ matrix.wp }}
+ - name: Init DB and WP
+ working-directory: plugins/woocommerce
+ run: ./tests/bin/install.sh woo_test root root 127.0.0.1 ${{ matrix.wp }}
- - name: Run tests
- working-directory: plugins/woocommerce
- run: pnpm run test --filter=woocommerce --color
+ - name: Run tests
+ working-directory: plugins/woocommerce
+ run: pnpm run test --filter=woocommerce --color
From 11b46d4f779f736bc7aac60eaae2e5e72c418bec Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Thu, 12 Jan 2023 14:16:01 +1300
Subject: [PATCH 73/98] Add a new set of CLI commands to WooCommerce Beta
Tester (#36339)
---
.../changelog/dev-add-cli-command | 4 +
.../class-wc-beta-tester-admin-menus.php | 9 +-
.../includes/class-wc-beta-tester-cli.php | 89 +++++++++++++++++++
...wc-beta-tester-live-branches-installer.php | 20 +++++
.../live-branches/components/BranchList.tsx | 6 +-
.../woocommerce-beta-tester.php | 12 ++-
6 files changed, 134 insertions(+), 6 deletions(-)
create mode 100644 plugins/woocommerce-beta-tester/changelog/dev-add-cli-command
create mode 100644 plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-cli.php
diff --git a/plugins/woocommerce-beta-tester/changelog/dev-add-cli-command b/plugins/woocommerce-beta-tester/changelog/dev-add-cli-command
new file mode 100644
index 00000000000..b65eafa05a0
--- /dev/null
+++ b/plugins/woocommerce-beta-tester/changelog/dev-add-cli-command
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add a wp cli command for activating live branches.
diff --git a/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-admin-menus.php b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-admin-menus.php
index 3a79dd4b01c..7aa5efad1a8 100644
--- a/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-admin-menus.php
+++ b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-admin-menus.php
@@ -153,6 +153,13 @@ Copy and paste the system status report from **WooCommerce > System Status** in
* @return string
*/
protected function construct_ssr() {
+ // This function depends on the WC core global being available. Sometimes, such as when we deactivate
+ // WC to install a live branches version, WC will not be available and cause a crash if we don't exit early
+ // here.
+ if ( ! class_exists( 'WC' ) ) {
+ return '';
+ }
+
if ( version_compare( WC()->version, '3.6', '<' ) ) {
return '';
}
@@ -332,7 +339,7 @@ Copy and paste the system status report from **WooCommerce > System Status** in
$items_to_remove = array( 'wc-beta-tester-settings', 'wc-beta-tester-version-picker', 'wc-beta-tester' );
if ( isset( $submenu['plugins.php'] ) ) {
foreach ( $submenu['plugins.php'] as $key => $menu ) {
- if ( in_array( $menu[2], $items_to_remove ) ) {
+ if ( in_array( $menu[2], $items_to_remove, true ) ) {
unset( $submenu['plugins.php'][ $key ] );
}
}
diff --git a/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-cli.php b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-cli.php
new file mode 100644
index 00000000000..c10ae886d60
--- /dev/null
+++ b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-cli.php
@@ -0,0 +1,89 @@
+
+ * : The branch to install.
+ *
+ * ## Examples
+ *
+ * wp wc-beta-tester install update/some-branch
+ *
+ * @param array $args Arguments passed to CLI.
+ */
+ public function install( $args ) {
+ $installer = new WC_Beta_Tester_Live_Branches_Installer();
+
+ $branch = $args[0];
+
+ $info = $installer->get_branch_info_from_manifest( $branch );
+
+ if ( ! $info ) {
+ WP_CLI::error( "Could not find branch $branch in manifest" );
+ } else {
+ $install_result = $installer->install( $info->download_url, $info->branch, $info->version );
+
+ if ( is_wp_error( $install_result ) ) {
+ WP_CLI::error( $install_result->get_error_message() );
+ }
+
+ WP_CLI::success( "Installed $branch" );
+ }
+ }
+
+ /**
+ * Deactivate WooCommerce.
+ *
+ * ## Examples
+ * wp wc-beta-tester deactivate_woocommerce
+ */
+ public function deactivate_woocommerce() {
+ $installer = new WC_Beta_Tester_Live_Branches_Installer();
+ $installer->deactivate_woocommerce();
+
+ WP_CLI::success( 'Deactivated WooCommerce' );
+ }
+
+ /**
+ * Activate a live branch of the WooCommerce plugin.
+ *
+ * ## Options
+ *
+ * : The branch to activate.
+ *
+ * ## Examples
+ *
+ * wp wc-beta-tester activate update/some-branch*
+ *
+ * @param array $args Arguments passed to CLI.
+ */
+ public function activate( $args ) {
+ $installer = new WC_Beta_Tester_Live_Branches_Installer();
+ $branch = $args[0];
+ $info = $installer->get_branch_info_from_manifest( $branch );
+
+ if ( ! $info ) {
+ WP_CLI::error( "Could not find branch $branch in manifest" );
+ } else {
+ $installer->activate( $info->version );
+
+ WP_CLI::success( "Activated $branch" );
+ }
+ }
+}
diff --git a/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-live-branches-installer.php b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-live-branches-installer.php
index 8d4d6aa6af8..42cf568a629 100644
--- a/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-live-branches-installer.php
+++ b/plugins/woocommerce-beta-tester/includes/class-wc-beta-tester-live-branches-installer.php
@@ -46,6 +46,26 @@ class WC_Beta_Tester_Live_Branches_Installer {
return $wp_filesystem;
}
+ /**
+ * Get the download url of a WooCommerce plugin version from the manifest.
+ *
+ * @param string $branch The name of the branch.
+ */
+ public function get_branch_info_from_manifest( $branch ) {
+ $response = wp_remote_get( 'https://betadownload.jetpack.me/woocommerce-branches.json' );
+ $body = wp_remote_retrieve_body( $response );
+
+ $obj = json_decode( $body );
+
+ foreach ( $obj->pr as $key => $value ) {
+ if ( $value->branch === $branch ) {
+ return $value;
+ }
+ }
+
+ return false;
+ }
+
/**
* Install a WooCommerce plugin version by download url.
*
diff --git a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
index 4d044ea7e86..3a1b4c8f490 100644
--- a/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
+++ b/plugins/woocommerce-beta-tester/src/live-branches/components/BranchList.tsx
@@ -109,7 +109,7 @@ const BranchInfo = ( { branch }: { branch: Branch } ) => {
const WooCommerceVersionInfo = () => {
// @ts-ignore
- const version = window?.wc?.WC_VERSION || 'unknown';
+ const version = window?.wc?.wcSettings?.WC_VERSION || 'unknown';
return (
@@ -136,6 +136,8 @@ export const BranchList = ( { branches }: { branches: Branch[] } ) => {
uninstalledBranches[ 0 ]
);
+ const installedBranchesExist = !! installedBranches.length;
+
return (
<>
@@ -188,7 +190,7 @@ export const BranchList = ( { branches }: { branches: Branch[] } ) => {
- { installedBranches.length && (
+ { installedBranchesExist && (
Other Installed Branches
diff --git a/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php b/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php
index 0e4b5a711ec..633697db4d3 100644
--- a/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php
+++ b/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php
@@ -17,6 +17,12 @@
defined( 'ABSPATH' ) || exit;
+
+if ( defined( 'WP_CLI' ) ) {
+ require_once dirname( __FILE__ ) . '/includes/class-wc-beta-tester-cli.php';
+ WP_CLI::add_command( 'wc-beta-tester', WC_Beta_Tester_CLI::class );
+}
+
// Define WC_BETA_TESTER_FILE.
if ( ! defined( 'WC_BETA_TESTER_FILE' ) ) {
define( 'WC_BETA_TESTER_FILE', __FILE__ );
@@ -63,7 +69,7 @@ function _wc_beta_tester_bootstrap() {
}
// Load admin.
- require( 'plugin.php' );
+ require 'plugin.php';
}
add_action( 'plugins_loaded', '_wc_beta_tester_bootstrap' );
@@ -75,12 +81,12 @@ function add_extension_register_script() {
$script_path = '/build/index.js';
$script_asset_path = dirname( __FILE__ ) . '/build/index.asset.php';
$script_asset = file_exists( $script_asset_path )
- ? require( $script_asset_path )
+ ? require $script_asset_path
: array(
'dependencies' => array(),
'version' => filemtime( $script_path ),
);
- $script_url = plugins_url( $script_path, __FILE__ );
+ $script_url = plugins_url( $script_path, __FILE__ );
wp_register_script(
'woocommerce-admin-test-helper',
From e588c560bfad0e02b49aed942b5ffb330673eb9c Mon Sep 17 00:00:00 2001
From: Matt Harrison
Date: Wed, 11 Jan 2023 23:13:36 -0500
Subject: [PATCH 74/98] Update spelling of Cancelled to Canceled for US
English. (#36294)
* Update spelling of Cancelled to Canceled for US English.
This only updates output display text that uses US English. All code that uses
the form Cancelled is unchanged and is perfectly fine to stay as Cancelled.
(since it is behind the scenes and would require changes in other plugins)
For languages where Cancelled is preferred such as UK English the approprate
form can be applied in the translation files.
Fixes https://github.com/woocommerce/woocommerce/issues/25847
* add changelog file
* Update plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js
Co-authored-by: Chi-Hsuan Huang
Co-authored-by: Chi-Hsuan Huang
---
packages/js/components/changelog/canceled | 4 ++++
.../specs/merchant/wp-admin-order-status-filters.test.js | 2 +-
plugins/woocommerce/changelog/canceled | 4 ++++
.../admin/settings/class-wc-settings-accounts.php | 4 ++--
plugins/woocommerce/includes/class-wc-post-types.php | 4 ++--
.../woocommerce/includes/class-wc-regenerate-images.php | 2 +-
.../includes/emails/class-wc-email-cancelled-order.php | 6 +++---
.../emails/class-wc-email-customer-on-hold-order.php | 2 +-
plugins/woocommerce/includes/wc-order-functions.php | 2 +-
.../api-core-tests/tests/reports/reports-crud.test.js | 2 +-
.../api-core-tests/tests/settings/settings-crud.test.js | 8 ++++----
.../e2e-pw/tests/merchant/order-status-filter.spec.js | 2 +-
.../unit-tests/order/class-wc-tests-order-functions.php | 2 +-
13 files changed, 26 insertions(+), 18 deletions(-)
create mode 100644 packages/js/components/changelog/canceled
create mode 100644 plugins/woocommerce/changelog/canceled
diff --git a/packages/js/components/changelog/canceled b/packages/js/components/changelog/canceled
new file mode 100644
index 00000000000..2f8b5c512ca
--- /dev/null
+++ b/packages/js/components/changelog/canceled
@@ -0,0 +1,4 @@
+Significance: minor
+Type: tweak
+
+Update spelling of Cancelled to Canceled for US English.
diff --git a/packages/js/e2e-core-tests/src/specs/merchant/wp-admin-order-status-filters.test.js b/packages/js/e2e-core-tests/src/specs/merchant/wp-admin-order-status-filters.test.js
index 91a2451487b..5090f917a9c 100644
--- a/packages/js/e2e-core-tests/src/specs/merchant/wp-admin-order-status-filters.test.js
+++ b/packages/js/e2e-core-tests/src/specs/merchant/wp-admin-order-status-filters.test.js
@@ -16,7 +16,7 @@ const orderStatus = [
[ 'Processing', 'wc-processing' ],
[ 'On hold', 'wc-on-hold' ],
[ 'Completed', 'wc-completed' ],
- [ 'Cancelled', 'wc-cancelled' ],
+ [ 'Canceled', 'wc-cancelled' ],
[ 'Refunded', 'wc-refunded' ],
[ 'Failed', 'wc-failed' ],
];
diff --git a/plugins/woocommerce/changelog/canceled b/plugins/woocommerce/changelog/canceled
new file mode 100644
index 00000000000..2f8b5c512ca
--- /dev/null
+++ b/plugins/woocommerce/changelog/canceled
@@ -0,0 +1,4 @@
+Significance: minor
+Type: tweak
+
+Update spelling of Cancelled to Canceled for US English.
diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-accounts.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-accounts.php
index be1c1dd71f7..851bc7d2d46 100644
--- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-accounts.php
+++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-accounts.php
@@ -203,8 +203,8 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'autoload' => false,
),
array(
- 'title' => __( 'Retain cancelled orders', 'woocommerce' ),
- 'desc_tip' => __( 'Cancelled orders are unpaid and may have been cancelled by the store owner or customer. They will be trashed after the specified duration.', 'woocommerce' ),
+ 'title' => __( 'Retain canceled orders', 'woocommerce' ),
+ 'desc_tip' => __( 'Canceled orders are unpaid and may have been cancelled by the store owner or customer. They will be trashed after the specified duration.', 'woocommerce' ),
'id' => 'woocommerce_trash_cancelled_orders',
'type' => 'relative_date_selector',
'placeholder' => __( 'N/A', 'woocommerce' ),
diff --git a/plugins/woocommerce/includes/class-wc-post-types.php b/plugins/woocommerce/includes/class-wc-post-types.php
index 1ccafa5e2d7..43fcb6c975b 100644
--- a/plugins/woocommerce/includes/class-wc-post-types.php
+++ b/plugins/woocommerce/includes/class-wc-post-types.php
@@ -598,13 +598,13 @@ class WC_Post_Types {
'label_count' => _n_noop( 'Completed (%s) ', 'Completed (%s) ', 'woocommerce' ),
),
'wc-cancelled' => array(
- 'label' => _x( 'Cancelled', 'Order status', 'woocommerce' ),
+ 'label' => _x( 'Canceled', 'Order status', 'woocommerce' ),
'public' => false,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
/* translators: %s: number of orders */
- 'label_count' => _n_noop( 'Cancelled (%s) ', 'Cancelled (%s) ', 'woocommerce' ),
+ 'label_count' => _n_noop( 'Canceled (%s) ', 'Canceled (%s) ', 'woocommerce' ),
),
'wc-refunded' => array(
'label' => _x( 'Refunded', 'Order status', 'woocommerce' ),
diff --git a/plugins/woocommerce/includes/class-wc-regenerate-images.php b/plugins/woocommerce/includes/class-wc-regenerate-images.php
index ca59231e7fb..c2db4f8a8e1 100644
--- a/plugins/woocommerce/includes/class-wc-regenerate-images.php
+++ b/plugins/woocommerce/includes/class-wc-regenerate-images.php
@@ -158,7 +158,7 @@ class WC_Regenerate_Images {
$log = wc_get_logger();
$log->info(
- __( 'Cancelled product image regeneration job.', 'woocommerce' ),
+ __( 'Canceled product image regeneration job.', 'woocommerce' ),
array(
'source' => 'wc-image-regeneration',
)
diff --git a/plugins/woocommerce/includes/emails/class-wc-email-cancelled-order.php b/plugins/woocommerce/includes/emails/class-wc-email-cancelled-order.php
index eeb4d34c73e..7ed5a5fe221 100644
--- a/plugins/woocommerce/includes/emails/class-wc-email-cancelled-order.php
+++ b/plugins/woocommerce/includes/emails/class-wc-email-cancelled-order.php
@@ -28,8 +28,8 @@ if ( ! class_exists( 'WC_Email_Cancelled_Order', false ) ) :
*/
public function __construct() {
$this->id = 'cancelled_order';
- $this->title = __( 'Cancelled order', 'woocommerce' );
- $this->description = __( 'Cancelled order emails are sent to chosen recipient(s) when orders have been marked cancelled (if they were previously processing or on-hold).', 'woocommerce' );
+ $this->title = __( 'Canceled order', 'woocommerce' );
+ $this->description = __( 'Canceled order emails are sent to chosen recipient(s) when orders have been marked canceled (if they were previously processing or on-hold).', 'woocommerce' );
$this->template_html = 'emails/admin-cancelled-order.php';
$this->template_plain = 'emails/plain/admin-cancelled-order.php';
$this->placeholders = array(
@@ -66,7 +66,7 @@ if ( ! class_exists( 'WC_Email_Cancelled_Order', false ) ) :
* @return string
*/
public function get_default_heading() {
- return __( 'Order Cancelled: #{order_number}', 'woocommerce' );
+ return __( 'Order Canceled: #{order_number}', 'woocommerce' );
}
/**
diff --git a/plugins/woocommerce/includes/emails/class-wc-email-customer-on-hold-order.php b/plugins/woocommerce/includes/emails/class-wc-email-customer-on-hold-order.php
index 8be3f17c09d..bf7fd3487dc 100644
--- a/plugins/woocommerce/includes/emails/class-wc-email-customer-on-hold-order.php
+++ b/plugins/woocommerce/includes/emails/class-wc-email-customer-on-hold-order.php
@@ -30,7 +30,7 @@ if ( ! class_exists( 'WC_Email_Customer_On_Hold_Order', false ) ) :
$this->id = 'customer_on_hold_order';
$this->customer_email = true;
$this->title = __( 'Order on-hold', 'woocommerce' );
- $this->description = __( 'This is an order notification sent to customers containing order details after an order is placed on-hold from Pending, Cancelled or Failed order status.', 'woocommerce' );
+ $this->description = __( 'This is an order notification sent to customers containing order details after an order is placed on-hold from Pending, Canceled or Failed order status.', 'woocommerce' );
$this->template_html = 'emails/customer-on-hold-order.php';
$this->template_plain = 'emails/plain/customer-on-hold-order.php';
$this->placeholders = array(
diff --git a/plugins/woocommerce/includes/wc-order-functions.php b/plugins/woocommerce/includes/wc-order-functions.php
index 7a40e589768..a385c21d5f2 100644
--- a/plugins/woocommerce/includes/wc-order-functions.php
+++ b/plugins/woocommerce/includes/wc-order-functions.php
@@ -98,7 +98,7 @@ function wc_get_order_statuses() {
'wc-processing' => _x( 'Processing', 'Order status', 'woocommerce' ),
'wc-on-hold' => _x( 'On hold', 'Order status', 'woocommerce' ),
'wc-completed' => _x( 'Completed', 'Order status', 'woocommerce' ),
- 'wc-cancelled' => _x( 'Cancelled', 'Order status', 'woocommerce' ),
+ 'wc-cancelled' => _x( 'Canceled', 'Order status', 'woocommerce' ),
'wc-refunded' => _x( 'Refunded', 'Order status', 'woocommerce' ),
'wc-failed' => _x( 'Failed', 'Order status', 'woocommerce' ),
);
diff --git a/plugins/woocommerce/tests/api-core-tests/tests/reports/reports-crud.test.js b/plugins/woocommerce/tests/api-core-tests/tests/reports/reports-crud.test.js
index 2766df5af22..40b284a2b8d 100644
--- a/plugins/woocommerce/tests/api-core-tests/tests/reports/reports-crud.test.js
+++ b/plugins/woocommerce/tests/api-core-tests/tests/reports/reports-crud.test.js
@@ -281,7 +281,7 @@ test.describe('Reports API tests', () => {
expect.arrayContaining([
expect.objectContaining({
"slug": "cancelled",
- "name": "Cancelled",
+ "name": "Canceled",
"total": expect.any(Number)
})
]));
diff --git a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js
index 378ce377755..fd643ad419f 100644
--- a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js
+++ b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js
@@ -141,8 +141,8 @@ test.describe('Settings API tests: CRUD', () => {
expect.arrayContaining([
expect.objectContaining({
id: "email_cancelled_order",
- label: "Cancelled order",
- description: "Cancelled order emails are sent to chosen recipient(s) when orders have been marked cancelled (if they were previously processing or on-hold).",
+ label: "Canceled order",
+ description: "Canceled order emails are sent to chosen recipient(s) when orders have been marked canceled (if they were previously processing or on-hold).",
parent_id: "email",
"sub_groups": expect.arrayContaining([]),
})
@@ -162,7 +162,7 @@ test.describe('Settings API tests: CRUD', () => {
expect.objectContaining({
id: "email_customer_on_hold_order",
label: "Order on-hold",
- description: "This is an order notification sent to customers containing order details after an order is placed on-hold from Pending, Cancelled or Failed order status.",
+ description: "This is an order notification sent to customers containing order details after an order is placed on-hold from Pending, Canceled or Failed order status.",
parent_id: "email",
"sub_groups": expect.arrayContaining([]),
})
@@ -2550,4 +2550,4 @@ test.describe('Settings API tests: CRUD', () => {
});
});
-});
\ No newline at end of file
+});
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-status-filter.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-status-filter.spec.js
index 589a3bf08b9..04dc5261e58 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-status-filter.spec.js
+++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-status-filter.spec.js
@@ -10,7 +10,7 @@ const orderStatus = [
[ 'Processing', 'wc-processing' ],
[ 'On hold', 'wc-on-hold' ],
[ 'Completed', 'wc-completed' ],
- [ 'Cancelled', 'wc-cancelled' ],
+ [ 'Canceled', 'wc-cancelled' ],
[ 'Refunded', 'wc-refunded' ],
[ 'Failed', 'wc-failed' ],
];
diff --git a/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-order-functions.php b/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-order-functions.php
index 1999e4cf626..eb110323302 100644
--- a/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-order-functions.php
+++ b/plugins/woocommerce/tests/legacy/unit-tests/order/class-wc-tests-order-functions.php
@@ -29,7 +29,7 @@ class WC_Tests_Order_Functions extends WC_Unit_Test_Case {
'wc-processing' => _x( 'Processing', 'Order status', 'woocommerce' ),
'wc-on-hold' => _x( 'On hold', 'Order status', 'woocommerce' ),
'wc-completed' => _x( 'Completed', 'Order status', 'woocommerce' ),
- 'wc-cancelled' => _x( 'Cancelled', 'Order status', 'woocommerce' ),
+ 'wc-cancelled' => _x( 'Canceled', 'Order status', 'woocommerce' ),
'wc-refunded' => _x( 'Refunded', 'Order status', 'woocommerce' ),
'wc-failed' => _x( 'Failed', 'Order status', 'woocommerce' ),
)
From b8c25b49bf53c4424926608f0c9c8b56a0e8a5b0 Mon Sep 17 00:00:00 2001
From: louwie17
Date: Thu, 12 Jan 2023 04:02:35 -0400
Subject: [PATCH 75/98] Initial product form field store (#36362)
* Add initial product fields registry store and helper functions
* Add changelog
* Change edit to render and address PR feedback
* Make use of memoize-one instead of rememo as memoize-one is already installed
---
.../add-36074_product_form_field_registry | 4 ++
.../components/src/product-fields/README.md | 46 ++++++++++++
.../src/product-fields/api/index.ts | 2 +
.../src/product-fields/api/registration.ts | 45 ++++++++++++
.../src/product-fields/api/render.tsx | 28 ++++++++
.../js/components/src/product-fields/index.ts | 2 +
.../src/product-fields/store/action-types.ts | 5 ++
.../src/product-fields/store/actions.ts | 14 ++++
.../src/product-fields/store/constants.ts | 1 +
.../src/product-fields/store/index.ts | 21 ++++++
.../src/product-fields/store/reducer.ts | 32 +++++++++
.../src/product-fields/store/selectors.ts | 20 ++++++
.../src/product-fields/store/types.ts | 15 ++++
.../src/product-fields/stories/index.tsx | 71 +++++++++++++++++++
14 files changed, 306 insertions(+)
create mode 100644 packages/js/components/changelog/add-36074_product_form_field_registry
create mode 100644 packages/js/components/src/product-fields/README.md
create mode 100644 packages/js/components/src/product-fields/api/index.ts
create mode 100644 packages/js/components/src/product-fields/api/registration.ts
create mode 100644 packages/js/components/src/product-fields/api/render.tsx
create mode 100644 packages/js/components/src/product-fields/index.ts
create mode 100644 packages/js/components/src/product-fields/store/action-types.ts
create mode 100644 packages/js/components/src/product-fields/store/actions.ts
create mode 100644 packages/js/components/src/product-fields/store/constants.ts
create mode 100644 packages/js/components/src/product-fields/store/index.ts
create mode 100644 packages/js/components/src/product-fields/store/reducer.ts
create mode 100644 packages/js/components/src/product-fields/store/selectors.ts
create mode 100644 packages/js/components/src/product-fields/store/types.ts
create mode 100644 packages/js/components/src/product-fields/stories/index.tsx
diff --git a/packages/js/components/changelog/add-36074_product_form_field_registry b/packages/js/components/changelog/add-36074_product_form_field_registry
new file mode 100644
index 00000000000..bef870437e3
--- /dev/null
+++ b/packages/js/components/changelog/add-36074_product_form_field_registry
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add product field store and helper functions for rendering fields from config.
diff --git a/packages/js/components/src/product-fields/README.md b/packages/js/components/src/product-fields/README.md
new file mode 100644
index 00000000000..3853b38445f
--- /dev/null
+++ b/packages/js/components/src/product-fields/README.md
@@ -0,0 +1,46 @@
+# Product Fields
+
+Product Fields are used within the WooCommerce Admin product editor, for rendering new fields using PHP.
+
+## Example
+
+```js
+// product-field.js
+( function ( element ) {
+ const el = element.createElement;
+
+ registerProductField( 'number', {
+ name: 'number',
+ render: () => {
+ return ;
+ },
+ } );
+} )( window.wp.element );
+```
+
+## API
+
+### registerProductField
+
+Registers a new product field provided a unique name and an object defining its
+behavior.
+
+_Usage_
+
+```js
+import { __ } from '@wordpress/i18n';
+import { registerProductField } from '@woocommerce/components';
+
+registerProductField( 'number', {
+ name: 'number',
+ render: () => {
+ return ;
+ },
+} );
+```
+
+_Parameters_
+
+- _fieldName_ `string`: Field name.
+- _settings_ `Object`: Field settings.
+ - _render_ `ComponentType`: React functional component to be rendered.
diff --git a/packages/js/components/src/product-fields/api/index.ts b/packages/js/components/src/product-fields/api/index.ts
new file mode 100644
index 00000000000..1954665dce2
--- /dev/null
+++ b/packages/js/components/src/product-fields/api/index.ts
@@ -0,0 +1,2 @@
+export * from './registration';
+export * from './render';
diff --git a/packages/js/components/src/product-fields/api/registration.ts b/packages/js/components/src/product-fields/api/registration.ts
new file mode 100644
index 00000000000..d9b8c5f4cc6
--- /dev/null
+++ b/packages/js/components/src/product-fields/api/registration.ts
@@ -0,0 +1,45 @@
+/**
+ * External dependencies
+ */
+import { select, dispatch } from '@wordpress/data';
+
+/**
+ * Internal dependencies
+ */
+import { store as productFieldStore } from '../store';
+import { ProductFieldDefinition } from '../store/types';
+
+/**
+ * Registers a new product field provided a unique name and an object defining its
+ * behavior. Once registered, the field is made available to use with the product form API.
+ *
+ * @param {string|Object} fieldName Field name.
+ * @param {Object} settings Field settings.
+ *
+ * @example
+ * ```js
+ * import { registerProductField } from '@woocommerce/components'
+ *
+ * registerProductFieldType( 'attributes-field', {
+ * } );
+ * ```
+ */
+export function registerProductField(
+ fieldName: string,
+ settings: ProductFieldDefinition
+) {
+ if ( select( productFieldStore ).getProductField( fieldName ) ) {
+ // eslint-disable-next-line no-console
+ console.error(
+ 'Product Field "' + fieldName + '" is already registered.'
+ );
+ return;
+ }
+
+ dispatch( productFieldStore ).registerProductField( {
+ attributes: {},
+ ...settings,
+ } );
+
+ return select( productFieldStore ).getProductField( fieldName );
+}
diff --git a/packages/js/components/src/product-fields/api/render.tsx b/packages/js/components/src/product-fields/api/render.tsx
new file mode 100644
index 00000000000..5fc727f08af
--- /dev/null
+++ b/packages/js/components/src/product-fields/api/render.tsx
@@ -0,0 +1,28 @@
+/**
+ * External dependencies
+ */
+import { select } from '@wordpress/data';
+import { createElement } from '@wordpress/element';
+
+/**
+ * Internal dependencies
+ */
+import { store as productFieldStore } from '../store';
+import { ProductFieldDefinition } from '../store/types';
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export function renderField( name: string, props: Record< string, any > ) {
+ const fieldConfig: ProductFieldDefinition =
+ select( productFieldStore ).getProductField( name );
+
+ if ( fieldConfig.render ) {
+ return ;
+ }
+ if ( fieldConfig.type ) {
+ return createElement( 'input', {
+ type: fieldConfig.type,
+ ...props,
+ } );
+ }
+ return null;
+}
diff --git a/packages/js/components/src/product-fields/index.ts b/packages/js/components/src/product-fields/index.ts
new file mode 100644
index 00000000000..a28dcc4ff74
--- /dev/null
+++ b/packages/js/components/src/product-fields/index.ts
@@ -0,0 +1,2 @@
+export { store } from './store';
+export * from './api';
diff --git a/packages/js/components/src/product-fields/store/action-types.ts b/packages/js/components/src/product-fields/store/action-types.ts
new file mode 100644
index 00000000000..eee684797bf
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/action-types.ts
@@ -0,0 +1,5 @@
+export enum TYPES {
+ REGISTER_FIELD = 'REGISTER_FIELD',
+}
+
+export default TYPES;
diff --git a/packages/js/components/src/product-fields/store/actions.ts b/packages/js/components/src/product-fields/store/actions.ts
new file mode 100644
index 00000000000..a8ad2f0eb8e
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/actions.ts
@@ -0,0 +1,14 @@
+/**
+ * Internal dependencies
+ */
+import TYPES from './action-types';
+import { ProductFieldDefinition } from './types';
+
+export function registerProductField( field: ProductFieldDefinition ) {
+ return {
+ type: TYPES.REGISTER_FIELD as const,
+ field,
+ };
+}
+
+export type Actions = ReturnType< typeof registerProductField >;
diff --git a/packages/js/components/src/product-fields/store/constants.ts b/packages/js/components/src/product-fields/store/constants.ts
new file mode 100644
index 00000000000..d49d3fb3e21
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/constants.ts
@@ -0,0 +1 @@
+export const STORE_NAME = 'wc/admin/product/fields';
diff --git a/packages/js/components/src/product-fields/store/index.ts b/packages/js/components/src/product-fields/store/index.ts
new file mode 100644
index 00000000000..9c53ed96870
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/index.ts
@@ -0,0 +1,21 @@
+/**
+ * External dependencies
+ */
+import { createReduxStore, register } from '@wordpress/data';
+
+/**
+ * Internal dependencies
+ */
+import reducer from './reducer';
+import * as selectors from './selectors';
+import * as actions from './actions';
+import { STORE_NAME } from './constants';
+
+export const store = createReduxStore( STORE_NAME, {
+ // @ts-expect-error reducer has correct format.
+ reducer,
+ selectors,
+ actions,
+} );
+
+register( store );
diff --git a/packages/js/components/src/product-fields/store/reducer.ts b/packages/js/components/src/product-fields/store/reducer.ts
new file mode 100644
index 00000000000..cb2338f963e
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/reducer.ts
@@ -0,0 +1,32 @@
+/**
+ * Internal dependencies
+ */
+import TYPES from './action-types';
+import { Actions } from './actions';
+import { ProductFieldState } from './types';
+
+const reducer = (
+ state: ProductFieldState = {
+ fields: {},
+ },
+ payload: Actions
+) => {
+ if ( payload && 'type' in payload ) {
+ switch ( payload.type ) {
+ case TYPES.REGISTER_FIELD:
+ return {
+ ...state,
+ fields: {
+ ...state.fields,
+ [ payload.field.name ]: payload.field,
+ },
+ };
+ default:
+ return state;
+ }
+ }
+ return state;
+};
+
+export type State = ReturnType< typeof reducer >;
+export default reducer;
diff --git a/packages/js/components/src/product-fields/store/selectors.ts b/packages/js/components/src/product-fields/store/selectors.ts
new file mode 100644
index 00000000000..bf65df94899
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/selectors.ts
@@ -0,0 +1,20 @@
+/**
+ * External dependencies
+ */
+import memoize from 'memoize-one';
+
+/**
+ * Internal dependencies
+ */
+import { ProductFieldState } from './types';
+
+export function getProductField( state: ProductFieldState, name: string ) {
+ return state.fields[ name ] || null;
+}
+
+export const getRegisteredProductFields = memoize(
+ ( state: ProductFieldState ) => Object.keys( state.fields ),
+ ( [ newState ], [ oldState ] ) => {
+ return newState.fields === oldState.fields;
+ }
+);
diff --git a/packages/js/components/src/product-fields/store/types.ts b/packages/js/components/src/product-fields/store/types.ts
new file mode 100644
index 00000000000..c5de06cb663
--- /dev/null
+++ b/packages/js/components/src/product-fields/store/types.ts
@@ -0,0 +1,15 @@
+/**
+ * External dependencies
+ */
+import { ComponentType } from 'react';
+
+export type ProductFieldDefinition = {
+ name: string;
+ type?: string;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ render?: ComponentType;
+};
+
+export type ProductFieldState = {
+ fields: Record< string, ProductFieldDefinition >;
+};
diff --git a/packages/js/components/src/product-fields/stories/index.tsx b/packages/js/components/src/product-fields/stories/index.tsx
new file mode 100644
index 00000000000..04496d889ca
--- /dev/null
+++ b/packages/js/components/src/product-fields/stories/index.tsx
@@ -0,0 +1,71 @@
+/**
+ * External dependencies
+ */
+import React from 'react';
+import { useState, createElement } from '@wordpress/element';
+import { createRegistry, RegistryProvider, select } from '@wordpress/data';
+import {
+ // @ts-expect-error `__experimentalInputControl` does exist.
+ __experimentalInputControl as InputControl,
+} from '@wordpress/components';
+
+/**
+ * Internal dependencies
+ */
+import { store } from '../store';
+import { registerProductField, renderField } from '../api';
+
+const registry = createRegistry();
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore No types for this exist yet.
+registry.register( store );
+
+registerProductField( 'text', {
+ name: 'text',
+ render: ( props ) => {
+ return ;
+ },
+} );
+
+registerProductField( 'number', {
+ name: 'number',
+ render: () => {
+ return ;
+ },
+} );
+
+const RenderField = () => {
+ const fields: string[] = select( store ).getRegisteredProductFields();
+ const [ selectedField, setSelectedField ] = useState(
+ fields ? fields[ 0 ] : undefined
+ );
+
+ const handleChange = ( event ) => {
+ setSelectedField( event.target.value );
+ };
+ return (
+
+
+ { fields.map( ( field ) => (
+
+ { field }
+
+ ) ) }
+
+ { selectedField && renderField( selectedField, { name: 'test' } ) }
+
+ );
+};
+
+export const Basic: React.FC = () => {
+ return (
+
+
+
+ );
+};
+
+export default {
+ title: 'WooCommerce Admin/experimental/product-fields',
+ component: Basic,
+};
From 11af1e6381a63b85c5a28d3a558ff8f314debed0 Mon Sep 17 00:00:00 2001
From: louwie17
Date: Thu, 12 Jan 2023 04:39:38 -0400
Subject: [PATCH 76/98] Add/36019 php product form helper classes (#36093)
* Add initial PHP classes for field registry with tests
* Add README
* Add changelog
* Add sorting to get fields and add test for this
* Update location to section
* Fix lint errors
* Address PR feedback and add Card and Section classes
* Fix php unit test
* Some more cleanup and consolidation of product form component logic
* Fix tests and linting
* Rename Card to Subsection and move some logic around
* Rename Form to FormFactory
* Fix lint errors
---
.../add-36019_php_product_form_helper_classes | 4 +
.../Internal/Admin/ProductForm/Component.php | 114 ++++++++
.../Admin/ProductForm/ComponentTrait.php | 59 +++++
.../src/Internal/Admin/ProductForm/Field.php | 77 ++++++
.../Admin/ProductForm/FormFactory.php | 246 ++++++++++++++++++
.../src/Internal/Admin/ProductForm/README.md | 26 ++
.../Internal/Admin/ProductForm/Section.php | 71 +++++
.../Internal/Admin/ProductForm/Subsection.php | 11 +
.../woocommerce-admin/product-form/field.php | 28 ++
.../product-form/form-factory.php | 206 +++++++++++++++
10 files changed, 842 insertions(+)
create mode 100644 plugins/woocommerce/changelog/add-36019_php_product_form_helper_classes
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/ComponentTrait.php
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/Field.php
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
create mode 100644 plugins/woocommerce/src/Internal/Admin/ProductForm/Subsection.php
create mode 100644 plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/product-form/field.php
create mode 100644 plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/product-form/form-factory.php
diff --git a/plugins/woocommerce/changelog/add-36019_php_product_form_helper_classes b/plugins/woocommerce/changelog/add-36019_php_product_form_helper_classes
new file mode 100644
index 00000000000..30b2c100ca4
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36019_php_product_form_helper_classes
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add initial product form PHP helper class to add new fields.
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
new file mode 100644
index 00000000000..55205c631a7
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
@@ -0,0 +1,114 @@
+id = $id;
+ $this->plugin_id = $plugin_id;
+ $this->additional_args = $additional_args;
+ }
+
+ /**
+ * Component arguments.
+ *
+ * @return array
+ */
+ public function get_additional_args() {
+ return $this->additional_args;
+ }
+
+ /**
+ * Component arguments.
+ *
+ * @param string $key key of argument.
+ * @return mixed
+ */
+ public function get_additional_argument( $key ) {
+ return self::get_argument_from_path( $this->additional_args, $key );
+ }
+
+ /**
+ * Get the component as JSON.
+ *
+ * @return array
+ */
+ public function get_json() {
+ return array_merge(
+ array(
+ 'id' => $this->get_id(),
+ 'plugin_id' => $this->get_plugin_id(),
+ ),
+ $this->get_additional_args()
+ );
+ }
+
+ /**
+ * Sorting function for product form component.
+ *
+ * @param Component $a Component a.
+ * @param Component $b Component b.
+ * @param array $sort_by key and order to sort by.
+ * @return int
+ */
+ public static function sort( $a, $b, $sort_by = array() ) {
+ $key = $sort_by['key'];
+ $a_val = $a->get_additional_argument( $key );
+ $b_val = $b->get_additional_argument( $key );
+ if ( 'asc' === $sort_by['order'] ) {
+ return $a_val <=> $b_val;
+ } else {
+ return $b_val <=> $a_val;
+ }
+ }
+
+ /**
+ * Gets argument by dot notation path.
+ *
+ * @param array $arguments Arguments array.
+ * @param string $path Path for argument key.
+ * @param string $delimiter Path delimiter, default: '.'.
+ * @return mixed|null
+ */
+ public static function get_argument_from_path( $arguments, $path, $delimiter = '.' ) {
+ $path_keys = explode( $delimiter, $path );
+ $num_keys = count( $path_keys );
+
+ $val = $arguments;
+ for ( $i = 0; $i < $num_keys; $i++ ) {
+ $key = $path_keys[ $i ];
+ if ( array_key_exists( $key, $val ) ) {
+ $val = $val[ $key ];
+ } else {
+ $val = null;
+ break;
+ }
+ }
+ return $val;
+ }
+}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/ComponentTrait.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/ComponentTrait.php
new file mode 100644
index 00000000000..ce2d75eada5
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/ComponentTrait.php
@@ -0,0 +1,59 @@
+id;
+ }
+
+ /**
+ * Return plugin id.
+ *
+ * @return string
+ */
+ public function get_plugin_id() {
+ return $this->plugin_id;
+ }
+}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Field.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Field.php
new file mode 100644
index 00000000000..0f471d67832
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Field.php
@@ -0,0 +1,77 @@
+ (string) Field type. Required.
+ * 'section' => (string) Field location. Required.
+ * 'order' => (int) Field order.
+ * 'properties' => (array) Field properties.
+ * ).
+ * @throws \Exception If there are missing arguments.
+ */
+ public function __construct( $id, $plugin_id, $additional_args ) {
+ parent::__construct( $id, $plugin_id, $additional_args );
+
+ $missing_arguments = self::get_missing_arguments( $additional_args );
+ if ( count( $missing_arguments ) > 0 ) {
+ throw new \Exception(
+ sprintf(
+ /* translators: 1: Missing arguments list. */
+ esc_html__( 'You are missing required arguments of WooCommerce ProductForm Field: %1$s', 'woocommerce' ),
+ join( ', ', $missing_arguments )
+ )
+ );
+ }
+ $this->type = $additional_args['type'];
+ }
+
+ /**
+ * Get missing arguments of args array.
+ *
+ * @param array $args field arguments.
+ * @return array
+ */
+ public static function get_missing_arguments( $args ) {
+ return array_values(
+ array_filter(
+ self::REQUIRED_ARGUMENTS,
+ function( $arg_key ) use ( $args ) {
+ return null === self::get_argument_from_path( $args, $arg_key );
+ }
+ )
+ );
+ }
+}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
new file mode 100644
index 00000000000..fa6e2d9f121
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
@@ -0,0 +1,246 @@
+ (string) Field type. Required.
+ * 'section' => (string) Field location. Required.
+ * 'order' => (int) Field order.
+ * 'properties' => (array) Field properties.
+ * 'name' => (string) Field name.
+ * ).
+ * @return Field|WP_Error New field or WP_Error.
+ */
+ public static function add_field( $id, $plugin_id, $args ) {
+ $new_field = self::create_item( 'field', 'Field', $id, $plugin_id, $args );
+ if ( is_wp_error( $new_field ) ) {
+ return $new_field;
+ }
+ self::$form_fields[ $id ] = $new_field;
+ return $new_field;
+ }
+
+ /**
+ * Adds a Subsection to the product form.
+ *
+ * @param string $id Subsection id.
+ * @param string $plugin_id Plugin id.
+ * @param array $args Array containing the necessary arguments.
+ * @return Card|WP_Error New subsection or WP_Error.
+ */
+ public static function add_subsection( $id, $plugin_id, $args = array() ) {
+ $new_subsection = self::create_item( 'subsection', 'Subsection', $id, $plugin_id, $args );
+ if ( is_wp_error( $new_subsection ) ) {
+ return $new_subsection;
+ }
+ self::$form_subsections[ $id ] = $new_subsection;
+ return $new_subsection;
+ }
+
+ /**
+ * Adds a section to the product form.
+ *
+ * @param string $id Card id.
+ * @param string $plugin_id Plugin id.
+ * @param array $args Array containing the necessary arguments.
+ * @return Card|WP_Error New section or WP_Error.
+ */
+ public static function add_section( $id, $plugin_id, $args ) {
+ $new_section = self::create_item( 'section', 'Section', $id, $plugin_id, $args );
+ if ( is_wp_error( $new_section ) ) {
+ return $new_section;
+ }
+ self::$form_sections[ $id ] = $new_section;
+ return $new_section;
+ }
+
+ /**
+ * Returns form config.
+ *
+ * @return array form config.
+ */
+ public static function get_form_config() {
+ return array(
+ 'fields' => self::get_fields(),
+ 'cards' => self::get_cards(),
+ 'sections' => self::get_sections(),
+ );
+ }
+
+ /**
+ * Returns list of registered fields.
+ *
+ * @param array $sort_by key and order to sort by.
+ * @return array list of registered fields.
+ */
+ public static function get_fields( $sort_by = array(
+ 'key' => 'order',
+ 'order' => 'asc',
+ ) ) {
+ return self::get_items( 'field', 'Field', $sort_by );
+ }
+
+ /**
+ * Returns list of registered cards.
+ *
+ * @param array $sort_by key and order to sort by.
+ * @return array list of registered cards.
+ */
+ public static function get_subsections( $sort_by = array(
+ 'key' => 'order',
+ 'order' => 'asc',
+ ) ) {
+ return self::get_items( 'subsection', 'Subsection', $sort_by );
+ }
+
+ /**
+ * Returns list of registered sections.
+ *
+ * @param array $sort_by key and order to sort by.
+ * @return array list of registered sections.
+ */
+ public static function get_sections( $sort_by = array(
+ 'key' => 'order',
+ 'order' => 'asc',
+ ) ) {
+ return self::get_items( 'section', 'Section', $sort_by );
+ }
+
+ /**
+ * Returns list of registered items.
+ *
+ * @param string $type Form component type.
+ * @param class-string $class_name Class of component type.
+ * @param array $sort_by key and order to sort by.
+ * @return array list of registered items.
+ */
+ private static function get_items( $type, $class_name, $sort_by = array(
+ 'key' => 'order',
+ 'order' => 'asc',
+ ) ) {
+ $item_list = self::${ 'form_' . $type . 's' };
+ $class = 'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\' . $class_name;
+ $items = array_values( $item_list );
+ if ( class_exists( $class ) && method_exists( $class, 'sort' ) ) {
+ usort(
+ $items,
+ function ( $a, $b ) use ( $sort_by, $class ) {
+ return $class::sort( $a, $b, $sort_by );
+ }
+ );
+ }
+ return $items;
+ }
+
+ /**
+ * Creates a new item.
+ *
+ * @param string $type Form component type.
+ * @param class-string $class_name Class of component type.
+ * @param string $id Item id.
+ * @param string $plugin_id Plugin id.
+ * @param array $args additional arguments for item.
+ * @return Field|Card|Section|WP_Error New product form item or WP_Error.
+ */
+ private static function create_item( $type, $class_name, $id, $plugin_id, $args ) {
+ $item_list = self::${ 'form_' . $type . 's' };
+ $class = 'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\' . $class_name;
+ if ( ! class_exists( $class ) ) {
+ return new WP_Error(
+ 'wc_product_form_' . $type . '_missing_form_class',
+ sprintf(
+ /* translators: 1: missing class name. */
+ esc_html__( '%1$s class does not exist.', 'woocommerce' ),
+ $class
+ )
+ );
+ }
+ if ( isset( $item_list[ $id ] ) ) {
+ return new WP_Error(
+ 'wc_product_form_' . $type . '_duplicate_field_id',
+ sprintf(
+ /* translators: 1: Item type 2: Duplicate registered item id. */
+ esc_html__( 'You have attempted to register a duplicate form %1$s with WooCommerce Form: %2$s', 'woocommerce' ),
+ $type,
+ '`' . $id . '`'
+ )
+ );
+ }
+
+ $defaults = array(
+ 'order' => 20,
+ );
+
+ $item_arguments = wp_parse_args( $args, $defaults );
+
+ try {
+ return new $class( $id, $plugin_id, $item_arguments );
+ } catch ( \Exception $e ) {
+ return new WP_Error(
+ 'wc_product_form_' . $type . '_class_creation',
+ $e->getMessage()
+ );
+ }
+ }
+}
+
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md b/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
new file mode 100644
index 00000000000..fb8cb7ed1e3
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
@@ -0,0 +1,26 @@
+# Product Form
+
+This folder contains helper classes to specifically extend the WooCommerce Admin product form.
+This will primarily be done through the `Form` class, under the `Automattic\WooCommerce\Internal\Admin\ProductForm` namespace.
+
+## Ex - Adding a new field:
+
+```php
+function add_product_form_field() {
+ if (
+ ! method_exists( '\Automattic\WooCommerce\Internal\Admin\ProductForm\Form', 'add_field' )
+ ) {
+ return;
+ }
+
+ \Automattic\WooCommerce\Internal\Admin\ProductForm\FormFactory::add_field(
+ 'test_new_field',
+ 'woocommerce-plugin-name',
+ array(
+ 'type' => 'text',
+ 'location' => 'plugin-details',
+ )
+ );
+}
+add_filter( 'admin_init', 'add_product_form_field' );
+```
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
new file mode 100644
index 00000000000..b86512bdb7a
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
@@ -0,0 +1,71 @@
+ (int) Section order.
+ * 'title' => (string) Section description.
+ * 'description' => (string) Section description.
+ * ).
+ * @throws \Exception If there are missing arguments.
+ */
+ public function __construct( $id, $plugin_id, $additional_args ) {
+ parent::__construct( $id, $plugin_id, $additional_args );
+
+ $missing_arguments = self::get_missing_arguments( $additional_args );
+ if ( count( $missing_arguments ) > 0 ) {
+ throw new \Exception(
+ sprintf(
+ /* translators: 1: Missing arguments list. */
+ esc_html__( 'You are missing required arguments of WooCommerce ProductForm Section: %1$s', 'woocommerce' ),
+ join( ', ', $missing_arguments )
+ )
+ );
+ }
+ $this->title = $additional_args['title'];
+ }
+
+ /**
+ * Get missing arguments of args array.
+ *
+ * @param array $args section arguments.
+ * @return array
+ */
+ public static function get_missing_arguments( $args ) {
+ return array_filter(
+ self::REQUIRED_ARGUMENTS,
+ function( $arg_key ) use ( $args ) {
+ return null === self::get_argument_from_path( $args, $arg_key );
+ }
+ );
+ }
+}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Subsection.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Subsection.php
new file mode 100644
index 00000000000..05a857f0876
--- /dev/null
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Subsection.php
@@ -0,0 +1,11 @@
+ 'product_details',
+ )
+ );
+
+ $this->assertEquals( array( 'type', 'properties.name', 'properties.label' ), $missing_args );
+ }
+}
+
diff --git a/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/product-form/form-factory.php b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/product-form/form-factory.php
new file mode 100644
index 00000000000..14f3bca9d7c
--- /dev/null
+++ b/plugins/woocommerce/tests/legacy/unit-tests/woocommerce-admin/product-form/form-factory.php
@@ -0,0 +1,206 @@
+assertInstanceOf( 'WP_Error', $field );
+ $this->assertContains( 'You are missing required arguments of WooCommerce ProductForm Field: type, section, properties.name, properties.label', $field->get_error_message() );
+ }
+
+ /**
+ * Test add_field duplicate field id.
+ */
+ public function test_add_field_duplicate_field_id() {
+ Form::add_field(
+ 'id',
+ 'woocommerce',
+ array(
+ 'type' => 'text',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ $field_duplicate = Form::add_field(
+ 'id',
+ 'woocommerce',
+ array(
+ 'type' => 'text',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+ $this->assertInstanceOf( 'WP_Error', $field_duplicate );
+ $this->assertContains( 'You have attempted to register a duplicate form field with WooCommerce Form: `id`', $field_duplicate->get_error_message() );
+ }
+
+ /**
+ * Test that get_fields.
+ */
+ public function test_get_fields() {
+ Form::add_field(
+ 'id',
+ 'woocommerce',
+ array(
+ 'type' => 'text',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ Form::add_field(
+ 'id2',
+ 'woocommerce',
+ array(
+ 'type' => 'textarea',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ $fields = Form::get_fields();
+ $this->assertEquals( 2, count( $fields ) );
+ $this->assertEquals( 'text', $fields[0]->type );
+ $this->assertEquals( 'textarea', $fields[1]->type );
+ }
+
+ /**
+ * Test that get_fields.
+ */
+ public function test_get_fields_sort_default() {
+ Form::add_field(
+ 'id',
+ 'woocommerce',
+ array(
+ 'type' => 'text',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ Form::add_field(
+ 'id2',
+ 'woocommerce',
+ array(
+ 'type' => 'textarea',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ Form::add_field(
+ 'first',
+ 'woocommerce',
+ array(
+ 'order' => 1,
+ 'type' => 'textarea',
+ 'section' => 'product_details',
+ 'properties' => array(
+ 'label' => 'label',
+ 'name' => 'name',
+ ),
+ )
+ );
+
+ $fields = Form::get_fields();
+ $this->assertEquals( 3, count( $fields ) );
+ $this->assertEquals( 'first', $fields[0]->get_id() );
+ $this->assertEquals( 'id', $fields[1]->get_id() );
+ $this->assertEquals( 'id2', $fields[2]->get_id() );
+ }
+
+ /**
+ * Test that get_cards.
+ */
+ public function test_get_cards_sort_default() {
+ Form::add_subsection(
+ 'id',
+ 'woocommerce'
+ );
+
+ Form::add_subsection(
+ 'id2',
+ 'woocommerce'
+ );
+
+ Form::add_subsection(
+ 'first',
+ 'woocommerce',
+ array(
+ 'order' => 1,
+ )
+ );
+
+ $subsections = Form::get_subsections();
+ $this->assertEquals( 3, count( $subsections ) );
+ $this->assertEquals( 'first', $subsections[0]->get_id() );
+ $this->assertEquals( 'id', $subsections[1]->get_id() );
+ $this->assertEquals( 'id2', $subsections[2]->get_id() );
+ }
+
+ /**
+ * Test that get_sections.
+ */
+ public function test_get_sections_sort_default() {
+ Form::add_section(
+ 'id',
+ 'woocommerce',
+ array()
+ );
+
+ Form::add_section(
+ 'id2',
+ 'woocommerce',
+ array(
+ 'title' => 'title',
+ )
+ );
+
+ Form::add_section(
+ 'first',
+ 'woocommerce',
+ array(
+ 'order' => 1,
+ 'title' => 'title',
+ )
+ );
+
+ $sections = Form::get_sections();
+ $this->assertEquals( 2, count( $sections ) );
+ $this->assertEquals( 'first', $sections[0]->get_id() );
+ $this->assertEquals( 'id2', $sections[1]->get_id() );
+ }
+}
+
From 54c0acf8cd2264521c57c92e2ea8cfc45b9cd100 Mon Sep 17 00:00:00 2001
From: Matt Sherman
Date: Thu, 12 Jan 2023 10:21:43 -0500
Subject: [PATCH 77/98] Decode HTML entities in CategoryFieldItem (#36367)
* Decode HTML entities in CategoryFieldItem.
* Changelog
---
.../products/fields/category-field/category-field-item.tsx | 3 ++-
.../changelog/fix-categories-dropdown-decode-html-entities | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-categories-dropdown-decode-html-entities
diff --git a/plugins/woocommerce-admin/client/products/fields/category-field/category-field-item.tsx b/plugins/woocommerce-admin/client/products/fields/category-field/category-field-item.tsx
index a2c54aaad21..1db5bd448a9 100644
--- a/plugins/woocommerce-admin/client/products/fields/category-field/category-field-item.tsx
+++ b/plugins/woocommerce-admin/client/products/fields/category-field/category-field-item.tsx
@@ -3,6 +3,7 @@
*/
import { CheckboxControl, Icon } from '@wordpress/components';
import { useEffect, useState } from '@wordpress/element';
+import { decodeEntities } from '@wordpress/html-entities';
import { chevronDown, chevronUp } from '@wordpress/icons';
import { ProductCategory } from '@woocommerce/data';
import { __experimentalSelectControlMenuItemProps as MenuItemProps } from '@woocommerce/components';
@@ -85,7 +86,7 @@ export const CategoryFieldItem: React.FC< CategoryFieldItemProps > = ( {
) }
item.data }
/>
diff --git a/plugins/woocommerce/changelog/fix-categories-dropdown-decode-html-entities b/plugins/woocommerce/changelog/fix-categories-dropdown-decode-html-entities
new file mode 100644
index 00000000000..c9cb7cb1906
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-categories-dropdown-decode-html-entities
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Decode HTML entities in CategoryFieldItem.
From ad59769f252439e8ddbe1ff615bf1aadab87883e Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Thu, 12 Jan 2023 09:20:46 -0800
Subject: [PATCH 78/98] Remove persisted query on return to parent product from
variation (#36365)
* Remove persisted query on return to parent product from variation
* Add changelog entry
---
.../products/hooks/use-product-variation-navigation.ts | 6 +++++-
plugins/woocommerce/changelog/fix-36293 | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-36293
diff --git a/plugins/woocommerce-admin/client/products/hooks/use-product-variation-navigation.ts b/plugins/woocommerce-admin/client/products/hooks/use-product-variation-navigation.ts
index 4ff8cd7265f..24482399d94 100644
--- a/plugins/woocommerce-admin/client/products/hooks/use-product-variation-navigation.ts
+++ b/plugins/woocommerce-admin/client/products/hooks/use-product-variation-navigation.ts
@@ -29,7 +29,11 @@ export default function useProductVariationNavigation( {
const persistedQuery = getPersistedQuery();
return {
- actionHref: getNewPath( persistedQuery, `/product/${ product.id }` ),
+ actionHref: getNewPath(
+ persistedQuery,
+ `/product/${ product.id }`,
+ {}
+ ),
prevHref: prevVariationId
? getNewPath(
persistedQuery,
diff --git a/plugins/woocommerce/changelog/fix-36293 b/plugins/woocommerce/changelog/fix-36293
new file mode 100644
index 00000000000..99915a68487
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-36293
@@ -0,0 +1,4 @@
+Significance: minor
+Type: fix
+
+Remove persisted query on return to parent product from variation
From 891ecb7efb9ee7ae698ac09a18b9ce011e3ca843 Mon Sep 17 00:00:00 2001
From: Joshua T Flowers
Date: Thu, 12 Jan 2023 11:02:40 -0800
Subject: [PATCH 79/98] Redirect to new product experience when in experiment
group (#36381)
* Redirect to new product experience when in experiment group
* Add changelog entry
---
.../products/use-create-product-by-type.ts | 18 ++++++++++++++++++
.../add-76-product-creation-experiment | 4 ++++
2 files changed, 22 insertions(+)
create mode 100644 plugins/woocommerce/changelog/add-76-product-creation-experiment
diff --git a/plugins/woocommerce-admin/client/tasks/fills/products/use-create-product-by-type.ts b/plugins/woocommerce-admin/client/tasks/fills/products/use-create-product-by-type.ts
index 6232c08b688..080722aed7c 100644
--- a/plugins/woocommerce-admin/client/tasks/fills/products/use-create-product-by-type.ts
+++ b/plugins/woocommerce-admin/client/tasks/fills/products/use-create-product-by-type.ts
@@ -4,6 +4,9 @@
import { useDispatch } from '@wordpress/data';
import { ITEMS_STORE_NAME } from '@woocommerce/data';
import { getAdminLink } from '@woocommerce/settings';
+import { getNewPath, navigateTo } from '@woocommerce/navigation';
+import { loadExperimentAssignment } from '@woocommerce/explat';
+import moment from 'moment';
import { useState } from '@wordpress/element';
/**
@@ -25,6 +28,21 @@ export const useCreateProductByType = () => {
}
setIsRequesting( true );
+
+ if ( type === 'physical' ) {
+ const momentDate = moment().utc();
+ const year = momentDate.format( 'YYYY' );
+ const month = momentDate.format( 'MM' );
+ const assignment = await loadExperimentAssignment(
+ `woocommerce_product_creation_experience_${ year }${ month }_v1`
+ );
+
+ if ( assignment.variationName === 'treatment' ) {
+ navigateTo( { url: getNewPath( {}, '/add-product', {} ) } );
+ return;
+ }
+ }
+
try {
const data: {
id?: number;
diff --git a/plugins/woocommerce/changelog/add-76-product-creation-experiment b/plugins/woocommerce/changelog/add-76-product-creation-experiment
new file mode 100644
index 00000000000..70af2275260
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-76-product-creation-experiment
@@ -0,0 +1,4 @@
+Significance: minor
+Type: tweak
+
+Redirect to new product experience when in experiment group
From 78002eac9ce2e9b077ea3269892ad7b6c0a4cdfd Mon Sep 17 00:00:00 2001
From: Fernando Marichal
Date: Thu, 12 Jan 2023 16:32:40 -0300
Subject: [PATCH 80/98] Hide `Variations` section when it is empty (#36202)
* Add changelog
* Hide Variations section when it is empty
* Fix hiding variations
* Remove `totalCount const
Co-authored-by: Fernando Marichal
---
.../sections/product-variations-section.tsx | 25 ++++++++++++++++++-
...x-36181_hide_variations_section_when_empty | 4 +++
2 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/fix-36181_hide_variations_section_when_empty
diff --git a/plugins/woocommerce-admin/client/products/sections/product-variations-section.tsx b/plugins/woocommerce-admin/client/products/sections/product-variations-section.tsx
index a4719e372b6..2b16bbd1bb7 100644
--- a/plugins/woocommerce-admin/client/products/sections/product-variations-section.tsx
+++ b/plugins/woocommerce-admin/client/products/sections/product-variations-section.tsx
@@ -3,7 +3,8 @@
*/
import { __ } from '@wordpress/i18n';
import { recordEvent } from '@woocommerce/tracks';
-import { Link } from '@woocommerce/components';
+import { Link, useFormContext } from '@woocommerce/components';
+import { Product, ProductAttribute } from '@woocommerce/data';
/**
* Internal dependencies
@@ -12,6 +13,28 @@ import { ProductSectionLayout } from '../layout/product-section-layout';
import { Variations } from '../fields/variations';
export const ProductVariationsSection: React.FC = () => {
+ const {
+ getInputProps,
+ values: { id: productId },
+ } = useFormContext< Product >();
+
+ const { value: attributes }: { value: ProductAttribute[] } = getInputProps(
+ 'attributes',
+ {
+ productId,
+ }
+ );
+
+ const options = attributes
+ ? attributes.filter(
+ ( attribute: ProductAttribute ) => attribute.variation
+ )
+ : [];
+
+ if ( options.length === 0 ) {
+ return null;
+ }
+
return (
Date: Thu, 12 Jan 2023 16:33:06 -0400
Subject: [PATCH 81/98] Add product form api functions (#36165)
Co-authored-by: Joel
---
...d-36021_php_add_product_form_api_functions | 4 +
plugins/woocommerce/src/Admin/API/Init.php | 13 +-
.../woocommerce/src/Admin/API/ProductForm.php | 130 ++++++++++++++++++
.../Internal/Admin/ProductForm/Component.php | 6 +-
.../Admin/ProductForm/FormFactory.php | 22 ++-
.../src/Internal/Admin/ProductForm/README.md | 2 +-
.../Internal/Admin/ProductForm/Section.php | 22 +++
7 files changed, 192 insertions(+), 7 deletions(-)
create mode 100644 plugins/woocommerce/changelog/add-36021_php_add_product_form_api_functions
create mode 100644 plugins/woocommerce/src/Admin/API/ProductForm.php
diff --git a/plugins/woocommerce/changelog/add-36021_php_add_product_form_api_functions b/plugins/woocommerce/changelog/add-36021_php_add_product_form_api_functions
new file mode 100644
index 00000000000..78c483c2cfc
--- /dev/null
+++ b/plugins/woocommerce/changelog/add-36021_php_add_product_form_api_functions
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add new product form API for extending the new Product Form MVP.
diff --git a/plugins/woocommerce/src/Admin/API/Init.php b/plugins/woocommerce/src/Admin/API/Init.php
index 42b2bac82e7..fb98830c9af 100644
--- a/plugins/woocommerce/src/Admin/API/Init.php
+++ b/plugins/woocommerce/src/Admin/API/Init.php
@@ -88,6 +88,11 @@ class Init {
'Automattic\WooCommerce\Admin\API\MobileAppMagicLink',
);
+ $product_form_controllers = array();
+ if ( Features::is_enabled( 'new-product-management-experience' ) ) {
+ $product_form_controllers[] = 'Automattic\WooCommerce\Admin\API\ProductForm';
+ }
+
if ( Features::is_enabled( 'analytics' ) ) {
$analytics_controllers = array(
'Automattic\WooCommerce\Admin\API\Customers',
@@ -118,9 +123,15 @@ class Init {
// The performance indicators controller must be registered last, after other /stats endpoints have been registered.
$analytics_controllers[] = 'Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller';
- $controllers = array_merge( $controllers, $analytics_controllers );
+ $controllers = array_merge( $controllers, $analytics_controllers, $product_form_controllers );
}
+ /**
+ * Filter for the WooCommerce Admin REST controllers.
+ *
+ * @since 3.5.0
+ * @param array $controllers List of rest API controllers.
+ */
$controllers = apply_filters( 'woocommerce_admin_rest_controllers', $controllers );
foreach ( $controllers as $controller ) {
diff --git a/plugins/woocommerce/src/Admin/API/ProductForm.php b/plugins/woocommerce/src/Admin/API/ProductForm.php
new file mode 100644
index 00000000000..9d2603be4cb
--- /dev/null
+++ b/plugins/woocommerce/src/Admin/API/ProductForm.php
@@ -0,0 +1,130 @@
+namespace,
+ '/' . $this->rest_base,
+ array(
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => array( $this, 'get_form_config' ),
+ 'permission_callback' => array( $this, 'get_product_form_permission_check' ),
+ ),
+ 'schema' => array( $this, 'get_public_item_schema' ),
+ )
+ );
+ register_rest_route(
+ $this->namespace,
+ '/' . $this->rest_base . '/fields',
+ array(
+ array(
+ 'methods' => \WP_REST_Server::READABLE,
+ 'callback' => array( $this, 'get_fields' ),
+ 'permission_callback' => array( $this, 'get_product_form_permission_check' ),
+ ),
+ 'schema' => array( $this, 'get_public_item_schema' ),
+ )
+ );
+ }
+
+ /**
+ * Check if a given request has access to manage woocommerce.
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_Error|boolean
+ */
+ public function get_product_form_permission_check( $request ) {
+ if ( ! current_user_can( 'manage_woocommerce' ) ) {
+ return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to retrieve product form data.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) );
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the form fields.
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_fields( $request ) {
+ $json = array_map(
+ function( $field ) {
+ return $field->get_json();
+ },
+ FormFactory::get_fields()
+ );
+
+ return rest_ensure_response( $json );
+ }
+
+ /**
+ * Get the form config.
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_form_config( $request ) {
+ $fields = array_map(
+ function( $field ) {
+ return $field->get_json();
+ },
+ FormFactory::get_fields()
+ );
+ $subsections = array_map(
+ function( $subsection ) {
+ return $subsection->get_json();
+ },
+ FormFactory::get_subsections()
+ );
+ $sections = array_map(
+ function( $section ) {
+ return $section->get_json();
+ },
+ FormFactory::get_sections()
+ );
+
+ return rest_ensure_response(
+ array(
+ 'fields' => $fields,
+ 'subsections' => $subsections,
+ 'sections' => $sections,
+ )
+ );
+ }
+}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
index 55205c631a7..421b663dc30 100644
--- a/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Component.php
@@ -6,7 +6,7 @@
namespace Automattic\WooCommerce\Internal\Admin\ProductForm;
/**
- * Card class.
+ * Component class.
*/
abstract class Component {
/**
@@ -15,7 +15,7 @@ abstract class Component {
use ComponentTrait;
/**
- * Card additional arguments.
+ * Component additional arguments.
*
* @var array
*/
@@ -24,7 +24,7 @@ abstract class Component {
/**
* Constructor
*
- * @param string $id Card id.
+ * @param string $id Component id.
* @param string $plugin_id Plugin id.
* @param array $additional_args Array containing additional arguments.
*/
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
index fa6e2d9f121..e42fd2991d6 100644
--- a/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/FormFactory.php
@@ -166,6 +166,24 @@ class FormFactory {
return self::get_items( 'section', 'Section', $sort_by );
}
+ /**
+ * Returns list of registered items.
+ *
+ * @param string $type Form component type.
+ * @return array List of registered items.
+ */
+ private static function get_item_list( $type ) {
+ $mapping = array(
+ 'field' => self::$form_fields,
+ 'subsection' => self::$form_subsections,
+ 'section' => self::$form_sections,
+ );
+ if ( array_key_exists( $type, $mapping ) ) {
+ return $mapping[ $type ];
+ }
+ return array();
+ }
+
/**
* Returns list of registered items.
*
@@ -178,7 +196,7 @@ class FormFactory {
'key' => 'order',
'order' => 'asc',
) ) {
- $item_list = self::${ 'form_' . $type . 's' };
+ $item_list = self::get_item_list( $type );
$class = 'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\' . $class_name;
$items = array_values( $item_list );
if ( class_exists( $class ) && method_exists( $class, 'sort' ) ) {
@@ -203,7 +221,7 @@ class FormFactory {
* @return Field|Card|Section|WP_Error New product form item or WP_Error.
*/
private static function create_item( $type, $class_name, $id, $plugin_id, $args ) {
- $item_list = self::${ 'form_' . $type . 's' };
+ $item_list = self::get_item_list( $type );
$class = 'Automattic\\WooCommerce\\Internal\\Admin\\ProductForm\\' . $class_name;
if ( ! class_exists( $class ) ) {
return new WP_Error(
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md b/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
index fb8cb7ed1e3..058f995de8d 100644
--- a/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/README.md
@@ -8,7 +8,7 @@ This will primarily be done through the `Form` class, under the `Automattic\WooC
```php
function add_product_form_field() {
if (
- ! method_exists( '\Automattic\WooCommerce\Internal\Admin\ProductForm\Form', 'add_field' )
+ ! method_exists( '\Automattic\WooCommerce\Internal\Admin\ProductForm\FormFactory', 'add_field' )
) {
return;
}
diff --git a/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php b/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
index b86512bdb7a..049be3f4ef4 100644
--- a/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
+++ b/plugins/woocommerce/src/Internal/Admin/ProductForm/Section.php
@@ -54,6 +54,28 @@ class Section extends Component {
$this->title = $additional_args['title'];
}
+ /**
+ * Field arguments.
+ *
+ * @return array
+ */
+ public function get_arguments() {
+ return $this->additional_args;
+ }
+
+ /**
+ * Get the section as JSON.
+ *
+ * @return array
+ */
+ public function get_json() {
+ return array(
+ 'id' => $this->get_id(),
+ 'plugin_id' => $this->get_plugin_id(),
+ 'arguments' => $this->get_arguments(),
+ );
+ }
+
/**
* Get missing arguments of args array.
*
From f1b49e76e5bb9bce8ccf8641fa83029f10648744 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:01:03 -0300
Subject: [PATCH 82/98] Fix PHPCS issue
---
.../src/Internal/DataStores/Orders/OrdersTableMetaQuery.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
index f3add477193..1a7805d8863 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
@@ -158,8 +158,8 @@ class OrdersTableMetaQuery {
unset( $arg['value'] );
}
- $arg['compare'] = isset( $arg['compare'] ) ? strtoupper( $arg['compare'] ) : ( isset( $arg['value'] ) && is_array( $arg['value'] ) ? 'IN' : '=' );
- $arg['compare_key'] = isset( $arg['compare_key'] ) ? strtoupper( $arg['compare_key'] ) : ( isset( $arg['key'] ) && is_array( $arg['key'] ) ? 'IN' : '=' );
+ $arg['compare'] = isset( $arg['compare'] ) ? strtoupper( $arg['compare'] ) : ( isset( $arg['value'] ) && is_array( $arg['value'] ) ? 'IN' : '=' );
+ $arg['compare_key'] = isset( $arg['compare_key'] ) ? strtoupper( $arg['compare_key'] ) : ( isset( $arg['key'] ) && is_array( $arg['key'] ) ? 'IN' : '=' );
if ( ! in_array( $arg['compare'], self::NON_NUMERIC_OPERATORS, true ) && ! in_array( $arg['compare'], self::NUMERIC_OPERATORS, true ) ) {
$arg['compare'] = '=';
From 22edb1f67f35e018ed3f6a3e69683940e640db67 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:01:29 -0300
Subject: [PATCH 83/98] Build a list of flat meta_query clauses when processing
meta queries
---
.../Orders/OrdersTableMetaQuery.php | 24 +++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
index 1a7805d8863..73643059f92 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
@@ -73,6 +73,13 @@ class OrdersTableMetaQuery {
*/
private $queries = array();
+ /**
+ * Flat list of clauses by name.
+ *
+ * @var array
+ */
+ private $flattened_clauses = array();
+
/**
* JOIN clauses to add to the main SQL query.
*
@@ -169,7 +176,8 @@ class OrdersTableMetaQuery {
$arg['compare_key'] = '=';
}
- $sanitized[ $key ] = $arg;
+ $sanitized[ $key ] = $arg;
+ $sanitized[ $key ]['index'] = $key;
} else {
$sanitized_arg = $this->sanitize_meta_query( $arg );
@@ -298,12 +306,24 @@ class OrdersTableMetaQuery {
$this->generate_where_for_clause_value( $arg ),
)
);
+
+ // Store clauses by their key for ORDER BY purposes.
+ $flat_clause_key = is_int( $arg['index'] ) ? $arg['alias'] : $arg['index'];
+
+ $unique_flat_key = $flat_clause_key;
+ $i = 1;
+ while ( isset( $this->flattened_clauses[ $unique_flat_key ] ) ) {
+ $unique_flat_key = $flat_clause_key . '-' . $i;
+ $i++;
+ }
+
+ $this->flattened_clauses[ $unique_flat_key ] =& $arg;
} else {
// Nested.
$relation = $arg['relation'];
unset( $arg['relation'] );
- foreach ( $arg as $key => &$clause ) {
+ foreach ( $arg as $index => &$clause ) {
$chunks[] = $this->process( $clause, $arg );
}
From e4efa941e9634ef2fc02c1c2704b79ac53e70fee Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:02:02 -0300
Subject: [PATCH 84/98] Implement sorting order queries by metadata
---
.../Orders/OrdersTableMetaQuery.php | 67 +++++++++++++++++++
.../DataStores/Orders/OrdersTableQuery.php | 22 +++++-
2 files changed, 87 insertions(+), 2 deletions(-)
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
index 73643059f92..5c5482f92b7 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableMetaQuery.php
@@ -136,6 +136,73 @@ class OrdersTableMetaQuery {
);
}
+ /**
+ * Returns a list of names (corresponding to meta_query clauses) that can be used as an 'orderby' arg.
+ *
+ * @since 7.4
+ *
+ * @return array
+ */
+ public function get_orderby_keys(): array {
+ if ( ! $this->flattened_clauses ) {
+ return array();
+ }
+
+ $keys = array();
+ $keys[] = 'meta_value';
+ $keys[] = 'meta_value_num';
+
+ $first_clause = reset( $this->flattened_clauses );
+ if ( $first_clause && ! empty( $first_clause['key'] ) ) {
+ $keys[] = $first_clause['key'];
+ }
+
+ $keys = array_merge(
+ $keys,
+ array_keys( $this->flattened_clauses )
+ );
+
+ return $keys;
+ }
+
+ /**
+ * Returns an SQL fragment for the given meta_query key that can be used in an ORDER BY clause.
+ * Call {@see 'get_orderby_keys'} to obtain a list of valid keys.
+ *
+ * @since 7.4
+ *
+ * @param string $key The key name.
+ * @return string
+ *
+ * @throws \Exception When an invalid key is passed.
+ */
+ public function get_orderby_clause_for_key( string $key ): string {
+ $clause = false;
+
+ if ( isset( $this->flattened_clauses[ $key ] ) ) {
+ $clause = $this->flattened_clauses[ $key ];
+ } else {
+ $first_clause = reset( $this->flattened_clauses );
+
+ if ( $first_clause && ! empty( $first_clause['key'] ) ) {
+ if ( 'meta_value_num' === $key ) {
+ return "{$first_clause['alias']}.meta_value+0";
+ }
+
+ if ( 'meta_value' === $key || $first_clause['key'] === $key ) {
+ $clause = $first_clause;
+ }
+ }
+ }
+
+ if ( ! $clause ) {
+ // translators: %s is a meta_query key.
+ throw new \Exception( sprintf( __( 'Invalid meta_query clause key: %s.', 'woocommerce' ), $key ) );
+ }
+
+ return "CAST({$clause['alias']}.meta_value AS {$clause['cast']})";
+ }
+
/**
* Checks whether a given meta_query clause is atomic or not (i.e. not nested).
*
diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
index ca6a8e4e5f3..b6ff8f91be6 100644
--- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
+++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php
@@ -522,11 +522,23 @@ class OrdersTableQuery {
}
}
+ $allowed_orderby = array_merge(
+ array_keys( $mapping ),
+ array_values( $mapping ),
+ $this->meta_query ? $this->meta_query->get_orderby_keys() : array()
+ );
+
$this->args['orderby'] = array();
foreach ( $orderby as $order_key => $order ) {
- if ( isset( $mapping[ $order_key ] ) ) {
- $this->args['orderby'][ $mapping[ $order_key ] ] = $this->sanitize_order( $order );
+ if ( ! in_array( $order_key, $allowed_orderby, true ) ) {
+ continue;
}
+
+ if ( isset( $mapping[ $order_key ] ) ) {
+ $order_key = $mapping[ $order_key ];
+ }
+
+ $this->args['orderby'][ $order_key ] = $this->sanitize_order( $order );
}
}
@@ -991,8 +1003,14 @@ class OrdersTableQuery {
return;
}
+ $meta_orderby_keys = $this->meta_query ? $this->meta_query->get_orderby_keys() : array();
+
$orderby_array = array();
foreach ( $this->args['orderby'] as $_orderby => $order ) {
+ if ( in_array( $_orderby, $meta_orderby_keys, true ) ) {
+ $_orderby = $this->meta_query->get_orderby_clause_for_key( $_orderby );
+ }
+
$orderby_array[] = "{$_orderby} {$order}";
}
From fd7099824e84856c4120f3bee1ee7baf54ee5702 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:02:07 -0300
Subject: [PATCH 85/98] Add unit tests
---
.../Orders/OrdersTableDataStoreTests.php | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
index 6f0294dcb82..3718d9699ba 100644
--- a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
+++ b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
@@ -722,6 +722,73 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
// phpcs:enable
}
+ /**
+ * @testDox Tests queries involving 'orderby' and meta queries.
+ */
+ public function test_cot_query_meta_orderby() {
+ $this->toggle_cot( true );
+
+ $order1 = new \WC_Order();
+ $order1->add_meta_data( 'color', 'red' );
+ $order1->add_meta_data( 'animal', 'lion' );
+ $order1->add_meta_data( 'numeric_meta', '1000' );
+ $order1->save();
+
+ $order2 = new \WC_Order();
+ $order2->add_meta_data( 'color', 'green' );
+ $order2->add_meta_data( 'animal', 'lion' );
+ $order2->add_meta_data( 'numeric_meta', '500' );
+ $order2->save();
+
+ $query_args = array(
+ 'orderby' => 'id',
+ 'order' => 'ASC',
+ 'meta_key' => 'color',
+ );
+
+ // Check that orders are in order (when no meta ordering is involved).
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order1->get_id(), $order2->get_id() ) );
+
+ // When ordering by color $order2 should come first.
+ // Also tests that the key name is a valid synonym for the primary meta query.
+ $query_args['orderby'] = 'color';
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
+
+ // When ordering by 'numeric_meta' 1000 < 500 (due to alphabetical sorting by default).
+ // Also tests that 'meta_value' is a valid synonym for the primary meta query.
+ $query_args['meta_key'] = 'numeric_meta';
+ $query_args['orderby'] = 'meta_value';
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order1->get_id(), $order2->get_id() ) );
+
+ // Forcing numeric sorting with 'meta_value_num' reverses the order above.
+ $query_args['orderby'] = 'meta_value_num';
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
+
+ // Sorting by 'animal' meta is ambiguous. Test that we can order by various meta fields (and use the names in 'orderby').
+ unset( $query_args['meta_key'] );
+ $query_args['meta_query'] = array(
+ 'animal_meta' => array(
+ 'key' => 'animal',
+ ),
+ 'color_meta' => array(
+ 'key' => 'color',
+ ),
+ );
+ $query_args['orderby'] = array( 'animal_meta' => 'ASC', 'color_meta' => 'DESC' );
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order1->get_id(), $order2->get_id() ) );
+
+ // Order is reversed when changing the sort order for 'color_meta'.
+ $query_args['orderby']['color_meta'] = 'ASC';
+ $q = new OrdersTableQuery( $query_args );
+ $this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
+
+ }
+
/**
* @testDox Tests queries involving the 'customer' query var.
*
From 0ce815d46489f25c1d9ae60936073b29d2ed1868 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:02:12 -0300
Subject: [PATCH 86/98] Add changelog
---
plugins/woocommerce/changelog/fix-35486 | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 plugins/woocommerce/changelog/fix-35486
diff --git a/plugins/woocommerce/changelog/fix-35486 b/plugins/woocommerce/changelog/fix-35486
new file mode 100644
index 00000000000..0510978af15
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-35486
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add support for sorting by order metadata in HPOS queries.
From 65bf167a4d7ebd6694733a100ceb5e8cdb3ea028 Mon Sep 17 00:00:00 2001
From: "Jorge A. Torres"
Date: Thu, 12 Jan 2023 18:26:16 -0300
Subject: [PATCH 87/98] Make PHPCS happy xD
---
.../Orders/OrdersTableDataStoreTests.php | 25 +++++++++++--------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
index 3718d9699ba..2d7b5685c55 100644
--- a/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
+++ b/plugins/woocommerce/tests/php/src/Internal/DataStores/Orders/OrdersTableDataStoreTests.php
@@ -743,7 +743,7 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
$query_args = array(
'orderby' => 'id',
'order' => 'ASC',
- 'meta_key' => 'color',
+ 'meta_key' => 'color', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
);
// Check that orders are in order (when no meta ordering is involved).
@@ -753,38 +753,41 @@ class OrdersTableDataStoreTests extends WC_Unit_Test_Case {
// When ordering by color $order2 should come first.
// Also tests that the key name is a valid synonym for the primary meta query.
$query_args['orderby'] = 'color';
- $q = new OrdersTableQuery( $query_args );
+ $q = new OrdersTableQuery( $query_args );
$this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
// When ordering by 'numeric_meta' 1000 < 500 (due to alphabetical sorting by default).
// Also tests that 'meta_value' is a valid synonym for the primary meta query.
- $query_args['meta_key'] = 'numeric_meta';
+ $query_args['meta_key'] = 'numeric_meta'; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
$query_args['orderby'] = 'meta_value';
- $q = new OrdersTableQuery( $query_args );
+ $q = new OrdersTableQuery( $query_args );
$this->assertEquals( $q->orders, array( $order1->get_id(), $order2->get_id() ) );
// Forcing numeric sorting with 'meta_value_num' reverses the order above.
- $query_args['orderby'] = 'meta_value_num';
- $q = new OrdersTableQuery( $query_args );
+ $query_args['orderby'] = 'meta_value_num';
+ $q = new OrdersTableQuery( $query_args );
$this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
// Sorting by 'animal' meta is ambiguous. Test that we can order by various meta fields (and use the names in 'orderby').
unset( $query_args['meta_key'] );
- $query_args['meta_query'] = array(
+ $query_args['meta_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
'animal_meta' => array(
'key' => 'animal',
),
- 'color_meta' => array(
+ 'color_meta' => array(
'key' => 'color',
),
);
- $query_args['orderby'] = array( 'animal_meta' => 'ASC', 'color_meta' => 'DESC' );
- $q = new OrdersTableQuery( $query_args );
+ $query_args['orderby'] = array(
+ 'animal_meta' => 'ASC',
+ 'color_meta' => 'DESC',
+ );
+ $q = new OrdersTableQuery( $query_args );
$this->assertEquals( $q->orders, array( $order1->get_id(), $order2->get_id() ) );
// Order is reversed when changing the sort order for 'color_meta'.
$query_args['orderby']['color_meta'] = 'ASC';
- $q = new OrdersTableQuery( $query_args );
+ $q = new OrdersTableQuery( $query_args );
$this->assertEquals( $q->orders, array( $order2->get_id(), $order1->get_id() ) );
}
From 4ff99a8555166f38855c6b21fabba87f60b1c79a Mon Sep 17 00:00:00 2001
From: Moon
Date: Thu, 12 Jan 2023 13:57:15 -0800
Subject: [PATCH 88/98] Migrate Section component to TS (#36298)
* Convert to ts
* Add changelog
* Fix style
* Remove propTypes
* Remove unused import
* Only allow false
* Update packages/js/components/src/section/section.tsx
Co-authored-by: Chi-Hsuan Huang
* Update packages/js/components/src/section/section.tsx
Co-authored-by: Chi-Hsuan Huang
* Update packages/js/components/src/section/section.tsx
Co-authored-by: Chi-Hsuan Huang
Co-authored-by: Chi-Hsuan Huang
---
.../dev-migrate-section-component-to-ts | 4 ++
.../src/section/{context.js => context.tsx} | 0
.../src/section/{header.js => header.tsx} | 2 +-
.../src/section/{index.js => index.tsx} | 0
packages/js/components/src/section/section.js | 56 -------------------
.../js/components/src/section/section.tsx | 42 ++++++++++++++
.../section/stories/{index.js => index.tsx} | 1 +
7 files changed, 48 insertions(+), 57 deletions(-)
create mode 100644 packages/js/components/changelog/dev-migrate-section-component-to-ts
rename packages/js/components/src/section/{context.js => context.tsx} (100%)
rename packages/js/components/src/section/{header.js => header.tsx} (89%)
rename packages/js/components/src/section/{index.js => index.tsx} (100%)
delete mode 100644 packages/js/components/src/section/section.js
create mode 100644 packages/js/components/src/section/section.tsx
rename packages/js/components/src/section/stories/{index.js => index.tsx} (91%)
diff --git a/packages/js/components/changelog/dev-migrate-section-component-to-ts b/packages/js/components/changelog/dev-migrate-section-component-to-ts
new file mode 100644
index 00000000000..66400fa1063
--- /dev/null
+++ b/packages/js/components/changelog/dev-migrate-section-component-to-ts
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Migrate Section component to TS
\ No newline at end of file
diff --git a/packages/js/components/src/section/context.js b/packages/js/components/src/section/context.tsx
similarity index 100%
rename from packages/js/components/src/section/context.js
rename to packages/js/components/src/section/context.tsx
diff --git a/packages/js/components/src/section/header.js b/packages/js/components/src/section/header.tsx
similarity index 89%
rename from packages/js/components/src/section/header.js
rename to packages/js/components/src/section/header.tsx
index 2b19bb9bb1c..e3d5bcb32ad 100644
--- a/packages/js/components/src/section/header.js
+++ b/packages/js/components/src/section/header.tsx
@@ -15,7 +15,7 @@ import { Level } from './context';
*
* @type {HTMLElement}
*/
-export function H( props ) {
+export function H( props: React.HTMLAttributes< HTMLHeadingElement > ) {
const level = useContext( Level );
const Heading = 'h' + Math.min( level, 6 );
diff --git a/packages/js/components/src/section/index.js b/packages/js/components/src/section/index.tsx
similarity index 100%
rename from packages/js/components/src/section/index.js
rename to packages/js/components/src/section/index.tsx
diff --git a/packages/js/components/src/section/section.js b/packages/js/components/src/section/section.js
deleted file mode 100644
index 43e1ad0849e..00000000000
--- a/packages/js/components/src/section/section.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * External dependencies
- */
-import PropTypes from 'prop-types';
-import { createElement } from '@wordpress/element';
-
-/**
- * Internal dependencies
- */
-import { Level } from './context';
-
-/**
- * The section wrapper, used to indicate a sub-section (and change the header level context).
- *
- * @param {Object} props
- * @param {import('react').ComponentType=} props.component
- * @param {import('react').ReactNode} props.children Children to render in the tip.
- * @param {string=} props.className
- * @return {JSX.Element} -
- */
-export function Section( { component, children, ...props } ) {
- const Component = component || 'div';
- return (
-
- { ( level ) => (
-
- { component === false ? (
- children
- ) : (
- { children }
- ) }
-
- ) }
-
- );
-}
-
-Section.propTypes = {
- /**
- * The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props
- * passed to Section are passed on to the component.
- */
- component: PropTypes.oneOfType( [
- PropTypes.func,
- PropTypes.string,
- PropTypes.bool,
- ] ),
- /**
- * The children inside this section, rendered in the `component`. This increases the context level for the next heading used.
- */
- children: PropTypes.node,
- /**
- * Optional classname
- */
- className: PropTypes.string,
-};
diff --git a/packages/js/components/src/section/section.tsx b/packages/js/components/src/section/section.tsx
new file mode 100644
index 00000000000..408c6e9937b
--- /dev/null
+++ b/packages/js/components/src/section/section.tsx
@@ -0,0 +1,42 @@
+/**
+ * External dependencies
+ */
+import { createElement } from '@wordpress/element';
+
+/**
+ * Internal dependencies
+ */
+import { Level } from './context';
+
+type SectionProps = {
+ /** The wrapper component for this section. Optional, defaults to `div`. If passed false, no wrapper is used. Additional props passed to Section are passed on to the component. */
+ component?: React.ComponentType | string | false;
+ /** Optional classname */
+ className?: string;
+ /** The children inside this section, rendered in the `component`. This increases the context level for the next heading used. */
+ children: React.ReactNode;
+};
+
+/**
+ * The section wrapper, used to indicate a sub-section (and change the header level context).
+ */
+export const Section: React.VFC< SectionProps > = ( {
+ component,
+ children,
+ ...props
+} ) => {
+ const Component = component || 'div';
+ return (
+
+ { ( level ) => (
+
+ { component === false ? (
+ children
+ ) : (
+ { children }
+ ) }
+
+ ) }
+
+ );
+};
diff --git a/packages/js/components/src/section/stories/index.js b/packages/js/components/src/section/stories/index.tsx
similarity index 91%
rename from packages/js/components/src/section/stories/index.js
rename to packages/js/components/src/section/stories/index.tsx
index c651b742921..866faa39001 100644
--- a/packages/js/components/src/section/stories/index.js
+++ b/packages/js/components/src/section/stories/index.tsx
@@ -2,6 +2,7 @@
* External dependencies
*/
import { H, Section } from '@woocommerce/components';
+import { createElement } from '@wordpress/element';
export const Basic = () => (
From 0f4bf6c8f4c7c19f56a837ea41e531b9f1463c38 Mon Sep 17 00:00:00 2001
From: Sam Seay
Date: Fri, 13 Jan 2023 13:11:54 +1300
Subject: [PATCH 89/98] Bump stable tag and update changelog for 7.2.3 release.
(#36385)
---
changelog.txt | 8 ++++++++
plugins/woocommerce/changelog/dev-bump-stable-tag | 3 +++
plugins/woocommerce/readme.txt | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 plugins/woocommerce/changelog/dev-bump-stable-tag
diff --git a/changelog.txt b/changelog.txt
index 2b78a742a29..065efafd188 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,13 @@
== Changelog ==
+= 7.2.3 2023-1-9
+
+**WooCommerce Blocks 8.9.4**
+
+* Fix - fatal error in WordPress 5.8 when creating a post or page. #7496
+* Fix - hangs in the block editor with WordPress 5.8. #8095
+* Fix - Filter by Attribute block crashing in the editor of WordPress 5.8. #8101
+
= 7.2.2 2022-12-21 =
** WooCommerce**
diff --git a/plugins/woocommerce/changelog/dev-bump-stable-tag b/plugins/woocommerce/changelog/dev-bump-stable-tag
new file mode 100644
index 00000000000..dd91470c3fc
--- /dev/null
+++ b/plugins/woocommerce/changelog/dev-bump-stable-tag
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Stable tag bump
diff --git a/plugins/woocommerce/readme.txt b/plugins/woocommerce/readme.txt
index 3e6e005e4a7..fbf8438d6d9 100644
--- a/plugins/woocommerce/readme.txt
+++ b/plugins/woocommerce/readme.txt
@@ -4,7 +4,7 @@ Tags: online store, ecommerce, shop, shopping cart, sell online, storefront, che
Requires at least: 5.9
Tested up to: 6.1
Requires PHP: 7.2
-Stable tag: 7.1.1
+Stable tag: 7.2.3
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
From 1772babf91e704ab9eb03287435027ac8fed4615 Mon Sep 17 00:00:00 2001
From: Paul Sealock
Date: Fri, 13 Jan 2023 13:14:42 +1300
Subject: [PATCH 90/98] Security update 242 (#36408)
* Customers REST API: return user metadata only when requester has an administrator role
* Add changelog file
Co-authored-by: Nestor Soriano
---
plugins/woocommerce/changelog/fix-240 | 4 +++
.../class-wc-rest-customers-v2-controller.php | 30 ++++++++++++++++---
.../class-wc-rest-customers-controller.php | 29 +-----------------
3 files changed, 31 insertions(+), 32 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-240
diff --git a/plugins/woocommerce/changelog/fix-240 b/plugins/woocommerce/changelog/fix-240
new file mode 100644
index 00000000000..f78ebaad257
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-240
@@ -0,0 +1,4 @@
+Significance: patch
+Type: update
+
+Customers REST API endpoint will now return user metadata only when requester has an administrator role
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-customers-v2-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-customers-v2-controller.php
index b7e023b0d49..27623124df4 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-customers-v2-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-customers-v2-controller.php
@@ -33,17 +33,34 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
* @return array
*/
protected function get_formatted_item_data( $object ) {
+ $formatted_data = $this->get_formatted_item_data_core( $object );
+ $formatted_data['orders_count'] = $object->get_order_count();
+ $formatted_data['total_spent'] = $object->get_total_spent();
+ return $formatted_data;
+ }
+
+ /**
+ * Get formatted item data, not including orders count nor total spent.
+ * This method is needed because v3 API doesn't return those two fields.
+ *
+ * @internal This method could disappear or have its name or signature changed in future releases.
+ *
+ * @param WC_Data $object WC_Data instance.
+ * @return array
+ */
+ protected function get_formatted_item_data_core( $object ) {
$data = $object->get_data();
$format_date = array( 'date_created', 'date_modified' );
// Format date values.
foreach ( $format_date as $key ) {
+ // Date created is stored UTC, date modified is stored WP local time.
$datetime = 'date_created' === $key ? get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $data[ $key ]->getTimestamp() ) ) : $data[ $key ];
$data[ $key ] = wc_rest_prepare_date_response( $datetime, false );
$data[ $key . '_gmt' ] = wc_rest_prepare_date_response( $datetime );
}
- return array(
+ $formatted_data = array(
'id' => $object->get_id(),
'date_created' => $data['date_created'],
'date_created_gmt' => $data['date_created_gmt'],
@@ -57,11 +74,14 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
'billing' => $data['billing'],
'shipping' => $data['shipping'],
'is_paying_customer' => $data['is_paying_customer'],
- 'orders_count' => $object->get_order_count(),
- 'total_spent' => $object->get_total_spent(),
'avatar_url' => $object->get_avatar_url(),
- 'meta_data' => $data['meta_data'],
);
+
+ if ( wc_current_user_has_role( 'administrator' ) ) {
+ $formatted_data['meta_data'] = $data['meta_data'];
+ }
+
+ return $formatted_data;
}
/**
@@ -80,6 +100,7 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
$response = rest_ensure_response( $data );
$response->add_links( $this->prepare_links( $user_data ) );
+ //phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment
/**
* Filter customer data returned from the REST API.
*
@@ -88,6 +109,7 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
* @param WP_REST_Request $request Request object.
*/
return apply_filters( 'woocommerce_rest_prepare_customer', $response, $user_data, $request );
+ //phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment
}
/**
diff --git a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-customers-controller.php b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-customers-controller.php
index 217aef00b6e..ceb6f302a08 100644
--- a/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-customers-controller.php
+++ b/plugins/woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-customers-controller.php
@@ -34,34 +34,7 @@ class WC_REST_Customers_Controller extends WC_REST_Customers_V2_Controller {
* @return array
*/
protected function get_formatted_item_data( $object ) {
- $data = $object->get_data();
- $format_date = array( 'date_created', 'date_modified' );
-
- // Format date values.
- foreach ( $format_date as $key ) {
- // Date created is stored UTC, date modified is stored WP local time.
- $datetime = 'date_created' === $key ? get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $data[ $key ]->getTimestamp() ) ) : $data[ $key ];
- $data[ $key ] = wc_rest_prepare_date_response( $datetime, false );
- $data[ $key . '_gmt' ] = wc_rest_prepare_date_response( $datetime );
- }
-
- return array(
- 'id' => $object->get_id(),
- 'date_created' => $data['date_created'],
- 'date_created_gmt' => $data['date_created_gmt'],
- 'date_modified' => $data['date_modified'],
- 'date_modified_gmt' => $data['date_modified_gmt'],
- 'email' => $data['email'],
- 'first_name' => $data['first_name'],
- 'last_name' => $data['last_name'],
- 'role' => $data['role'],
- 'username' => $data['username'],
- 'billing' => $data['billing'],
- 'shipping' => $data['shipping'],
- 'is_paying_customer' => $data['is_paying_customer'],
- 'avatar_url' => $object->get_avatar_url(),
- 'meta_data' => $data['meta_data'],
- );
+ return $this->get_formatted_item_data_core( $object );
}
/**
From c3d62f113addbbf820ed5e8103a0a052092efc00 Mon Sep 17 00:00:00 2001
From: Moon
Date: Thu, 12 Jan 2023 19:19:01 -0800
Subject: [PATCH 91/98] Migrate product image component to TS (#36305)
* Convert product-image to ts
* Add changelog
* Remove unused ts-expect-error
* Allow arbitrary properties for product
* Remove propTypes
* Update packages/js/components/src/product-image/index.tsx
Co-authored-by: Chi-Hsuan Huang
* Update packages/js/components/src/product-image/index.tsx
Co-authored-by: Chi-Hsuan Huang
* Update packages/js/components/src/product-image/index.tsx
Co-authored-by: Chi-Hsuan Huang
* Update packages/js/components/src/product-image/index.tsx
Co-authored-by: Chi-Hsuan Huang
* Remove unused import
Co-authored-by: Chi-Hsuan Huang
---
.../dev-migrate-product-image-component-to-ts | 4 +
.../src/product-image/{index.js => index.tsx} | 79 ++++++++-----------
.../{placeholder.js => placeholder.tsx} | 0
.../stories/{index.js => index.tsx} | 1 +
.../{index.js.snap => index.tsx.snap} | 0
.../test/{index.js => index.tsx} | 2 +-
.../src/search/autocompleters/product.tsx | 1 -
.../src/search/autocompleters/variations.tsx | 1 -
8 files changed, 40 insertions(+), 48 deletions(-)
create mode 100644 packages/js/components/changelog/dev-migrate-product-image-component-to-ts
rename packages/js/components/src/product-image/{index.js => index.tsx} (65%)
rename packages/js/components/src/product-image/{placeholder.js => placeholder.tsx} (100%)
rename packages/js/components/src/product-image/stories/{index.js => index.tsx} (89%)
rename packages/js/components/src/product-image/test/__snapshots__/{index.js.snap => index.tsx.snap} (100%)
rename packages/js/components/src/product-image/test/{index.js => index.tsx} (98%)
diff --git a/packages/js/components/changelog/dev-migrate-product-image-component-to-ts b/packages/js/components/changelog/dev-migrate-product-image-component-to-ts
new file mode 100644
index 00000000000..c86b6f4ce92
--- /dev/null
+++ b/packages/js/components/changelog/dev-migrate-product-image-component-to-ts
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Migrate ProductImage component to TS
\ No newline at end of file
diff --git a/packages/js/components/src/product-image/index.js b/packages/js/components/src/product-image/index.tsx
similarity index 65%
rename from packages/js/components/src/product-image/index.js
rename to packages/js/components/src/product-image/index.tsx
index 799b61eb2aa..a6b942648aa 100644
--- a/packages/js/components/src/product-image/index.js
+++ b/packages/js/components/src/product-image/index.tsx
@@ -2,7 +2,6 @@
* External dependencies
*/
import classnames from 'classnames';
-import PropTypes from 'prop-types';
import { get } from 'lodash';
import { createElement } from '@wordpress/element';
@@ -11,25 +10,47 @@ import { createElement } from '@wordpress/element';
*/
import { placeholderWhiteBackground as placeholder } from './placeholder';
+type Image = {
+ src?: string;
+};
+
+type ProductImageProps = {
+ /**
+ * Product or variation object. The image to display will be pulled from
+ * `product.images` or `variation.image`.
+ * See https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties
+ * and https://woocommerce.github.io/woocommerce-rest-api-docs/#product-variation-properties
+ */
+ product?: {
+ images?: Array< Image >;
+ image?: Image;
+ // ProductImage is only interested in product.images or varation.image
+ // but product object can have other properties that we don't control.
+ // allowing `any` here
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ } & Record< string, any >;
+ /** The width of image to display. */
+ width?: number;
+ /** The height of image to display. */
+ height?: number;
+ /** Additional CSS classes. */
+ className?: string;
+ /** Text to use as the image alt attribute. */
+ alt?: string;
+};
+
/**
* Use `ProductImage` to display a product's or variation's featured image.
* If no image can be found, a placeholder matching the front-end image
* placeholder will be displayed.
- *
- * @param {Object} props
- * @param {Object} props.product
- * @param {string} props.alt
- * @param {number} props.width
- * @param {number} props.height
- * @param {string} props.className
- * @return {Object} -
*/
-const ProductImage = ( {
+
+const ProductImage: React.VFC< ProductImageProps > = ( {
product,
+ width = 33,
+ height = 33,
+ className = '',
alt,
- width,
- height,
- className,
...props
} ) => {
// The first returned image from the API is the featured/product image.
@@ -54,36 +75,4 @@ const ProductImage = ( {
);
};
-ProductImage.propTypes = {
- /**
- * The width of image to display.
- */
- width: PropTypes.number,
- /**
- * The height of image to display.
- */
- height: PropTypes.number,
- /**
- * Additional CSS classes.
- */
- className: PropTypes.string,
- /**
- * Product or variation object. The image to display will be pulled from
- * `product.images` or `variation.image`.
- * See https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties
- * and https://woocommerce.github.io/woocommerce-rest-api-docs/#product-variation-properties
- */
- product: PropTypes.object,
- /**
- * Text to use as the image alt attribute.
- */
- alt: PropTypes.string,
-};
-
-ProductImage.defaultProps = {
- width: 33,
- height: 33,
- className: '',
-};
-
export default ProductImage;
diff --git a/packages/js/components/src/product-image/placeholder.js b/packages/js/components/src/product-image/placeholder.tsx
similarity index 100%
rename from packages/js/components/src/product-image/placeholder.js
rename to packages/js/components/src/product-image/placeholder.tsx
diff --git a/packages/js/components/src/product-image/stories/index.js b/packages/js/components/src/product-image/stories/index.tsx
similarity index 89%
rename from packages/js/components/src/product-image/stories/index.js
rename to packages/js/components/src/product-image/stories/index.tsx
index 1d6f0a504a6..12bc3473226 100644
--- a/packages/js/components/src/product-image/stories/index.js
+++ b/packages/js/components/src/product-image/stories/index.tsx
@@ -2,6 +2,7 @@
* External dependencies
*/
import { ProductImage } from '@woocommerce/components';
+import { createElement } from '@wordpress/element';
export const Basic = () => (
diff --git a/packages/js/components/src/product-image/test/__snapshots__/index.js.snap b/packages/js/components/src/product-image/test/__snapshots__/index.tsx.snap
similarity index 100%
rename from packages/js/components/src/product-image/test/__snapshots__/index.js.snap
rename to packages/js/components/src/product-image/test/__snapshots__/index.tsx.snap
diff --git a/packages/js/components/src/product-image/test/index.js b/packages/js/components/src/product-image/test/index.tsx
similarity index 98%
rename from packages/js/components/src/product-image/test/index.js
rename to packages/js/components/src/product-image/test/index.tsx
index f22c107d7e0..52995367574 100644
--- a/packages/js/components/src/product-image/test/index.js
+++ b/packages/js/components/src/product-image/test/index.tsx
@@ -7,7 +7,7 @@ import { createElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import ProductImage from '../';
+import ProductImage from '..';
describe( 'ProductImage', () => {
test( 'should render the passed alt prop', () => {
diff --git a/packages/js/components/src/search/autocompleters/product.tsx b/packages/js/components/src/search/autocompleters/product.tsx
index 44e70524063..906737911b8 100644
--- a/packages/js/components/src/search/autocompleters/product.tsx
+++ b/packages/js/components/src/search/autocompleters/product.tsx
@@ -66,7 +66,6 @@ const completer: AutoCompleter = {
const match = computeSuggestionMatch( product.name, query );
return (
- { /* @ts-expect-error TODO: migrate ProductImage component to TS. */ }
- { /* @ts-expect-error TODO: migrate ProductImage component to TS. */ }
Date: Fri, 13 Jan 2023 11:14:40 -0500
Subject: [PATCH 92/98] Analytics: Decode HTML entities in CategoryBreadcrumbs
(#36321)
* Decode HTML entities in CategoryBreadcrumbs
* Changelog
---
.../client/analytics/report/categories/breadcrumbs.js | 7 +++++--
.../fix-analytics-category-breadcrumbs-html-entities | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities
diff --git a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
index 07865d6a017..6673112322e 100644
--- a/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
+++ b/plugins/woocommerce-admin/client/analytics/report/categories/breadcrumbs.js
@@ -4,6 +4,7 @@
import { Component } from '@wordpress/element';
import { first, last } from 'lodash';
import { Spinner } from '@wordpress/components';
+import { decodeEntities } from '@wordpress/html-entities';
import { Link } from '@woocommerce/components';
import { getNewPath, getPersistedQuery } from '@woocommerce/navigation';
@@ -49,7 +50,9 @@ export default class CategoryBreadcrumbs extends Component {
return category ? (
- { this.getCategoryAncestors( category, categories ) }
+ { decodeEntities(
+ this.getCategoryAncestors( category, categories )
+ ) }
- { category.name }
+ { decodeEntities( category.name ) }
) : (
diff --git a/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities b/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities
new file mode 100644
index 00000000000..5f087d9d1e0
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-analytics-category-breadcrumbs-html-entities
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Decode HTML entities in CategoryBreadcrumbs.
From 1eed9a4fc94bf519df67b4ba79671793890affa6 Mon Sep 17 00:00:00 2001
From: nigeljamesstevenson
<105309450+nigeljamesstevenson@users.noreply.github.com>
Date: Fri, 13 Jan 2023 16:40:42 +0000
Subject: [PATCH 93/98] update k6 readme variable names (#36398)
---
plugins/woocommerce/changelog/update-k6-readme-variables | 5 +++++
plugins/woocommerce/tests/performance/README.md | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 plugins/woocommerce/changelog/update-k6-readme-variables
diff --git a/plugins/woocommerce/changelog/update-k6-readme-variables b/plugins/woocommerce/changelog/update-k6-readme-variables
new file mode 100644
index 00000000000..46bf0182f7b
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-k6-readme-variables
@@ -0,0 +1,5 @@
+Significance: patch
+Type: fix
+Comment: update variable names
+
+
diff --git a/plugins/woocommerce/tests/performance/README.md b/plugins/woocommerce/tests/performance/README.md
index 8b00be00b4c..87515c3d014 100644
--- a/plugins/woocommerce/tests/performance/README.md
+++ b/plugins/woocommerce/tests/performance/README.md
@@ -76,11 +76,11 @@ base_url | base URL of the test environment | yes `__ENV.URL`
base_host | base host of the test environment (for use in headers) | yes `__ENV.HOST`
admin_username | username for admin user | yes `__ENV.A_USER`
admin_password | password for admin user | yes `__ENV.A_PW`
-admin_acc_login | set to true if site needs to use my account for admin login | yes `__ENV.A_PW`
+admin_acc_login | set to true if site needs to use my account for admin login | yes `__ENV.A_ACC_LOGIN`
customer_username | username for customer user | yes `__ENV.C_USER`
customer_password | password for customer user | yes `__ENV.C_PW`
customer_user_id | user id for customer user | yes `__ENV.C_UID`
-cot_status | set to true if site is using order tables | yes `__ENV.C_PW`
+cot_status | set to true if site is using order tables | yes `__ENV.COT`
admin_orders_base_url | url part for order urls when posts table is used | no
cot_admin_orders_base_url | url part for order urls when orders table is used | no
addresses_customer_billing_* | billing address details for existing customer user | no
From 8ad92c4c82ef5fd65266b3fd3642f8db41692a2e Mon Sep 17 00:00:00 2001
From: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Date: Fri, 13 Jan 2023 11:48:27 -0800
Subject: [PATCH 94/98] Order emails: improve responsiveness and RTL support
(#36310)
* Tweak email layout/styling. This should improve responsive properties for RTL emails particularly.
* Further improve layout consistency across a range of mobile email clients.
* Update existing code to match current coding standards.
* Further PHPCS fix.
* Update sample email to match recent changes in our default email CSS.
---
.../changelog/fix-31478-responsive-emails | 4 ++
.../templates/emails/email-footer.php | 59 ++++++++++------
.../templates/emails/email-header.php | 67 ++++++++++---------
.../templates/emails/email-styles.php | 31 ++++++++-
.../tests/legacy/data/sample-email.html | 2 +-
5 files changed, 109 insertions(+), 54 deletions(-)
create mode 100644 plugins/woocommerce/changelog/fix-31478-responsive-emails
diff --git a/plugins/woocommerce/changelog/fix-31478-responsive-emails b/plugins/woocommerce/changelog/fix-31478-responsive-emails
new file mode 100644
index 00000000000..54abf484093
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-31478-responsive-emails
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Ensure order emails are responsive in most email clients, including when the current language is RTL.
diff --git a/plugins/woocommerce/templates/emails/email-footer.php b/plugins/woocommerce/templates/emails/email-footer.php
index 4579924cd85..d1734c59d5d 100644
--- a/plugins/woocommerce/templates/emails/email-footer.php
+++ b/plugins/woocommerce/templates/emails/email-footer.php
@@ -12,45 +12,64 @@
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
- * @version 3.7.0
+ * @version 7.4.0
*/
defined( 'ABSPATH' ) || exit;
?>
-
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+