From e8697bd85058d38162b7e13dd83f23815eaff19c Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 20 Oct 2021 10:58:09 -0400 Subject: [PATCH 01/31] Display notice when user has any detached licenses. --- projects/js-packages/api/index.jsx | 5 ++ .../components/jetpack-notices/index.jsx | 13 +++++- .../client/my-plan/my-plan-header/license.jsx | 7 ++- .../jetpack/_inc/client/state/action-types.js | 2 + .../_inc/client/state/licensing/actions.js | 24 +++++++++- .../_inc/client/state/licensing/reducer.js | 41 +++++++++++++++-- .../class-jetpack-redux-state-helper.php | 1 + .../lib/class.core-rest-api-endpoints.php | 46 +++++++++++++++++++ 8 files changed, 130 insertions(+), 9 deletions(-) diff --git a/projects/js-packages/api/index.jsx b/projects/js-packages/api/index.jsx index ffb604afa9328..16ca0f6bc8529 100644 --- a/projects/js-packages/api/index.jsx +++ b/projects/js-packages/api/index.jsx @@ -413,6 +413,11 @@ function JetpackRestApiClient( root, nonce ) { .then( checkStatus ) .then( parseJsonResponse ), + updateUserLicensesCounts: () => + getRequest( `${ apiRoot }jetpack/v4/licensing/user/counts`, getParams ) + .then( checkStatus ) + .then( parseJsonResponse ), + updateRecommendationsStep: step => postRequest( `${ apiRoot }jetpack/v4/recommendations/step`, postParams, { body: JSON.stringify( { step } ), diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx index a59e8f0ea10bd..93e65de1a009e 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx @@ -35,7 +35,7 @@ import { userIsSubscriber, getConnectionErrors, } from 'state/initial-state'; -import { getLicensingError, clearLicensingError } from 'state/licensing'; +import { getLicensingError, clearLicensingError, hasDetachedUserLicenses } from 'state/licensing'; import { getSiteDataErrors } from 'state/site'; import { JETPACK_CONTACT_BETA_SUPPORT } from 'constants/urls'; import JetpackStateNotices from './state-notices'; @@ -276,6 +276,16 @@ class JetpackNotices extends React.Component { onDismissClick={ this.props.clearLicensingError } /> ) } + { this.props.hasDetachedUserLicenses && ( + + + { __( 'Activate now', 'jetpack' ) } + + + ) } ); } @@ -299,6 +309,7 @@ export default connect( isReconnectingSite: isReconnectingSite( state ), licensingError: getLicensingError( state ), hasConnectedOwner: hasConnectedOwner( state ), + hasDetachedUserLicenses: hasDetachedUserLicenses( state ), }; }, dispatch => { diff --git a/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/license.jsx b/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/license.jsx index 2a6f3dc003ce3..4a864320b922a 100644 --- a/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/license.jsx +++ b/projects/plugins/jetpack/_inc/client/my-plan/my-plan-header/license.jsx @@ -15,8 +15,9 @@ import { errorNotice as errorNoticeAction, } from 'components/global-notices/state/notices/actions'; import restApi from '@automattic/jetpack-api'; +import { updateUserLicensesCounts as updateUserLicensesCountsAction } from 'state/licensing'; -const License = ( { errorNotice, successNotice } ) => { +const License = ( { errorNotice, successNotice, updateUserLicensesCounts } ) => { const [ isSaving, setIsSaving ] = useState( false ); const [ licenseKeyText, setLicenseKeyText ] = useState( '' ); @@ -34,6 +35,7 @@ const License = ( { errorNotice, successNotice } ) => { restApi .updateLicenseKey( licenseKeyText ) .then( () => { + updateUserLicensesCounts(); successNotice( __( 'Jetpack license key added. It may take a minute for the license to be processed.', @@ -48,7 +50,7 @@ const License = ( { errorNotice, successNotice } ) => { errorNotice( __( 'Error adding Jetpack license key.', 'jetpack' ) ); setIsSaving( false ); } ); - }, [ errorNotice, successNotice, isSaving, licenseKeyText ] ); + }, [ errorNotice, successNotice, isSaving, licenseKeyText, updateUserLicensesCounts ] ); return (
@@ -79,4 +81,5 @@ const License = ( { errorNotice, successNotice } ) => { export default connect( null, { errorNotice: errorNoticeAction, successNotice: successNoticeAction, + updateUserLicensesCounts: updateUserLicensesCountsAction, } )( License ); diff --git a/projects/plugins/jetpack/_inc/client/state/action-types.js b/projects/plugins/jetpack/_inc/client/state/action-types.js index 9726c5e75e449..d6262e03e0738 100644 --- a/projects/plugins/jetpack/_inc/client/state/action-types.js +++ b/projects/plugins/jetpack/_inc/client/state/action-types.js @@ -214,3 +214,5 @@ export const JETPACK_MOBILE_LOGIN_SEND_LOGIN_EMAIL_FAIL = 'JETPACK_MOBILE_LOGIN_SEND_LOGIN_EMAIL_FAIL'; export const JETPACK_LICENSING_ERROR_UPDATE = 'JETPACK_LICENSING_ERROR_UPDATE'; +export const JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE = + 'JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE'; diff --git a/projects/plugins/jetpack/_inc/client/state/licensing/actions.js b/projects/plugins/jetpack/_inc/client/state/licensing/actions.js index b0a48bed2537c..ae7bd9214f9bc 100644 --- a/projects/plugins/jetpack/_inc/client/state/licensing/actions.js +++ b/projects/plugins/jetpack/_inc/client/state/licensing/actions.js @@ -1,7 +1,10 @@ /** * Internal dependencies */ -import { JETPACK_LICENSING_ERROR_UPDATE } from 'state/action-types'; +import { + JETPACK_LICENSING_ERROR_UPDATE, + JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, +} from 'state/action-types'; import restApi from '@automattic/jetpack-api'; export const clearLicensingError = () => { @@ -15,3 +18,22 @@ export const clearLicensingError = () => { return restApi.updateLicensingError( { error } ); }; }; + +export const updateUserLicensesCounts = () => { + return dispatch => { + return restApi + .updateUserLicensesCounts() + .then( counts => { + dispatch( { + type: JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, + counts, + } ); + } ) + .catch( error => { + dispatch( { + type: JETPACK_LICENSING_ERROR_UPDATE, + error, + } ); + } ); + }; +}; diff --git a/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js b/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js index 991e5913f8bba..db71527693557 100644 --- a/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js +++ b/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js @@ -1,13 +1,16 @@ /** * External dependencies */ -import { get } from 'lodash'; +import { assign, get } from 'lodash'; import { combineReducers } from 'redux'; /** * Internal dependencies */ -import { JETPACK_LICENSING_ERROR_UPDATE } from 'state/action-types'; +import { + JETPACK_LICENSING_ERROR_UPDATE, + JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, +} from 'state/action-types'; /** * Error reducer. @@ -26,20 +29,48 @@ export const error = ( state = window.Initial_State.licensing.error, action ) => } }; +/** + * "user" licenses counts reducer. + * + * @param {number} state - Global state tree + * @param {object} action - The action + * @returns {object} - The counts of user licenses + */ + +export const userCounts = ( state = window.Initial_State.licensing.userCounts ?? {}, action ) => { + switch ( action.type ) { + case JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE: + return assign( {}, state, action.counts ); + + default: + return state; + } +}; + /** * Licensing combined reducer. */ export const reducer = combineReducers( { error, + userCounts, } ); /** * Get the latest licensing error, if any. * - * @param {Object} state Global state tree. - * - * @return {string} Error message or an empty string. + * @param {Object} state - Global state tree. + * @returns {string} - Error message or an empty string. */ export function getLicensingError( state ) { return get( state.jetpack.licensing, [ 'error' ], '' ); } + +/** + * Determines if the user has detached "user" licenses available for product activation. + * + * @param {object} state - Global state tree. + * @returns {boolean} - True if the user has detached user licenses, false otherwise. + */ +export function hasDetachedUserLicenses( state ) { + return !! get( state.jetpack.licensing.userCounts, [ 'detached' ], 0 ); +} diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php index 122019ef1d9a0..936cd59775eae 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php @@ -172,6 +172,7 @@ public static function get_initial_state() { 'licensing' => array( 'error' => Licensing::instance()->last_error(), 'showLicensingUi' => Licensing::instance()->is_licensing_input_enabled(), + 'userCounts' => Jetpack_Core_Json_Api_Endpoints::get_user_license_counts(), ), ); } diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 0256297741b96..4ad2bdaf0338c 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -722,6 +722,21 @@ public static function register_endpoints() { ) ); + /** + * Get Jetpack user license counts. + */ + register_rest_route( + 'jetpack/v4', + 'licensing/user/counts', + array( + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_user_license_counts', + 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + ), + ) + ); + /* * Manage the Jetpack CRM plugin's integration with Jetpack contact forms. */ @@ -1012,6 +1027,37 @@ public static function get_products( $request ) { } } + /** + * Gets the users licenses counts. + * + * @return string|WP_Error A JSON object of user license counts if the request was successful, or a WP_Error otherwise. + */ + public static function get_user_license_counts() { + $wpcom_request = Client::wpcom_json_api_request_as_user( + '/jetpack-licensing/licenses/user/counts', + '2', + array( + 'method' => 'GET', + 'headers' => array( + 'Content-Type' => 'application/json', + 'X-Forwarded-For' => Jetpack::current_user_ip( true ), + ), + ) + ); + + $response_code = wp_remote_retrieve_response_code( $wpcom_request ); + if ( 200 === $response_code ) { + $license_counts = json_decode( wp_remote_retrieve_body( $wpcom_request ) ); + return $license_counts; + } else { + return new WP_Error( + 'failed_to_fetch_data', + esc_html__( 'Unable to fetch the requested data.', 'jetpack' ), + array( 'status' => $response_code ) + ); + } + } + public static function submit_survey( $request ) { $wpcom_request = Client::wpcom_json_api_request_as_user( From 1e5b1ace6b64936c0bbcfd5ba84794874fd59bf4 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 20 Oct 2021 11:51:10 -0400 Subject: [PATCH 02/31] Add changlog files. --- projects/js-packages/api/changelog/update-user-license-counts | 4 ++++ .../plugins/jetpack/changelog/add-license-activation-notice | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 projects/js-packages/api/changelog/update-user-license-counts create mode 100644 projects/plugins/jetpack/changelog/add-license-activation-notice diff --git a/projects/js-packages/api/changelog/update-user-license-counts b/projects/js-packages/api/changelog/update-user-license-counts new file mode 100644 index 0000000000000..89ca8f639c062 --- /dev/null +++ b/projects/js-packages/api/changelog/update-user-license-counts @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Add updateUserLicensesCounts API method \ No newline at end of file diff --git a/projects/plugins/jetpack/changelog/add-license-activation-notice b/projects/plugins/jetpack/changelog/add-license-activation-notice new file mode 100644 index 0000000000000..7efc391be7875 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-license-activation-notice @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Display a notice when connection owner has an unactivated product licence key \ No newline at end of file From 8c6abe31c9b238be69a2f731df033dac39dc2f7b Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 20 Oct 2021 12:06:55 -0400 Subject: [PATCH 03/31] Update packages to use jetpack-api 0.4.1-alpha. --- pnpm-lock.yaml | 12 ++++++------ projects/js-packages/api/package.json | 2 +- .../changelog/add-user-license-activate-notice-2 | 4 ++++ projects/js-packages/connection/package.json | 2 +- .../idc/changelog/add-user-license-activate-notice-2 | 4 ++++ projects/js-packages/idc/package.json | 2 +- .../changelog/add-user-license-activate-notice-2 | 4 ++++ projects/packages/connection-ui/package.json | 2 +- .../changelog/add-user-license-activate-notice-2 | 4 ++++ projects/plugins/backup/package.json | 2 +- .../changelog/add-user-license-activate-notice-2 | 4 ++++ projects/plugins/jetpack/package.json | 2 +- 12 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 projects/js-packages/connection/changelog/add-user-license-activate-notice-2 create mode 100644 projects/js-packages/idc/changelog/add-user-license-activate-notice-2 create mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b9a4df437125..b8b9f64d0b738 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,7 +126,7 @@ importers: projects/js-packages/connection: specifiers: - '@automattic/jetpack-api': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.4.1-alpha '@automattic/jetpack-components': workspace:^0.4.0-alpha '@wordpress/base-styles': 4.0.0 '@wordpress/browserslist-config': 4.1.0 @@ -178,7 +178,7 @@ importers: projects/js-packages/idc: specifiers: - '@automattic/jetpack-api': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.4.1-alpha '@automattic/jetpack-components': workspace:^0.4.0-alpha '@wordpress/base-styles': 4.0.0 '@wordpress/components': 17.0.0 @@ -293,7 +293,7 @@ importers: projects/packages/connection-ui: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.4.1-alpha '@automattic/jetpack-connection': workspace:^0.8.0-alpha '@automattic/jetpack-idc': workspace:^0.3.1-alpha '@babel/core': 7.15.0 @@ -406,7 +406,7 @@ importers: projects/plugins/backup: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.4.1-alpha '@automattic/jetpack-components': workspace:^0.4.0-alpha '@automattic/jetpack-connection': workspace:^0.8.0-alpha '@babel/core': 7.15.0 @@ -547,7 +547,7 @@ importers: '@automattic/components': 1.0.0-alpha.3 '@automattic/format-currency': 1.0.0-alpha.0 '@automattic/jetpack-analytics': workspace:^0.1.2 - '@automattic/jetpack-api': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.4.1-alpha '@automattic/jetpack-components': workspace:^0.4.0-alpha '@automattic/jetpack-connection': workspace:^0.8.0-alpha '@automattic/popup-monitor': 1.0.0 @@ -23510,7 +23510,7 @@ packages: serialize-javascript: 6.0.0 source-map: 0.6.1 terser: 5.8.0 - webpack: 5.51.1_webpack-cli@4.8.0 + webpack: 5.51.1 /terser/3.17.0: resolution: {integrity: sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==} diff --git a/projects/js-packages/api/package.json b/projects/js-packages/api/package.json index 340425183de04..7d5a1c2199c45 100644 --- a/projects/js-packages/api/package.json +++ b/projects/js-packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-api", - "version": "0.4.0", + "version": "0.4.1-alpha", "description": "Jetpack Api Package", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2 b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index d8560f7b7cd5f..0803925421da0 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.4.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0-alpha", "@wordpress/base-styles": "4.0.0", "@wordpress/browserslist-config": "4.1.0", diff --git a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2 b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index c4f484f19026a..b43617ac6addb 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.4.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0-alpha", "@wordpress/base-styles": "4.0.0", "@wordpress/components": "17.0.0", diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index afb5e6676efb3..5315476b1becd 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@automattic/calypso-build": "9.0.0", - "@automattic/jetpack-api": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.4.1-alpha", "@automattic/jetpack-connection": "workspace:^0.8.0-alpha", "@automattic/jetpack-idc": "workspace:^0.3.1-alpha", "@babel/core": "7.15.0", diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/plugins/backup/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index 67dc30a8abc44..91692c8f23c00 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -27,7 +27,7 @@ "extends @wordpress/browserslist-config" ], "dependencies": { - "@automattic/jetpack-api": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.4.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0-alpha", "@automattic/jetpack-connection": "workspace:^0.8.0-alpha", "@wordpress/api-fetch": "5.2.2", diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index 60a8b33d30645..3589daadf74e9 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -64,7 +64,7 @@ "@automattic/components": "1.0.0-alpha.3", "@automattic/format-currency": "1.0.0-alpha.0", "@automattic/jetpack-analytics": "workspace:^0.1.2", - "@automattic/jetpack-api": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.4.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0-alpha", "@automattic/jetpack-connection": "workspace:^0.8.0-alpha", "@automattic/popup-monitor": "1.0.0", From 2797957a97696ba4be3ff82faea7aee65b60964a Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 27 Oct 2021 09:33:34 -0400 Subject: [PATCH 04/31] Implement custom dismiss/show behavior on the notice. --- projects/js-packages/api/index.jsx | 9 +- .../components/jetpack-notices/index.jsx | 15 +-- .../user-license-activation.jsx | 100 ++++++++++++++++++ .../jetpack/_inc/client/state/action-types.js | 2 + .../_inc/client/state/licensing/actions.js | 23 +++- .../_inc/client/state/licensing/reducer.js | 46 +++++++- .../class-jetpack-redux-state-helper.php | 23 +++- .../lib/class.core-rest-api-endpoints.php | 82 +++++++++++++- 8 files changed, 281 insertions(+), 19 deletions(-) create mode 100644 projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx diff --git a/projects/js-packages/api/index.jsx b/projects/js-packages/api/index.jsx index 16ca0f6bc8529..9463587a3ddfd 100644 --- a/projects/js-packages/api/index.jsx +++ b/projects/js-packages/api/index.jsx @@ -413,11 +413,18 @@ function JetpackRestApiClient( root, nonce ) { .then( checkStatus ) .then( parseJsonResponse ), - updateUserLicensesCounts: () => + getUserLicensesCounts: () => getRequest( `${ apiRoot }jetpack/v4/licensing/user/counts`, getParams ) .then( checkStatus ) .then( parseJsonResponse ), + updateLicensingActivationNoticeDismiss: lastDetachedCount => + postRequest( `${ apiRoot }jetpack/v4/licensing/user/activation-notice-dismiss`, postParams, { + body: JSON.stringify( { last_detached_count: lastDetachedCount } ), + } ) + .then( checkStatus ) + .then( parseJsonResponse ), + updateRecommendationsStep: step => postRequest( `${ apiRoot }jetpack/v4/recommendations/step`, postParams, { body: JSON.stringify( { step } ), diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx index 93e65de1a009e..04073f43aa0b1 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/index.jsx @@ -18,6 +18,7 @@ import { getRedirectUrl } from '@automattic/jetpack-components'; */ import ConnectionBanner from 'components/connection-banner'; import DismissableNotices from './dismissable'; +import UserLicenseActivationNotice from './user-license-activation'; import { getSiteConnectionStatus, getSiteOfflineMode, @@ -35,7 +36,7 @@ import { userIsSubscriber, getConnectionErrors, } from 'state/initial-state'; -import { getLicensingError, clearLicensingError, hasDetachedUserLicenses } from 'state/licensing'; +import { getLicensingError, clearLicensingError } from 'state/licensing'; import { getSiteDataErrors } from 'state/site'; import { JETPACK_CONTACT_BETA_SUPPORT } from 'constants/urls'; import JetpackStateNotices from './state-notices'; @@ -276,16 +277,7 @@ class JetpackNotices extends React.Component { onDismissClick={ this.props.clearLicensingError } /> ) } - { this.props.hasDetachedUserLicenses && ( - - - { __( 'Activate now', 'jetpack' ) } - - - ) } +
); } @@ -309,7 +301,6 @@ export default connect( isReconnectingSite: isReconnectingSite( state ), licensingError: getLicensingError( state ), hasConnectedOwner: hasConnectedOwner( state ), - hasDetachedUserLicenses: hasDetachedUserLicenses( state ), }; }, dispatch => { diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx new file mode 100644 index 0000000000000..1f3eb43c4665b --- /dev/null +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -0,0 +1,100 @@ +/** + * External dependencies + */ +import PropTypes from 'prop-types'; +import React from 'react'; +import { connect } from 'react-redux'; +import moment from 'moment'; +import { createInterpolateElement } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import analytics from 'lib/analytics'; +import { + getDetachedLicensesCount, + getActivationNoticeDismissInfo, + updateLicensingActivationNoticeDismiss as updateLicensingActivationNoticeDismissAction, +} from 'state/licensing'; +import SimpleNotice from 'components/notice'; + +class UserLicenseActivationNotice extends React.Component { + static propTypes = { + detachedLicensesCount: PropTypes.number.isRequired, + activationNoticeDismissInfo: PropTypes.shape( { + last_detached_count: PropTypes.number, + last_dismiss_time: PropTypes.string, + } ), + }; + + trackClick = () => { + analytics.tracks.recordJetpackClick( 'activate-user-license' ); + }; + + render() { + // TODO: Update this link to point to the user-licensing activation route. + const USER_LICENSE_ACTIVATION_ROUTE = '/wp-admin/admin.php?page=jetpack#/my-plan'; + const MAX_DISMISS_TIME = [ 2, 'weeks' ]; + + const { + detachedLicensesCount: currentDetachedCount, + updateLicensingActivationNoticeDismiss, + } = this.props; + + const { + last_detached_count: lastDetachedCount, + last_dismissed_time: lastDismissedDateTime, + } = this.props.activationNoticeDismissInfo; + + const now = moment(); + const lastDismissedTime = moment( lastDismissedDateTime ? lastDismissedDateTime : moment() ); + const userHasDetachedLicenses = !! currentDetachedCount; + const userHasNewDetachedLicenses = currentDetachedCount > ( lastDetachedCount || 0 ); + const hasBeenDismissedMoreThanTwoWeeks = lastDismissedTime + .add( ...MAX_DISMISS_TIME ) + .isSameOrBefore( now ); + + // Show the notice when the user acquires a new license, Or when the user has an available + // license(s), but has dismissed the notice and it's been over 2 weeks without activating it. + if ( + userHasDetachedLicenses && + ( userHasNewDetachedLicenses || hasBeenDismissedMoreThanTwoWeeks ) + ) { + return ( + Activate now', 'jetpack' ), + { + a: ( + + { this.props.children } + + ), + } + ) } + /> + ); + } + return false; + } +} + +export default connect( + state => { + return { + detachedLicensesCount: getDetachedLicensesCount( state ), + activationNoticeDismissInfo: getActivationNoticeDismissInfo( state ), + }; + }, + dispatch => { + return { + updateLicensingActivationNoticeDismiss: () => { + return dispatch( updateLicensingActivationNoticeDismissAction() ); + }, + }; + } +)( UserLicenseActivationNotice ); diff --git a/projects/plugins/jetpack/_inc/client/state/action-types.js b/projects/plugins/jetpack/_inc/client/state/action-types.js index d6262e03e0738..c0f5b0a290622 100644 --- a/projects/plugins/jetpack/_inc/client/state/action-types.js +++ b/projects/plugins/jetpack/_inc/client/state/action-types.js @@ -216,3 +216,5 @@ export const JETPACK_MOBILE_LOGIN_SEND_LOGIN_EMAIL_FAIL = export const JETPACK_LICENSING_ERROR_UPDATE = 'JETPACK_LICENSING_ERROR_UPDATE'; export const JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE = 'JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE'; +export const JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE = + 'JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE'; diff --git a/projects/plugins/jetpack/_inc/client/state/licensing/actions.js b/projects/plugins/jetpack/_inc/client/state/licensing/actions.js index ae7bd9214f9bc..db8980f4286c2 100644 --- a/projects/plugins/jetpack/_inc/client/state/licensing/actions.js +++ b/projects/plugins/jetpack/_inc/client/state/licensing/actions.js @@ -4,6 +4,7 @@ import { JETPACK_LICENSING_ERROR_UPDATE, JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, + JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE, } from 'state/action-types'; import restApi from '@automattic/jetpack-api'; @@ -22,7 +23,7 @@ export const clearLicensingError = () => { export const updateUserLicensesCounts = () => { return dispatch => { return restApi - .updateUserLicensesCounts() + .getUserLicensesCounts() .then( counts => { dispatch( { type: JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, @@ -37,3 +38,23 @@ export const updateUserLicensesCounts = () => { } ); }; }; + +export const updateLicensingActivationNoticeDismiss = () => { + return ( dispatch, getState ) => { + const currentDetachedLicenseCount = getState().jetpack.licensing.userCounts?.detached; + return restApi + .updateLicensingActivationNoticeDismiss( currentDetachedLicenseCount ) + .then( dismissData => { + dispatch( { + type: JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE, + dismissData, + } ); + } ) + .catch( error => { + dispatch( { + type: JETPACK_LICENSING_ERROR_UPDATE, + error, + } ); + } ); + }; +}; diff --git a/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js b/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js index db71527693557..a81966363cd2c 100644 --- a/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js +++ b/projects/plugins/jetpack/_inc/client/state/licensing/reducer.js @@ -10,6 +10,7 @@ import { combineReducers } from 'redux'; import { JETPACK_LICENSING_ERROR_UPDATE, JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE, + JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE, } from 'state/action-types'; /** @@ -36,7 +37,6 @@ export const error = ( state = window.Initial_State.licensing.error, action ) => * @param {object} action - The action * @returns {object} - The counts of user licenses */ - export const userCounts = ( state = window.Initial_State.licensing.userCounts ?? {}, action ) => { switch ( action.type ) { case JETPACK_LICENSING_USER_LICENSE_COUNTS_UPDATE: @@ -47,12 +47,36 @@ export const userCounts = ( state = window.Initial_State.licensing.userCounts ?? } }; +/** + * "user"-licenses activation notice dismissal info. + * + * @param {number} state - Global state tree + * @param {object} action - The action + * @returns {object} - The 'last_detached_count' and 'last_dismissed_time' + */ +export const activationNoticeDismiss = ( + state = window.Initial_State.licensing.activationNoticeDismiss ?? { + last_detached_count: null, + last_dismissed_time: null, + }, + action +) => { + switch ( action.type ) { + case JETPACK_LICENSING_ACTIVATION_NOTICE_DISMISS_UPDATE: + return assign( {}, state, action.dismissData ); + + default: + return state; + } +}; + /** * Licensing combined reducer. */ export const reducer = combineReducers( { error, userCounts, + activationNoticeDismiss, } ); /** @@ -74,3 +98,23 @@ export function getLicensingError( state ) { export function hasDetachedUserLicenses( state ) { return !! get( state.jetpack.licensing.userCounts, [ 'detached' ], 0 ); } + +/** + * Get the user's number of detached licenses. + * + * @param {object} state - Global state tree. + * @returns {number} - Number of detached licenses. + */ +export function getDetachedLicensesCount( state ) { + return get( state.jetpack.licensing.userCounts, [ 'detached' ], 0 ); +} + +/** + * Get the license activation notice dismiss info. + * + * @param {object} state - Global state tree. + * @returns {object} - An object containing last_detached_count and last_dismissed_time. + */ +export function getActivationNoticeDismissInfo( state ) { + return get( state.jetpack.licensing, [ 'activationNoticeDismiss' ], {} ); +} diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php index 936cd59775eae..604189b96046f 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php @@ -170,9 +170,10 @@ public static function get_initial_state() { 'isSafari' => $is_safari || User_Agent_Info::is_opera_desktop(), // @todo Rename isSafari everywhere. 'doNotUseConnectionIframe' => Constants::is_true( 'JETPACK_SHOULD_NOT_USE_CONNECTION_IFRAME' ), 'licensing' => array( - 'error' => Licensing::instance()->last_error(), - 'showLicensingUi' => Licensing::instance()->is_licensing_input_enabled(), - 'userCounts' => Jetpack_Core_Json_Api_Endpoints::get_user_license_counts(), + 'error' => Licensing::instance()->last_error(), + 'showLicensingUi' => Licensing::instance()->is_licensing_input_enabled(), + 'userCounts' => Jetpack_Core_Json_Api_Endpoints::get_user_license_counts(), + 'activationNoticeDismiss' => self::get_license_activation_notice_dismiss(), ), ); } @@ -359,6 +360,22 @@ public static function get_purchase_token() { public static function generate_purchase_token() { return wp_generate_password( 12, false ); } + + /** + * Gets the user license activation notice dismissal info. + * + * @since 10.4.0 + * @return array|boolean + */ + public static function get_license_activation_notice_dismiss() { + + $default = array( + 'last_detached_count' => null, + 'last_dismissed_time' => null, + ); + + return get_option( 'jetpack_licensing_activation_notice_dismiss', $default ); + } } /** diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 4ad2bdaf0338c..8ce40dfcfc66a 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -737,6 +737,30 @@ public static function register_endpoints() { ) ); + register_rest_route( + 'jetpack/v4', + 'licensing/user/activation-notice-dismiss', + array( + array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_licensing_activation_notice_dismiss', + 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + ), + array( + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', + 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + 'args' => array( + 'last_detached_count' => array( + 'required' => true, + 'type' => 'integer', + 'validate_callback' => __CLASS__ . '::validate_non_neg_int', + ), + ), + ), + ) + ); + /* * Manage the Jetpack CRM plugin's integration with Jetpack contact forms. */ @@ -1030,11 +1054,13 @@ public static function get_products( $request ) { /** * Gets the users licenses counts. * + * @since 10.4.0 + * * @return string|WP_Error A JSON object of user license counts if the request was successful, or a WP_Error otherwise. */ public static function get_user_license_counts() { $wpcom_request = Client::wpcom_json_api_request_as_user( - '/jetpack-licensing/licenses/user/counts', + '/jetpack-licensing/user/licenses/counts', '2', array( 'method' => 'GET', @@ -1058,6 +1084,38 @@ public static function get_user_license_counts() { } } + /** + * Update the user-licenses activation notice dismissal data. + * + * @since 10.4.0 + * + * @param WP_REST_Request $request The request sent to the WP REST API. + * + * @return array|WP_Error + */ + public static function update_licensing_activation_notice_dismiss( $request ) { + + if ( ! isset( $request['last_detached_count'] ) ) { + return new WP_Error( 'invalid_param', esc_html__( 'Missing parameter "last_detached_count".', 'jetpack' ), array( 'status' => 404 ) ); + } + + $default = array( + 'last_detached_count' => null, + 'last_dismissed_time' => null, + ); + $last_detached_count = ( '' === $request['last_detached_count'] ) + ? $default['last_detached_count'] + : $request['last_detached_count']; + $last_dismissed_time = ( new DateTime( 'NOW' ) )->format( 'c' ); + $notice_data = array( + 'last_detached_count' => $last_detached_count, + 'last_dismissed_time' => $last_dismissed_time, + ); + + update_option( 'jetpack_licensing_activation_notice_dismiss', $notice_data ); + return rest_ensure_response( get_option( 'jetpack_licensing_activation_notice_dismiss', $default ) ); + } + public static function submit_survey( $request ) { $wpcom_request = Client::wpcom_json_api_request_as_user( @@ -2884,6 +2942,28 @@ public static function validate_posint( $value, $request, $param ) { return true; } + /** + * Validates that the parameter is a non-negative integer (includes 0). + * + * @since 4.3.0 + * + * @param int $value Value to check. + * @param WP_REST_Request $request The request sent to the WP REST API. + * @param string $param Name of the parameter passed to endpoint holding $value. + * + * @return bool|WP_Error + */ + public static function validate_non_neg_int( $value, $request, $param ) { + if ( ! is_numeric( $value ) || $value < 0 ) { + return new WP_Error( + 'invalid_param', + /* translators: %s: The literal parameter name. Should not be translated. */ + sprintf( esc_html__( '%s must be a non-negative integer.', 'jetpack' ), $param ) + ); + } + return true; + } + /** * Validates that the parameter belongs to a list of admitted values. * From 3e51a93ffcb79b976ff0cc9b5add30c31de5c31b Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 27 Oct 2021 10:55:05 -0400 Subject: [PATCH 05/31] Fix project versions. --- pnpm-lock.yaml | 18 +++++++++--------- projects/js-packages/api/package.json | 2 +- .../add-user-license-activate-notice-2#2 | 4 ++++ projects/js-packages/connection/package.json | 4 ++-- .../add-user-license-activate-notice-2#2 | 4 ++++ projects/js-packages/idc/package.json | 4 ++-- .../add-user-license-activate-notice-2#2 | 4 ++++ projects/packages/connection-ui/package.json | 8 ++++---- .../add-user-license-activate-notice-2#2 | 4 ++++ projects/plugins/backup/package.json | 4 ++-- projects/plugins/boost/tests/e2e/package.json | 2 +- .../add-user-license-activate-notice-2#2 | 4 ++++ projects/plugins/jetpack/package.json | 4 ++-- 13 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8e367aac1265..02592b89479c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: projects/js-packages/connection: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.0 '@wordpress/base-styles': 4.0.2 '@wordpress/browserslist-config': 4.1.0 @@ -180,7 +180,7 @@ importers: projects/js-packages/idc: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.0 '@wordpress/base-styles': 4.0.2 '@wordpress/components': 19.0.0 @@ -293,9 +293,9 @@ importers: projects/packages/connection-ui: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 - '@automattic/jetpack-connection': workspace:^0.8.0 - '@automattic/jetpack-idc': workspace:^0.4.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha + '@automattic/jetpack-connection': workspace:^0.8.1-alpha + '@automattic/jetpack-idc': workspace:^0.4.1-alpha '@babel/core': 7.15.0 '@babel/helper-module-imports': 7.14.5 '@babel/preset-env': 7.15.0 @@ -406,9 +406,9 @@ importers: projects/plugins/backup: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.0 - '@automattic/jetpack-connection': workspace:^0.8.0 + '@automattic/jetpack-connection': workspace:^0.8.1-alpha '@babel/core': 7.15.0 '@babel/helper-module-imports': 7.14.5 '@babel/preset-env': 7.15.0 @@ -537,9 +537,9 @@ importers: '@automattic/components': 1.0.0-alpha.3 '@automattic/format-currency': 1.0.0-alpha.0 '@automattic/jetpack-analytics': workspace:^0.1.2 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.0 - '@automattic/jetpack-connection': workspace:^0.8.0 + '@automattic/jetpack-connection': workspace:^0.8.1-alpha '@automattic/popup-monitor': 1.0.0 '@automattic/request-external-access': 1.0.0 '@automattic/social-previews': 1.1.1 diff --git a/projects/js-packages/api/package.json b/projects/js-packages/api/package.json index dcad9a40b1ca6..8715d4b4ca934 100644 --- a/projects/js-packages/api/package.json +++ b/projects/js-packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-api", - "version": "0.5.0", + "version": "0.5.1-alpha", "description": "Jetpack Api Package", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index 0b4e9b1f516fd..c5855255cd42d 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -1,11 +1,11 @@ { "name": "@automattic/jetpack-connection", - "version": "0.8.0", + "version": "0.8.1-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0", "@wordpress/base-styles": "4.0.2", "@wordpress/browserslist-config": "4.1.0", diff --git a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index 64ba3720511c0..df134daa45f71 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -1,11 +1,11 @@ { "name": "@automattic/jetpack-idc", - "version": "0.4.0", + "version": "0.4.1-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0", "@wordpress/base-styles": "4.0.2", "@wordpress/components": "19.0.0", diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index cf1927e17c6f1..2470c19118345 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-connection-manager-ui", - "version": "1.5.3", + "version": "1.5.4-alpha", "description": "Jetpack Connection Manager UI", "main": "_inc/admin.jsx", "repository": "https://github.com/Automattic/jetpack-connection-ui", @@ -15,9 +15,9 @@ }, "dependencies": { "@automattic/calypso-build": "9.0.0", - "@automattic/jetpack-api": "workspace:^0.5.0", - "@automattic/jetpack-connection": "workspace:^0.8.0", - "@automattic/jetpack-idc": "workspace:^0.4.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", + "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", + "@automattic/jetpack-idc": "workspace:^0.4.1-alpha", "@babel/core": "7.15.0", "@babel/helper-module-imports": "7.14.5", "@babel/preset-env": "7.15.0", diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index ec188e2b71539..07ed8b8014644 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -27,9 +27,9 @@ "extends @wordpress/browserslist-config" ], "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0", - "@automattic/jetpack-connection": "workspace:^0.8.0", + "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", "@wordpress/api-fetch": "5.2.4", "@wordpress/data": "6.1.2", "@wordpress/date": "4.2.2", diff --git a/projects/plugins/boost/tests/e2e/package.json b/projects/plugins/boost/tests/e2e/package.json index 706c4bb04e71d..b9eb79c8fd761 100644 --- a/projects/plugins/boost/tests/e2e/package.json +++ b/projects/plugins/boost/tests/e2e/package.json @@ -39,7 +39,7 @@ "jest": "^27.2.4", "jest-junit": "^12.3.0", "jest-runner-groups": "^2.1.0", - "jetpack-cli": "link:../../../../../tools/cli", + "jetpack-cli": "link:../../../../../tools/cli", "jetpack-e2e-commons": "link:../../../../../tools/e2e-commons" }, "engines": { diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index 65b7f2fea8d86..13f8cbed171a5 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -64,9 +64,9 @@ "@automattic/components": "1.0.0-alpha.3", "@automattic/format-currency": "1.0.0-alpha.0", "@automattic/jetpack-analytics": "workspace:^0.1.2", - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.0", - "@automattic/jetpack-connection": "workspace:^0.8.0", + "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", "@automattic/popup-monitor": "1.0.0", "@automattic/request-external-access": "1.0.0", "@automattic/social-previews": "1.1.1", From bfbef9f835a4112e6cbc9694a8550368159d4fb5 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 27 Oct 2021 11:25:09 -0400 Subject: [PATCH 06/31] Add `plugins/boost` changelog ? --- .../boost/changelog/add-user-license-activate-notice-2 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/plugins/boost/changelog/add-user-license-activate-notice-2 diff --git a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..559e5c0b2a7eb --- /dev/null +++ b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: update e2e + + From 4a8c361efa64b91b1327a4669b3b047be7d7696d Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 28 Oct 2021 07:53:43 -0400 Subject: [PATCH 07/31] Remove moment.js because build errors, use javascript Date instead. --- .../user-license-activation.jsx | 19 ++++++++++--------- .../lib/class.core-rest-api-endpoints.php | 5 +++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx index 1f3eb43c4665b..cf49a845101d4 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; -import moment from 'moment'; import { createInterpolateElement } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; @@ -33,9 +32,10 @@ class UserLicenseActivationNotice extends React.Component { }; render() { - // TODO: Update this link to point to the user-licensing activation route. + // TODO: Update this link to point to the user-license activation route. const USER_LICENSE_ACTIVATION_ROUTE = '/wp-admin/admin.php?page=jetpack#/my-plan'; - const MAX_DISMISS_TIME = [ 2, 'weeks' ]; + const DAY_IN_MILLISECONDS = 24 * 3600 * 1000; + const MAX_DAYS_DISMISSED = 14; const { detachedLicensesCount: currentDetachedCount, @@ -47,19 +47,20 @@ class UserLicenseActivationNotice extends React.Component { last_dismissed_time: lastDismissedDateTime, } = this.props.activationNoticeDismissInfo; - const now = moment(); - const lastDismissedTime = moment( lastDismissedDateTime ? lastDismissedDateTime : moment() ); const userHasDetachedLicenses = !! currentDetachedCount; const userHasNewDetachedLicenses = currentDetachedCount > ( lastDetachedCount || 0 ); - const hasBeenDismissedMoreThanTwoWeeks = lastDismissedTime - .add( ...MAX_DISMISS_TIME ) - .isSameOrBefore( now ); + + const now = new Date(); + const lastDismissedTime = new Date( + lastDismissedDateTime ? lastDismissedDateTime : new Date() + ); + const daysNoticeHasBeenDismissed = ( now - lastDismissedTime ) / DAY_IN_MILLISECONDS; // Show the notice when the user acquires a new license, Or when the user has an available // license(s), but has dismissed the notice and it's been over 2 weeks without activating it. if ( userHasDetachedLicenses && - ( userHasNewDetachedLicenses || hasBeenDismissedMoreThanTwoWeeks ) + ( userHasNewDetachedLicenses || daysNoticeHasBeenDismissed > MAX_DAYS_DISMISSED ) ) { return ( format( 'c' ); + // Use UTC timezone and convert to ISO8601 format(DateTime::W3C) for best compatibility with JavaScript Date in all browsers. + $last_dismissed_time = ( new DateTime( 'NOW', new DateTimeZone( 'UTC' ) ) )->format( DateTime::W3C ); $notice_data = array( 'last_detached_count' => $last_detached_count, 'last_dismissed_time' => $last_dismissed_time, @@ -2946,7 +2947,7 @@ public static function validate_posint( $value, $request, $param ) { /** * Validates that the parameter is a non-negative integer (includes 0). * - * @since 4.3.0 + * @since 10.4.0 * * @param int $value Value to check. * @param WP_REST_Request $request The request sent to the WP REST API. From 9daed085db0deeeb1e3429eccb20965ffbb8de11 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 28 Oct 2021 08:36:29 -0400 Subject: [PATCH 08/31] fix project versions. --- pnpm-lock.yaml | 10 +++++----- .../changelog/add-user-license-activate-notice-2#3 | 4 ++++ projects/js-packages/connection/package.json | 2 +- .../idc/changelog/add-user-license-activate-notice-2#3 | 4 ++++ projects/js-packages/idc/package.json | 2 +- .../changelog/add-user-license-activate-notice-2#3 | 4 ++++ projects/packages/connection-ui/package.json | 2 +- .../changelog/add-user-license-activate-notice-2#3 | 4 ++++ projects/plugins/backup/package.json | 2 +- .../changelog/add-user-license-activate-notice-2#3 | 4 ++++ projects/plugins/jetpack/package.json | 2 +- 11 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 create mode 100644 projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 create mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 create mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 create mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c8b8ea16232c..b9f4f763583da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: projects/js-packages/connection: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.1-alpha '@wordpress/base-styles': 4.0.2 '@wordpress/browserslist-config': 4.1.0 @@ -180,7 +180,7 @@ importers: projects/js-packages/idc: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.1-alpha '@wordpress/base-styles': 4.0.2 '@wordpress/components': 19.0.0 @@ -293,7 +293,7 @@ importers: projects/packages/connection-ui: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-connection': workspace:^0.8.1-alpha '@automattic/jetpack-idc': workspace:^0.4.1-alpha '@babel/core': 7.15.0 @@ -406,7 +406,7 @@ importers: projects/plugins/backup: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.1-alpha '@automattic/jetpack-connection': workspace:^0.8.1-alpha '@babel/core': 7.15.0 @@ -537,7 +537,7 @@ importers: '@automattic/components': 1.0.0-alpha.3 '@automattic/format-currency': 1.0.0-alpha.0 '@automattic/jetpack-analytics': workspace:^0.1.2 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.4.1-alpha '@automattic/jetpack-connection': workspace:^0.8.1-alpha '@automattic/popup-monitor': 1.0.0 diff --git a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index 1de76ec2a14ce..86e219857d0e9 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.1-alpha", "@wordpress/base-styles": "4.0.2", "@wordpress/browserslist-config": "4.1.0", diff --git a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index 52d002f8b226b..4925ed142ee74 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.1-alpha", "@wordpress/base-styles": "4.0.2", "@wordpress/components": "19.0.0", diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index 516f4b1314fef..2470c19118345 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@automattic/calypso-build": "9.0.0", - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", "@automattic/jetpack-idc": "workspace:^0.4.1-alpha", "@babel/core": "7.15.0", diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index c1e08e2a9afd0..d8ea428b67578 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -27,7 +27,7 @@ "extends @wordpress/browserslist-config" ], "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.1-alpha", "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", "@wordpress/api-fetch": "5.2.4", diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index c6fc759e3d799..006a1abbe5e89 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -64,7 +64,7 @@ "@automattic/components": "1.0.0-alpha.3", "@automattic/format-currency": "1.0.0-alpha.0", "@automattic/jetpack-analytics": "workspace:^0.1.2", - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.4.1-alpha", "@automattic/jetpack-connection": "workspace:^0.8.1-alpha", "@automattic/popup-monitor": "1.0.0", From 440b442469290c53ced4fa1175a2aa0b2e5c56ca Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 28 Oct 2021 15:39:34 -0400 Subject: [PATCH 09/31] update packages versions. --- pnpm-lock.yaml | 10 +++++----- projects/js-packages/connection/package.json | 2 +- projects/js-packages/idc/package.json | 2 +- projects/packages/connection-ui/package.json | 2 +- projects/plugins/backup/package.json | 2 +- projects/plugins/jetpack/package.json | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e92e4350d7cc2..e255f68890d4d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -128,7 +128,7 @@ importers: projects/js-packages/connection: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0-alpha '@wordpress/base-styles': 4.0.2 '@wordpress/browserslist-config': 4.1.0 @@ -180,7 +180,7 @@ importers: projects/js-packages/idc: specifiers: - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0-alpha '@wordpress/base-styles': 4.0.2 '@wordpress/components': 19.0.0 @@ -295,7 +295,7 @@ importers: projects/packages/connection-ui: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-connection': workspace:^0.9.0-alpha '@automattic/jetpack-idc': workspace:^0.4.1-alpha '@babel/core': 7.15.0 @@ -408,7 +408,7 @@ importers: projects/plugins/backup: specifiers: '@automattic/calypso-build': 9.0.0 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0-alpha '@automattic/jetpack-connection': workspace:^0.9.0-alpha '@babel/core': 7.15.0 @@ -539,7 +539,7 @@ importers: '@automattic/components': 1.0.0-alpha.3 '@automattic/format-currency': 1.0.0-alpha.0 '@automattic/jetpack-analytics': workspace:^0.1.2 - '@automattic/jetpack-api': workspace:^0.5.0 + '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0-alpha '@automattic/jetpack-connection': workspace:^0.9.0-alpha '@automattic/popup-monitor': 1.0.0 diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index d3f2cac87fb4e..788f51a61da33 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0-alpha", "@wordpress/base-styles": "4.0.2", "@wordpress/browserslist-config": "4.1.0", diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index eb0db41176922..ed48576ac8a09 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -5,7 +5,7 @@ "author": "Automattic", "license": "GPL-2.0-or-later", "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0-alpha", "@wordpress/base-styles": "4.0.2", "@wordpress/components": "19.0.0", diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index 6a0a59c005ee5..9c2d9f5a0027f 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@automattic/calypso-build": "9.0.0", - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-connection": "workspace:^0.9.0-alpha", "@automattic/jetpack-idc": "workspace:^0.4.1-alpha", "@babel/core": "7.15.0", diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index e977da211c95f..2052958b94c2e 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -27,7 +27,7 @@ "extends @wordpress/browserslist-config" ], "dependencies": { - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0-alpha", "@automattic/jetpack-connection": "workspace:^0.9.0-alpha", "@wordpress/api-fetch": "5.2.4", diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index 8567c5ea52b48..49e25c0ce5146 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -64,7 +64,7 @@ "@automattic/components": "1.0.0-alpha.3", "@automattic/format-currency": "1.0.0-alpha.0", "@automattic/jetpack-analytics": "workspace:^0.1.2", - "@automattic/jetpack-api": "workspace:^0.5.0", + "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0-alpha", "@automattic/jetpack-connection": "workspace:^0.9.0-alpha", "@automattic/popup-monitor": "1.0.0", From dd24b0a0149420b18dc0d433b7710ac5a6bf9233 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 28 Oct 2021 16:01:32 -0400 Subject: [PATCH 10/31] Remove extra changelogs. --- .../connection/changelog/add-user-license-activate-notice-2#2 | 4 ---- .../connection/changelog/add-user-license-activate-notice-2#3 | 4 ---- .../idc/changelog/add-user-license-activate-notice-2#2 | 4 ---- .../idc/changelog/add-user-license-activate-notice-2#3 | 4 ---- .../changelog/add-user-license-activate-notice-2#2 | 4 ---- .../changelog/add-user-license-activate-notice-2#3 | 4 ---- .../backup/changelog/add-user-license-activate-notice-2#2 | 4 ---- .../backup/changelog/add-user-license-activate-notice-2#3 | 4 ---- .../jetpack/changelog/add-user-license-activate-notice-2 | 4 ---- .../jetpack/changelog/add-user-license-activate-notice-2#2 | 4 ---- .../jetpack/changelog/add-user-license-activate-notice-2#3 | 4 ---- 11 files changed, 44 deletions(-) delete mode 100644 projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 delete mode 100644 projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 delete mode 100644 projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 delete mode 100644 projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 delete mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 delete mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 delete mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 delete mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 delete mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 delete mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 delete mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 diff --git a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 b/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/js-packages/connection/changelog/add-user-license-activate-notice-2#3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 b/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/js-packages/idc/changelog/add-user-license-activate-notice-2#3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 deleted file mode 100644 index 1eaea6a769e84..0000000000000 --- a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Updated package dependencies. diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 deleted file mode 100644 index 1eaea6a769e84..0000000000000 --- a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Updated package dependencies. diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 deleted file mode 100644 index 1eaea6a769e84..0000000000000 --- a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#3 +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Updated package dependencies. From 4f98862a7a853b3c480fb83fbedda876026b26f0 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 15:08:25 -0400 Subject: [PATCH 11/31] Convert to function component - UserLicenseActivationNotice. --- .../user-license-activation.jsx | 121 +++++++++--------- 1 file changed, 63 insertions(+), 58 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx index cf49a845101d4..e960e7626d0a6 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -2,7 +2,7 @@ * External dependencies */ import PropTypes from 'prop-types'; -import React from 'react'; +import React, { createElement, useCallback } from 'react'; import { connect } from 'react-redux'; import { createInterpolateElement } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; @@ -18,71 +18,76 @@ import { } from 'state/licensing'; import SimpleNotice from 'components/notice'; -class UserLicenseActivationNotice extends React.Component { - static propTypes = { - detachedLicensesCount: PropTypes.number.isRequired, - activationNoticeDismissInfo: PropTypes.shape( { - last_detached_count: PropTypes.number, - last_dismiss_time: PropTypes.string, - } ), - }; +/** + * Jetpack "user"-licenses activation notice. (a license key is available for activation) + * + * @param {object} props - The properties. + * @param {number} props.detachedLicensesCount - The user's number of "detached" licenses. + * @param {object} props.activationNoticeDismissInfo - Object containing `last_detached_count` and `last_dismissed_time`. + * @param {Function} props.updateLicensingActivationNoticeDismiss - Function to update the notification dismiss info. + * @returns {React.Component} The `UserLicenseActivationNotice` component. + */ +const UserLicenseActivationNotice = props => { + // TODO: Update this link to point to the user-license activation route. + const USER_LICENSE_ACTIVATION_ROUTE = '/wp-admin/admin.php?page=jetpack#/my-plan'; + const DAY_IN_MILLISECONDS = 24 * 3600 * 1000; + const MAX_DAYS_DISMISSED = 14; - trackClick = () => { - analytics.tracks.recordJetpackClick( 'activate-user-license' ); - }; + const { + detachedLicensesCount, + activationNoticeDismissInfo, + updateLicensingActivationNoticeDismiss, + } = props; - render() { - // TODO: Update this link to point to the user-license activation route. - const USER_LICENSE_ACTIVATION_ROUTE = '/wp-admin/admin.php?page=jetpack#/my-plan'; - const DAY_IN_MILLISECONDS = 24 * 3600 * 1000; - const MAX_DAYS_DISMISSED = 14; + const { + last_detached_count: lastDetachedCount, + last_dismissed_time: lastDismissedDateTime, + } = activationNoticeDismissInfo; - const { - detachedLicensesCount: currentDetachedCount, - updateLicensingActivationNoticeDismiss, - } = this.props; + const userHasDetachedLicenses = !! detachedLicensesCount; + const userHasNewDetachedLicenses = detachedLicensesCount > ( lastDetachedCount || 0 ); - const { - last_detached_count: lastDetachedCount, - last_dismissed_time: lastDismissedDateTime, - } = this.props.activationNoticeDismissInfo; + const now = new Date(); + const lastDismissedTime = new Date( lastDismissedDateTime ? lastDismissedDateTime : new Date() ); + const daysNoticeHasBeenDismissed = ( now - lastDismissedTime ) / DAY_IN_MILLISECONDS; - const userHasDetachedLicenses = !! currentDetachedCount; - const userHasNewDetachedLicenses = currentDetachedCount > ( lastDetachedCount || 0 ); + const trackClick = useCallback( () => { + analytics.tracks.recordJetpackClick( 'activate-user-license-notice-click' ); + }, [] ); - const now = new Date(); - const lastDismissedTime = new Date( - lastDismissedDateTime ? lastDismissedDateTime : new Date() + // Show the notice when the user acquires a new license, Or when the user has an available + // license(s), but has dismissed the notice and it's been over 2 weeks without activating it. + if ( + userHasDetachedLicenses && + ( userHasNewDetachedLicenses || daysNoticeHasBeenDismissed > MAX_DAYS_DISMISSED ) + ) { + return ( + Activate now', 'jetpack' ), + { + a: createElement( 'a', { + href: USER_LICENSE_ACTIVATION_ROUTE, + onClick: trackClick, + } ), + } + ) } + /> ); - const daysNoticeHasBeenDismissed = ( now - lastDismissedTime ) / DAY_IN_MILLISECONDS; - - // Show the notice when the user acquires a new license, Or when the user has an available - // license(s), but has dismissed the notice and it's been over 2 weeks without activating it. - if ( - userHasDetachedLicenses && - ( userHasNewDetachedLicenses || daysNoticeHasBeenDismissed > MAX_DAYS_DISMISSED ) - ) { - return ( - Activate now', 'jetpack' ), - { - a: ( - - { this.props.children } - - ), - } - ) } - /> - ); - } - return false; } -} + return null; +}; + +UserLicenseActivationNotice.propTypes = { + detachedLicensesCount: PropTypes.number.isRequired, + activationNoticeDismissInfo: PropTypes.shape( { + last_detached_count: PropTypes.number, + last_dismiss_time: PropTypes.string, + } ), +}; export default connect( state => { From 55b38eed319093c650eddd921de55275a29b666e Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 15:24:38 -0400 Subject: [PATCH 12/31] Replace static admin link with `siteAdminUrl` prop. --- .../jetpack-notices/user-license-activation.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx index e960e7626d0a6..8c6c32718cdea 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -11,6 +11,7 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import analytics from 'lib/analytics'; +import { getSiteAdminUrl } from 'state/initial-state'; import { getDetachedLicensesCount, getActivationNoticeDismissInfo, @@ -28,8 +29,6 @@ import SimpleNotice from 'components/notice'; * @returns {React.Component} The `UserLicenseActivationNotice` component. */ const UserLicenseActivationNotice = props => { - // TODO: Update this link to point to the user-license activation route. - const USER_LICENSE_ACTIVATION_ROUTE = '/wp-admin/admin.php?page=jetpack#/my-plan'; const DAY_IN_MILLISECONDS = 24 * 3600 * 1000; const MAX_DAYS_DISMISSED = 14; @@ -37,6 +36,7 @@ const UserLicenseActivationNotice = props => { detachedLicensesCount, activationNoticeDismissInfo, updateLicensingActivationNoticeDismiss, + siteAdminUrl, } = props; const { @@ -44,6 +44,9 @@ const UserLicenseActivationNotice = props => { last_dismissed_time: lastDismissedDateTime, } = activationNoticeDismissInfo; + // TODO: Update this link to point to the user-license activation route. + const USER_LICENSE_ACTIVATION_ROUTE = `${ siteAdminUrl }admin.php?page=jetpack#/my-plan`; + const userHasDetachedLicenses = !! detachedLicensesCount; const userHasNewDetachedLicenses = detachedLicensesCount > ( lastDetachedCount || 0 ); @@ -84,9 +87,10 @@ const UserLicenseActivationNotice = props => { UserLicenseActivationNotice.propTypes = { detachedLicensesCount: PropTypes.number.isRequired, activationNoticeDismissInfo: PropTypes.shape( { - last_detached_count: PropTypes.number, - last_dismiss_time: PropTypes.string, + last_detached_count: PropTypes.number.isRequired, + last_dismiss_time: PropTypes.string.isRequired, } ), + siteAdminUrl: PropTypes.string.isRequired, }; export default connect( @@ -94,6 +98,7 @@ export default connect( return { detachedLicensesCount: getDetachedLicensesCount( state ), activationNoticeDismissInfo: getActivationNoticeDismissInfo( state ), + siteAdminUrl: getSiteAdminUrl( state ), }; }, dispatch => { From 89f0e9da6b4c1c37198a93817ec3dc8856cb6093 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 16:24:30 -0400 Subject: [PATCH 13/31] Use 'Jetpack_Options' wrapper, as opposed to the standard WordPress Options API. --- .../options/legacy/class-jetpack-options.php | 57 ++++++++++--------- .../class-jetpack-redux-state-helper.php | 2 +- .../lib/class.core-rest-api-endpoints.php | 4 +- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/projects/packages/options/legacy/class-jetpack-options.php b/projects/packages/options/legacy/class-jetpack-options.php index 0b9860c2c101c..270a289f7591f 100644 --- a/projects/packages/options/legacy/class-jetpack-options.php +++ b/projects/packages/options/legacy/class-jetpack-options.php @@ -92,34 +92,35 @@ public static function get_option_names( $type = 'compact' ) { } return array( - 'id', // (int) The Client ID/WP.com Blog ID of this site. - 'publicize_connections', // (array) An array of Publicize connections from WordPress.com. - 'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com. - 'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time. - 'old_version', // (string) Used to determine which modules are the most recently added. previous_version:time. - 'fallback_no_verify_ssl_certs', // (int) Flag for determining if this host must skip SSL Certificate verification due to misconfigured SSL. - 'time_diff', // (int) Offset between Jetpack server's clocks and this server's clocks. Jetpack Server Time = time() + (int) Jetpack_Options::get_option( 'time_diff' ) - 'public', // (int|bool) If we think this site is public or not (1, 0), false if we haven't yet tried to figure it out. - 'videopress', // (array) VideoPress options array. - 'is_network_site', // (int|bool) If we think this site is a network or a single blog (1, 0), false if we haven't yet tried to figue it out. - 'social_links', // (array) The specified links for each social networking site. - 'identity_crisis_whitelist', // (array) An array of options, each having an array of the values whitelisted for it. - 'gplus_authors', // (array) The Google+ authorship information for connected users. - 'last_heartbeat', // (int) The timestamp of the last heartbeat that fired. - 'hide_jitm', // (array) A list of just in time messages that we should not show because they have been dismissed by the user. - 'custom_css_4.7_migration', // (bool) Whether Custom CSS has scanned for and migrated any legacy CSS CPT entries to the new Core format. - 'image_widget_migration', // (bool) Whether any legacy Image Widgets have been converted to the new Core widget. - 'gallery_widget_migration', // (bool) Whether any legacy Gallery Widgets have been converted to the new Core widget. - 'sso_first_login', // (bool) Is this the first time the user logins via SSO. - 'dismissed_hints', // (array) Part of Plugin Search Hints. List of cards that have been dismissed. - 'first_admin_view', // (bool) Set to true the first time the user views the admin. Usually after the initial connection. - 'setup_wizard_questionnaire', // (array) (DEPRECATED) List of user choices from the setup wizard. - 'setup_wizard_status', // (string) (DEPRECATED) Status of the setup wizard. - 'licensing_error', // (string) Last error message occurred while attaching licenses that is yet to be surfaced to the user. - 'recommendations_banner_dismissed', // (bool) Determines if the recommendations dashboard banner is dismissed or not. - 'recommendations_banner_enabled', // (bool) Whether the recommendations are enabled or not. - 'recommendations_data', // (array) The user choice and other data for the recommendations. - 'recommendations_step', // (string) The current step of the recommendations. + 'id', // (int) The Client ID/WP.com Blog ID of this site. + 'publicize_connections', // (array) An array of Publicize connections from WordPress.com. + 'master_user', // (int) The local User ID of the user who connected this site to jetpack.wordpress.com. + 'version', // (string) Used during upgrade procedure to auto-activate new modules. version:time. + 'old_version', // (string) Used to determine which modules are the most recently added. previous_version:time. + 'fallback_no_verify_ssl_certs', // (int) Flag for determining if this host must skip SSL Certificate verification due to misconfigured SSL. + 'time_diff', // (int) Offset between Jetpack server's clocks and this server's clocks. Jetpack Server Time = time() + (int) Jetpack_Options::get_option( 'time_diff' ) + 'public', // (int|bool) If we think this site is public or not (1, 0), false if we haven't yet tried to figure it out. + 'videopress', // (array) VideoPress options array. + 'is_network_site', // (int|bool) If we think this site is a network or a single blog (1, 0), false if we haven't yet tried to figue it out. + 'social_links', // (array) The specified links for each social networking site. + 'identity_crisis_whitelist', // (array) An array of options, each having an array of the values whitelisted for it. + 'gplus_authors', // (array) The Google+ authorship information for connected users. + 'last_heartbeat', // (int) The timestamp of the last heartbeat that fired. + 'hide_jitm', // (array) A list of just in time messages that we should not show because they have been dismissed by the user. + 'custom_css_4.7_migration', // (bool) Whether Custom CSS has scanned for and migrated any legacy CSS CPT entries to the new Core format. + 'image_widget_migration', // (bool) Whether any legacy Image Widgets have been converted to the new Core widget. + 'gallery_widget_migration', // (bool) Whether any legacy Gallery Widgets have been converted to the new Core widget. + 'sso_first_login', // (bool) Is this the first time the user logins via SSO. + 'dismissed_hints', // (array) Part of Plugin Search Hints. List of cards that have been dismissed. + 'first_admin_view', // (bool) Set to true the first time the user views the admin. Usually after the initial connection. + 'setup_wizard_questionnaire', // (array) (DEPRECATED) List of user choices from the setup wizard. + 'setup_wizard_status', // (string) (DEPRECATED) Status of the setup wizard. + 'licensing_error', // (string) Last error message occurred while attaching licenses that is yet to be surfaced to the user. + 'recommendations_banner_dismissed', // (bool) Determines if the recommendations dashboard banner is dismissed or not. + 'recommendations_banner_enabled', // (bool) Whether the recommendations are enabled or not. + 'recommendations_data', // (array) The user choice and other data for the recommendations. + 'recommendations_step', // (string) The current step of the recommendations. + 'licensing_activation_notice_dismiss', // (array) The `last_detached_count` and the `last_dismissed_time` for the user-license activation notice. ); } diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php index 2dec5911bea92..d8e39b3c3a7ef 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php @@ -379,7 +379,7 @@ public static function get_license_activation_notice_dismiss() { 'last_dismissed_time' => null, ); - return get_option( 'jetpack_licensing_activation_notice_dismiss', $default ); + return Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ); } } diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 45218e2adc385..551cfa950577e 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -1114,8 +1114,8 @@ public static function update_licensing_activation_notice_dismiss( $request ) { 'last_dismissed_time' => $last_dismissed_time, ); - update_option( 'jetpack_licensing_activation_notice_dismiss', $notice_data ); - return rest_ensure_response( get_option( 'jetpack_licensing_activation_notice_dismiss', $default ) ); + Jetpack_Options::update_option( 'licensing_activation_notice_dismiss', $notice_data, true ); + return rest_ensure_response( Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ) ); } public static function submit_survey( $request ) { From e5fec30620edb3c5ea8498920709de3599b65236 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 17:31:10 -0400 Subject: [PATCH 14/31] Increase restrictions in user-licensing REST API permission callbacks. --- .../jetpack/_inc/lib/class.core-rest-api-endpoints.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 551cfa950577e..29380caed16f3 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -733,11 +733,14 @@ public static function register_endpoints() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => __CLASS__ . '::get_user_license_counts', - 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', ), ) ); + /** + * Update user-licensing activation notice dismiss info. + */ register_rest_route( 'jetpack/v4', 'licensing/user/activation-notice-dismiss', @@ -745,12 +748,12 @@ public static function register_endpoints() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => __CLASS__ . '::get_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', ), array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::view_admin_page_permission_check', + 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', 'args' => array( 'last_detached_count' => array( 'required' => true, From e2c2f6b1a65adbd5c45d7a0292113d8fcca79160 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 18:23:13 -0400 Subject: [PATCH 15/31] Remove un-necessary 'plugins/boost' changelog entry. --- .../boost/changelog/add-user-license-activate-notice-2 | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 projects/plugins/boost/changelog/add-user-license-activate-notice-2 diff --git a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 deleted file mode 100644 index 559e5c0b2a7eb..0000000000000 --- a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: update e2e - - From 9f5bda80597c4a1fda9a8c8d8bb3a376f98a6655 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 18:29:18 -0400 Subject: [PATCH 16/31] Add changelog entry for 'packages/options'. --- .../options/changelog/add-user-license-activate-notice-2 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/packages/options/changelog/add-user-license-activate-notice-2 diff --git a/projects/packages/options/changelog/add-user-license-activate-notice-2 b/projects/packages/options/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1cb3fe232d9c4 --- /dev/null +++ b/projects/packages/options/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Added Jetpack Option 'licensing_activation_notice_dismiss'. From 4b49fd05d9aca19e26edbb2265ce65ca1e2318b9 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 19:26:04 -0400 Subject: [PATCH 17/31] Update package dependencies. --- pnpm-lock.yaml | 10 +++++----- projects/js-packages/connection/package.json | 2 +- projects/js-packages/idc/package.json | 2 +- .../changelog/add-user-license-activate-notice-2 | 4 ++++ projects/js-packages/storybook/package.json | 2 +- projects/packages/connection-ui/package.json | 6 +++--- projects/plugins/backup/package.json | 2 +- projects/plugins/jetpack/package.json | 2 +- 8 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 projects/js-packages/storybook/changelog/add-user-license-activate-notice-2 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 45e2828468584..3e776922421a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,7 +215,7 @@ importers: specifiers: '@automattic/jetpack-base-styles': workspace:^0.1.0-alpha '@automattic/jetpack-components': workspace:^0.5.0 - '@automattic/jetpack-connection': workspace:^0.9.0 + '@automattic/jetpack-connection': workspace:^0.9.1-alpha '@babel/core': 7.15.0 '@babel/plugin-syntax-jsx': 7.14.5 '@babel/runtime-corejs3': 7.15.3 @@ -341,8 +341,8 @@ importers: specifiers: '@automattic/calypso-build': 9.0.0 '@automattic/jetpack-api': workspace:^0.5.1-alpha - '@automattic/jetpack-connection': workspace:^0.9.0 - '@automattic/jetpack-idc': workspace:^0.4.1 + '@automattic/jetpack-connection': workspace:^0.9.1-alpha + '@automattic/jetpack-idc': workspace:^0.4.2-alpha '@babel/core': 7.15.0 '@babel/helper-module-imports': 7.14.5 '@babel/preset-env': 7.15.0 @@ -455,7 +455,7 @@ importers: '@automattic/calypso-build': 9.0.0 '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0 - '@automattic/jetpack-connection': workspace:^0.9.0 + '@automattic/jetpack-connection': workspace:^0.9.1-alpha '@babel/core': 7.15.0 '@babel/helper-module-imports': 7.14.5 '@babel/preset-env': 7.15.0 @@ -586,7 +586,7 @@ importers: '@automattic/jetpack-analytics': workspace:^0.1.2 '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.5.0 - '@automattic/jetpack-connection': workspace:^0.9.0 + '@automattic/jetpack-connection': workspace:^0.9.1-alpha '@automattic/popup-monitor': 1.0.0 '@automattic/request-external-access': 1.0.0 '@automattic/social-previews': 1.1.1 diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index a6bb85fc58bfc..b0775d47a01bd 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-connection", - "version": "0.9.0", + "version": "0.9.1-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index a01e7cdbf89b7..99d3ebb4a0655 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-idc", - "version": "0.4.1", + "version": "0.4.2-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2 b/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/storybook/package.json b/projects/js-packages/storybook/package.json index 130869cbcfcba..dc1fe2fb9e197 100644 --- a/projects/js-packages/storybook/package.json +++ b/projects/js-packages/storybook/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@automattic/jetpack-base-styles": "workspace:^0.1.0-alpha", "@automattic/jetpack-components": "workspace:^0.5.0", - "@automattic/jetpack-connection": "workspace:^0.9.0", + "@automattic/jetpack-connection": "workspace:^0.9.1-alpha", "@babel/core": "7.15.0", "@babel/plugin-syntax-jsx": "7.14.5", "@babel/runtime-corejs3": "7.15.3", diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index 7d25627281553..2998a5d6b0b5d 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-connection-manager-ui", - "version": "1.6.0", + "version": "1.6.1-alpha", "description": "Jetpack Connection Manager UI", "main": "_inc/admin.jsx", "repository": "https://github.com/Automattic/jetpack-connection-ui", @@ -16,8 +16,8 @@ "dependencies": { "@automattic/calypso-build": "9.0.0", "@automattic/jetpack-api": "workspace:^0.5.1-alpha", - "@automattic/jetpack-connection": "workspace:^0.9.0", - "@automattic/jetpack-idc": "workspace:^0.4.1", + "@automattic/jetpack-connection": "workspace:^0.9.1-alpha", + "@automattic/jetpack-idc": "workspace:^0.4.2-alpha", "@babel/core": "7.15.0", "@babel/helper-module-imports": "7.14.5", "@babel/preset-env": "7.15.0", diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index 92499349b36af..324145a3cd0c2 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -29,7 +29,7 @@ "dependencies": { "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0", - "@automattic/jetpack-connection": "workspace:^0.9.0", + "@automattic/jetpack-connection": "workspace:^0.9.1-alpha", "@wordpress/api-fetch": "5.2.4", "@wordpress/data": "6.1.2", "@wordpress/date": "4.2.2", diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index 23797ae1d8e0c..da1469fc81edb 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -66,7 +66,7 @@ "@automattic/jetpack-analytics": "workspace:^0.1.2", "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.5.0", - "@automattic/jetpack-connection": "workspace:^0.9.0", + "@automattic/jetpack-connection": "workspace:^0.9.1-alpha", "@automattic/popup-monitor": "1.0.0", "@automattic/request-external-access": "1.0.0", "@automattic/social-previews": "1.1.1", From dba965af5dae69574c536c7de3d036ea791a4701 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Tue, 2 Nov 2021 20:54:48 -0400 Subject: [PATCH 18/31] Add rest api user_licensing_permission_check() --- .../lib/class.core-rest-api-endpoints.php | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 29380caed16f3..f710de4893409 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -733,7 +733,7 @@ public static function register_endpoints() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => __CLASS__ . '::get_user_license_counts', - 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', ), ) ); @@ -748,12 +748,12 @@ public static function register_endpoints() { array( 'methods' => WP_REST_Server::READABLE, 'callback' => __CLASS__ . '::get_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', ), array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::unlink_user_permission_callback', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', 'args' => array( 'last_detached_count' => array( 'required' => true, @@ -1441,6 +1441,22 @@ public static function purchase_token_permission_check() { return new WP_Error( 'invalid_permission_manage_purchase_token', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); } + /** + * Verify that user can view and update user-licensing data. + * + * @return bool Whether the user is connection owner and is currently connected. + */ + public static function user_licensing_permission_check() { + $connection_manager = new Connection_Manager( 'jetpack' ); + $user_id = get_current_user_id(); + + if ( $connection_manager->get_connection_owner_id() === $user_id && $connection_manager->is_user_connected( $user_id ) ) { + return true; + } + + return new WP_Error( 'invalid_permission_manage_user_licenses', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) ); + } + /** * Test connection status for this Jetpack site. * From 28a2ae3444cdaae0791e2daab390df83cd733a48 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 10:19:29 -0400 Subject: [PATCH 19/31] Move 'get_license_activation_notice_dismiss()' to Licensing package. --- .../licensing/src/class-licensing.php | 20 +++++++++++++++++++ .../class-jetpack-redux-state-helper.php | 18 +---------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/projects/packages/licensing/src/class-licensing.php b/projects/packages/licensing/src/class-licensing.php index 7263a35b972f4..49d06d6a6272b 100644 --- a/projects/packages/licensing/src/class-licensing.php +++ b/projects/packages/licensing/src/class-licensing.php @@ -249,4 +249,24 @@ public static function is_licensing_input_enabled() { */ return apply_filters( 'jetpack_licensing_ui_enabled', false ) && current_user_can( 'jetpack_connect_user' ); } + + /** + * Gets the user-licensing activation notice dismissal info. + * + * @since 10.4.0 + * @return array + */ + public function get_license_activation_notice_dismiss() { + + $default = array( + 'last_detached_count' => null, + 'last_dismissed_time' => null, + ); + + if ( $this->connection()->is_user_connected() && $this->connection()->is_connection_owner() ) { + return Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ); + } + + return $default; + } } diff --git a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php index d8e39b3c3a7ef..66cad77bc8fca 100644 --- a/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php +++ b/projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php @@ -178,7 +178,7 @@ public static function get_initial_state() { 'error' => Licensing::instance()->last_error(), 'showLicensingUi' => Licensing::instance()->is_licensing_input_enabled(), 'userCounts' => Jetpack_Core_Json_Api_Endpoints::get_user_license_counts(), - 'activationNoticeDismiss' => self::get_license_activation_notice_dismiss(), + 'activationNoticeDismiss' => Licensing::instance()->get_license_activation_notice_dismiss(), ), ); } @@ -365,22 +365,6 @@ public static function get_purchase_token() { public static function generate_purchase_token() { return wp_generate_password( 12, false ); } - - /** - * Gets the user license activation notice dismissal info. - * - * @since 10.4.0 - * @return array|boolean - */ - public static function get_license_activation_notice_dismiss() { - - $default = array( - 'last_detached_count' => null, - 'last_dismissed_time' => null, - ); - - return Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ); - } } /** From fc4d2be630d633bc599043277456a2cf8706c415 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 10:30:29 -0400 Subject: [PATCH 20/31] Just some straightening up, in class.core-rest-api-endpoints.php. --- .../lib/class.core-rest-api-endpoints.php | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index f710de4893409..037d606cae68f 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -730,11 +730,9 @@ public static function register_endpoints() { 'jetpack/v4', 'licensing/user/counts', array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_user_license_counts', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - ), + 'methods' => WP_REST_Server::READABLE, + 'callback' => __CLASS__ . '::get_user_license_counts', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', ) ); @@ -745,21 +743,14 @@ public static function register_endpoints() { 'jetpack/v4', 'licensing/user/activation-notice-dismiss', array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => __CLASS__ . '::get_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - ), - array( - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', - 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', - 'args' => array( - 'last_detached_count' => array( - 'required' => true, - 'type' => 'integer', - 'validate_callback' => __CLASS__ . '::validate_non_neg_int', - ), + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => __CLASS__ . '::update_licensing_activation_notice_dismiss', + 'permission_callback' => __CLASS__ . '::user_licensing_permission_check', + 'args' => array( + 'last_detached_count' => array( + 'required' => true, + 'type' => 'integer', + 'validate_callback' => __CLASS__ . '::validate_non_neg_int', ), ), ) @@ -1444,13 +1435,12 @@ public static function purchase_token_permission_check() { /** * Verify that user can view and update user-licensing data. * - * @return bool Whether the user is connection owner and is currently connected. + * @return bool Whether the user is currently connected and they are the connection owner. */ public static function user_licensing_permission_check() { $connection_manager = new Connection_Manager( 'jetpack' ); - $user_id = get_current_user_id(); - if ( $connection_manager->get_connection_owner_id() === $user_id && $connection_manager->is_user_connected( $user_id ) ) { + if ( $connection_manager->is_user_connected() && $connection_manager->is_connection_owner() ) { return true; } From e2c854cb16fc1cbbf8dcc64e325a55ca1e713a4d Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 10:36:25 -0400 Subject: [PATCH 21/31] Add changelog entry to packages/licensing. --- .../licensing/changelog/add-user-license-activate-notice-2 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/packages/licensing/changelog/add-user-license-activate-notice-2 diff --git a/projects/packages/licensing/changelog/add-user-license-activate-notice-2 b/projects/packages/licensing/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..c871811e7b79c --- /dev/null +++ b/projects/packages/licensing/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Added get_license_activation_notice_dismiss() function. From 8fa8335de356a7a630496790b0cecd15e3b6e655 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 15:34:28 -0400 Subject: [PATCH 22/31] Update project versions. --- projects/packages/licensing/composer.json | 2 +- .../jetpack/changelog/add-user-license-activate-notice-2 | 4 ++++ projects/plugins/jetpack/composer.json | 2 +- projects/plugins/jetpack/composer.lock | 6 +++--- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 diff --git a/projects/packages/licensing/composer.json b/projects/packages/licensing/composer.json index 33fad300104d7..f3c1573209635 100644 --- a/projects/packages/licensing/composer.json +++ b/projects/packages/licensing/composer.json @@ -49,7 +49,7 @@ "link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}" }, "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.5.x-dev" } } } diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/jetpack/composer.json b/projects/plugins/jetpack/composer.json index 5410de4b69e7f..9a5f15d6e8c92 100644 --- a/projects/plugins/jetpack/composer.json +++ b/projects/plugins/jetpack/composer.json @@ -28,7 +28,7 @@ "automattic/jetpack-identity-crisis": "0.3.x-dev", "automattic/jetpack-jitm": "2.0.x-dev", "automattic/jetpack-lazy-images": "2.0.x-dev", - "automattic/jetpack-licensing": "1.4.x-dev", + "automattic/jetpack-licensing": "1.5.x-dev", "automattic/jetpack-logo": "1.5.x-dev", "automattic/jetpack-options": "1.13.x-dev", "automattic/jetpack-partner": "1.5.x-dev", diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 45983eee5c4e3..152caab530229 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/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": "2114df6ff43b74c0de7ef630d4993d6f", + "content-hash": "225ec11df25133c434854d20b2355e50", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -951,7 +951,7 @@ "dist": { "type": "path", "url": "../../packages/licensing", - "reference": "43c0b265f8f9f4456045d7c1f28133c98c60a219" + "reference": "ecf1135064fcdc825f8f91efc6d7ea149c5f5778" }, "require": { "automattic/jetpack-connection": "^1.30", @@ -970,7 +970,7 @@ "link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}" }, "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { From 37a006be32570ac1b8171ecbbe5faf233ae8d0fd Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 16:06:10 -0400 Subject: [PATCH 23/31] composer update plugins/jetpack --- projects/plugins/jetpack/composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 221bbf7498c26..22ddc05b56e22 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/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": "03b60ec6224d8c573240903619a47e6c", + "content-hash": "6596e24e8f6266188a91c4f990501b13", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", From 8cd0bd281db6d01e8fc73f2aeb59d6f4175221eb Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 3 Nov 2021 16:37:32 -0400 Subject: [PATCH 24/31] pnpm update --- pnpm-lock.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e776922421a9..68a5a16aaf1c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1351,6 +1351,12 @@ packages: dependencies: '@babel/highlight': 7.14.5 + /@babel/code-frame/7.16.0: + resolution: {integrity: sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.16.0 + /@babel/compat-data/7.15.0: resolution: {integrity: sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==} engines: {node: '>=6.9.0'} @@ -1735,6 +1741,14 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 + /@babel/highlight/7.16.0: + resolution: {integrity: sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.15.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + /@babel/parser/7.15.7: resolution: {integrity: sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==} engines: {node: '>=6.0.0'} @@ -18447,7 +18461,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.14.5 + '@babel/code-frame': 7.16.0 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.1.6 From 3ad69b6576f8fa4196790a9382a71fe200df3d85 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 4 Nov 2021 12:48:55 -0400 Subject: [PATCH 25/31] Return $notice_data instead of fetching option. --- .../_inc/lib/class.core-rest-api-endpoints.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php index 192e7149069e9..9047e0e5a1339 100644 --- a/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php @@ -1101,15 +1101,18 @@ public static function update_licensing_activation_notice_dismiss( $request ) { $last_detached_count = ( '' === $request['last_detached_count'] ) ? $default['last_detached_count'] : $request['last_detached_count']; - // Use UTC timezone and convert to ISO8601 format(DateTime::W3C) for best compatibility with JavaScript Date in all browsers. - $last_dismissed_time = ( new DateTime( 'NOW', new DateTimeZone( 'UTC' ) ) )->format( DateTime::W3C ); - $notice_data = array( + $last_dismissed_time = ( '' === $request['last_detached_count'] ) + ? $default['last_dismissed_time'] + // Use UTC timezone and convert to ISO8601 format(DateTime::W3C) for best compatibility with JavaScript Date in all browsers. + : ( new DateTime( 'NOW', new DateTimeZone( 'UTC' ) ) )->format( DateTime::W3C ); + + $notice_data = array( 'last_detached_count' => $last_detached_count, 'last_dismissed_time' => $last_dismissed_time, ); Jetpack_Options::update_option( 'licensing_activation_notice_dismiss', $notice_data, true ); - return rest_ensure_response( Jetpack_Options::get_option( 'licensing_activation_notice_dismiss', $default ) ); + return rest_ensure_response( $notice_data ); } public static function submit_survey( $request ) { From f6da0311392295f58d72c95f5a3e792787fb168b Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 4 Nov 2021 15:45:15 -0400 Subject: [PATCH 26/31] [not verified] Update licensing activation-notice tracks events. --- .../user-license-activation.jsx | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx index 8c6c32718cdea..179f3ed3e2390 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -2,7 +2,7 @@ * External dependencies */ import PropTypes from 'prop-types'; -import React, { createElement, useCallback } from 'react'; +import React, { createElement, useCallback, useEffect } from 'react'; import { connect } from 'react-redux'; import { createInterpolateElement } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; @@ -54,10 +54,27 @@ const UserLicenseActivationNotice = props => { const lastDismissedTime = new Date( lastDismissedDateTime ? lastDismissedDateTime : new Date() ); const daysNoticeHasBeenDismissed = ( now - lastDismissedTime ) / DAY_IN_MILLISECONDS; + useEffect( () => { + if ( + userHasDetachedLicenses && + ( userHasNewDetachedLicenses || daysNoticeHasBeenDismissed > MAX_DAYS_DISMISSED ) + ) { + analytics.tracks.recordEvent( 'jetpack_wpa_licensing_activation_notice_view' ); + } + }, [] ); + const trackClick = useCallback( () => { - analytics.tracks.recordJetpackClick( 'activate-user-license-notice-click' ); + analytics.tracks.recordJetpackClick( { + target: 'licensing_activation_notice', + path: 'licensing/activation', + } ); }, [] ); + const onNoticeDismiss = useCallback( () => { + analytics.tracks.recordEvent( 'jetpack_wpa_licensing_activation_notice_dismiss' ); + updateLicensingActivationNoticeDismiss(); + }, [ updateLicensingActivationNoticeDismiss ] ); + // Show the notice when the user acquires a new license, Or when the user has an available // license(s), but has dismissed the notice and it's been over 2 weeks without activating it. if ( @@ -68,7 +85,7 @@ const UserLicenseActivationNotice = props => { Activate now', 'jetpack' ), { From 5f0e80b7827dbab4cec1351c19abfe4584b36f24 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 4 Nov 2021 16:55:57 -0400 Subject: [PATCH 27/31] Fix eslint react-hooks/exhaustive-deps. --- .../components/jetpack-notices/user-license-activation.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx index 179f3ed3e2390..baad13c7af923 100644 --- a/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx +++ b/projects/plugins/jetpack/_inc/client/components/jetpack-notices/user-license-activation.jsx @@ -54,6 +54,8 @@ const UserLicenseActivationNotice = props => { const lastDismissedTime = new Date( lastDismissedDateTime ? lastDismissedDateTime : new Date() ); const daysNoticeHasBeenDismissed = ( now - lastDismissedTime ) / DAY_IN_MILLISECONDS; + // Send Tracks event on notice 'view'. + // Only runs once on first render useEffect( () => { if ( userHasDetachedLicenses && @@ -61,7 +63,7 @@ const UserLicenseActivationNotice = props => { ) { analytics.tracks.recordEvent( 'jetpack_wpa_licensing_activation_notice_view' ); } - }, [] ); + }, [] ); // eslint-disable-line react-hooks/exhaustive-deps const trackClick = useCallback( () => { analytics.tracks.recordJetpackClick( { From c3665642782430d2c395ca38ce76adf6d2e7d753 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 10 Nov 2021 15:37:25 -0500 Subject: [PATCH 28/31] update project/package versions. --- package.json | 1 + pnpm-lock.yaml | 622 +++++++++++------- projects/js-packages/connection/package.json | 2 +- projects/js-packages/idc/package.json | 2 +- .../add-user-license-activate-notice-2#2 | 4 + projects/js-packages/storybook/package.json | 2 +- .../add-user-license-activate-notice-2#2 | 4 + projects/packages/connection-ui/package.json | 6 +- .../add-user-license-activate-notice-2#2 | 4 + projects/plugins/backup/package.json | 2 +- .../add-user-license-activate-notice-2#2 | 4 + projects/plugins/jetpack/package.json | 6 +- 12 files changed, 399 insertions(+), 260 deletions(-) create mode 100644 projects/js-packages/storybook/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 create mode 100644 projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 diff --git a/package.json b/package.json index 955b64a738d04..18de4ef7ca493 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "devDependencies": { "husky": "4.3.8", "jetpack-cli": "workspace:1.0.0", + "jetpack-e2e-commons": "link:tools/e2e-commons", "jetpack-js-tools": "workspace:*" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce5bc1ed721d7..883ff57200fba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -221,7 +221,7 @@ importers: specifiers: '@automattic/jetpack-base-styles': workspace:^0.1.0-alpha '@automattic/jetpack-components': workspace:^0.6.0 - '@automattic/jetpack-connection': workspace:^0.9.1 + '@automattic/jetpack-connection': workspace:^0.9.2-alpha '@babel/core': 7.16.0 '@babel/plugin-syntax-jsx': 7.16.0 '@babel/runtime-corejs3': 7.16.0 @@ -346,8 +346,8 @@ importers: projects/packages/connection-ui: specifiers: '@automattic/jetpack-api': workspace:^0.5.1-alpha - '@automattic/jetpack-connection': workspace:^0.9.1 - '@automattic/jetpack-idc': workspace:^0.4.2 + '@automattic/jetpack-connection': workspace:^0.9.2-alpha + '@automattic/jetpack-idc': workspace:^0.4.3-alpha '@automattic/jetpack-webpack-config': workspace:^0.1.0 '@babel/core': 7.16.0 '@babel/preset-env': 7.16.0 @@ -447,7 +447,7 @@ importers: specifiers: '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.6.0 - '@automattic/jetpack-connection': workspace:^0.9.1 + '@automattic/jetpack-connection': workspace:^0.9.2-alpha '@automattic/jetpack-webpack-config': workspace:^0.1.0 '@babel/core': 7.16.0 '@babel/preset-env': 7.16.0 @@ -572,7 +572,7 @@ importers: '@automattic/jetpack-analytics': workspace:^0.1.2 '@automattic/jetpack-api': workspace:^0.5.1-alpha '@automattic/jetpack-components': workspace:^0.6.0 - '@automattic/jetpack-connection': workspace:^0.9.1 + '@automattic/jetpack-connection': workspace:^0.9.2-alpha '@automattic/jetpack-webpack-config': workspace:^0.1.0 '@automattic/popup-monitor': 1.0.0 '@automattic/request-external-access': 1.0.0 @@ -670,7 +670,7 @@ importers: postcss-custom-properties: 10.0.0 postcss-loader: 6.2.0 preact: 10.5.15 - prettier: npm:wp-prettier@2.0.5 + prettier: npm:wp-prettier@^2.0.5 progress-event: 1.0.0 prop-types: 15.7.2 q-flat: 1.0.7 @@ -1248,12 +1248,12 @@ packages: dependencies: '@babel/code-frame': 7.16.0 '@babel/generator': 7.16.0 - '@babel/helper-compilation-targets': 7.16.0_@babel+core@7.16.0 + '@babel/helper-compilation-targets': 7.16.3_@babel+core@7.16.0 '@babel/helper-module-transforms': 7.16.0 - '@babel/helpers': 7.16.0 - '@babel/parser': 7.16.2 + '@babel/helpers': 7.16.3 + '@babel/parser': 7.16.3 '@babel/template': 7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 convert-source-map: 1.8.0 debug: 4.3.2 @@ -1310,6 +1310,19 @@ packages: '@babel/helper-validator-option': 7.14.5 browserslist: 4.17.6 semver: 6.3.0 + dev: true + + /@babel/helper-compilation-targets/7.16.3_@babel+core@7.16.0: + resolution: {integrity: sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.16.0 + '@babel/core': 7.16.0 + '@babel/helper-validator-option': 7.14.5 + browserslist: 4.17.6 + semver: 6.3.0 /@babel/helper-create-class-features-plugin/7.16.0_@babel+core@7.16.0: resolution: {integrity: sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==} @@ -1361,10 +1374,10 @@ packages: '@babel/core': ^7.4.0-0 dependencies: '@babel/core': 7.16.0 - '@babel/helper-compilation-targets': 7.16.0_@babel+core@7.16.0 + '@babel/helper-compilation-targets': 7.16.3_@babel+core@7.16.0 '@babel/helper-module-imports': 7.16.0 '@babel/helper-plugin-utils': 7.14.5 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 debug: 4.3.2 lodash.debounce: 4.0.8 resolve: 1.20.0 @@ -1420,7 +1433,7 @@ packages: '@babel/helper-split-export-declaration': 7.16.0 '@babel/helper-validator-identifier': 7.15.7 '@babel/template': 7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 transitivePeerDependencies: - supports-color @@ -1455,7 +1468,7 @@ packages: dependencies: '@babel/helper-member-expression-to-functions': 7.16.0 '@babel/helper-optimise-call-expression': 7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 transitivePeerDependencies: - supports-color @@ -1492,7 +1505,7 @@ packages: dependencies: '@babel/helper-function-name': 7.16.0 '@babel/template': 7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 transitivePeerDependencies: - supports-color @@ -1507,6 +1520,16 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helpers/7.16.3: + resolution: {integrity: sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.16.0 + '@babel/traverse': 7.16.3 + '@babel/types': 7.16.0 + transitivePeerDependencies: + - supports-color + /@babel/highlight/7.16.0: resolution: {integrity: sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==} engines: {node: '>=6.9.0'} @@ -1520,6 +1543,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + /@babel/parser/7.16.3: + resolution: {integrity: sha512-dcNwU1O4sx57ClvLBVFbEgx0UZWfd0JQX5X6fxFRCLHelFBGXFfSz6Y0FAq2PEwUqlqLkdVjVr4VASEOuUnLJw==} + engines: {node: '>=6.0.0'} + hasBin: true + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.16.2_@babel+core@7.16.0: resolution: {integrity: sha512-h37CvpLSf8gb2lIJ2CgC3t+EjFbi0t8qS7LCS1xcJIlEXE4czlofwaW7W1HA8zpgOCzI9C1nmoqNR1zWkk0pQg==} engines: {node: '>=6.9.0'} @@ -1682,10 +1710,10 @@ packages: dependencies: '@babel/compat-data': 7.16.0 '@babel/core': 7.16.0 - '@babel/helper-compilation-targets': 7.16.0_@babel+core@7.16.0 + '@babel/helper-compilation-targets': 7.16.3_@babel+core@7.16.0 '@babel/helper-plugin-utils': 7.14.5 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.16.0 - '@babel/plugin-transform-parameters': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-transform-parameters': 7.16.3_@babel+core@7.16.0 /@babel/plugin-proposal-optional-catch-binding/7.16.0_@babel+core@7.16.0: resolution: {integrity: sha512-kicDo0A/5J0nrsCPbn89mTG3Bm4XgYi0CZtvex9Oyw7gGZE3HXGD0zpQNH+mo+tEfbo8wbmMvJftOwpmPy7aVw==} @@ -2204,6 +2232,16 @@ packages: dependencies: '@babel/core': 7.16.0 '@babel/helper-plugin-utils': 7.14.5 + dev: true + + /@babel/plugin-transform-parameters/7.16.3_@babel+core@7.16.0: + resolution: {integrity: sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.16.0 + '@babel/helper-plugin-utils': 7.14.5 /@babel/plugin-transform-property-literals/7.16.0_@babel+core@7.16.0: resolution: {integrity: sha512-XLldD4V8+pOqX2hwfWhgwXzGdnDOThxaNTgqagOcpBgIxbUvpgU2FMvo5E1RyHbk756WYgdbS0T8y0Cj9FKkWQ==} @@ -2375,7 +2413,7 @@ packages: dependencies: '@babel/compat-data': 7.16.0 '@babel/core': 7.16.0 - '@babel/helper-compilation-targets': 7.16.0_@babel+core@7.16.0 + '@babel/helper-compilation-targets': 7.16.3_@babel+core@7.16.0 '@babel/helper-plugin-utils': 7.14.5 '@babel/helper-validator-option': 7.14.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.16.2_@babel+core@7.16.0 @@ -2430,7 +2468,7 @@ packages: '@babel/plugin-transform-named-capturing-groups-regex': 7.16.0_@babel+core@7.16.0 '@babel/plugin-transform-new-target': 7.16.0_@babel+core@7.16.0 '@babel/plugin-transform-object-super': 7.16.0_@babel+core@7.16.0 - '@babel/plugin-transform-parameters': 7.16.0_@babel+core@7.16.0 + '@babel/plugin-transform-parameters': 7.16.3_@babel+core@7.16.0 '@babel/plugin-transform-property-literals': 7.16.0_@babel+core@7.16.0 '@babel/plugin-transform-regenerator': 7.16.0_@babel+core@7.16.0 '@babel/plugin-transform-reserved-words': 7.16.0_@babel+core@7.16.0 @@ -2523,12 +2561,13 @@ packages: regenerator-runtime: 0.13.9 dev: true - /@babel/runtime/7.15.3: - resolution: {integrity: sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==} + /@babel/runtime-corejs3/7.16.3: + resolution: {integrity: sha512-IAdDC7T0+wEB4y2gbIL0uOXEYpiZEeuFUTVbdGq+UwCcF35T/tS8KrmMomEwEc5wBbyfH3PJVpTSUqrhPDXFcQ==} engines: {node: '>=6.9.0'} dependencies: + core-js-pure: 3.19.1 regenerator-runtime: 0.13.9 - dev: false + dev: true /@babel/runtime/7.16.0: resolution: {integrity: sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw==} @@ -2536,12 +2575,18 @@ packages: dependencies: regenerator-runtime: 0.13.9 + /@babel/runtime/7.16.3: + resolution: {integrity: sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.13.9 + /@babel/template/7.16.0: resolution: {integrity: sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.16.0 - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.3 '@babel/types': 7.16.0 /@babel/traverse/7.16.0: @@ -2560,6 +2605,22 @@ packages: transitivePeerDependencies: - supports-color + /@babel/traverse/7.16.3: + resolution: {integrity: sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.16.0 + '@babel/generator': 7.16.0 + '@babel/helper-function-name': 7.16.0 + '@babel/helper-hoist-variables': 7.16.0 + '@babel/helper-split-export-declaration': 7.16.0 + '@babel/parser': 7.16.3 + '@babel/types': 7.16.0 + debug: 4.3.2 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + /@babel/types/7.16.0: resolution: {integrity: sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==} engines: {node: '>=6.9.0'} @@ -2601,7 +2662,7 @@ packages: dependencies: '@babel/helper-module-imports': 7.16.0 '@babel/plugin-syntax-jsx': 7.16.0 - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/hash': 0.8.0 '@emotion/memoize': 0.7.5 '@emotion/serialize': 1.0.2 @@ -2621,7 +2682,7 @@ packages: '@babel/core': 7.16.0 '@babel/helper-module-imports': 7.16.0 '@babel/plugin-syntax-jsx': 7.16.0_@babel+core@7.16.0 - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/hash': 0.8.0 '@emotion/memoize': 0.7.5 '@emotion/serialize': 1.0.2 @@ -2854,7 +2915,7 @@ packages: optional: true dependencies: '@babel/core': 7.16.0 - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/serialize': 1.0.2 '@emotion/sheet': 1.0.3 @@ -2876,7 +2937,7 @@ packages: optional: true dependencies: '@babel/core': 7.16.0 - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/serialize': 1.0.2 '@emotion/sheet': 1.0.3 @@ -2897,7 +2958,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/serialize': 1.0.2 '@emotion/sheet': 1.0.3 @@ -3073,7 +3134,7 @@ packages: engines: {node: ^10.12.0 || >=12.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.2 + debug: 4.3.1 espree: 7.3.1 globals: 13.12.0 ignore: 4.0.6 @@ -3111,7 +3172,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.2 + debug: 4.3.1 minimatch: 3.0.4 transitivePeerDependencies: - supports-color @@ -3144,8 +3205,8 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.2.5 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 jest-message-util: 27.3.1 jest-util: 27.3.1 slash: 3.0.0 @@ -3164,9 +3225,9 @@ packages: '@jest/test-result': 27.3.1 '@jest/transform': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 ansi-escapes: 4.3.2 - chalk: 4.1.2 + chalk: 4.1.1 emittery: 0.8.1 exit: 0.1.2 graceful-fs: 4.2.8 @@ -3201,7 +3262,7 @@ packages: dependencies: '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-mock: 26.6.2 /@jest/environment/27.3.1: @@ -3210,7 +3271,7 @@ packages: dependencies: '@jest/fake-timers': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-mock: 27.3.0 /@jest/fake-timers/26.6.2: @@ -3219,7 +3280,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@sinonjs/fake-timers': 6.0.1 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-message-util: 26.6.2 jest-mock: 26.6.2 jest-util: 26.6.2 @@ -3230,7 +3291,7 @@ packages: dependencies: '@jest/types': 27.2.5 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-message-util: 27.3.1 jest-mock: 27.3.0 jest-util: 27.3.1 @@ -3257,11 +3318,11 @@ packages: '@jest/test-result': 27.3.1 '@jest/transform': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 collect-v8-coverage: 1.0.1 exit: 0.1.2 - glob: 7.2.0 + glob: 7.1.6 graceful-fs: 4.2.8 istanbul-lib-coverage: 3.2.0 istanbul-lib-instrument: 4.0.3 @@ -3339,7 +3400,7 @@ packages: '@babel/core': 7.16.0 '@jest/types': 27.2.5 babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 + chalk: 4.1.1 convert-source-map: 1.8.0 fast-json-stable-stringify: 2.1.0 graceful-fs: 4.2.8 @@ -3360,9 +3421,9 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.11.6 + '@types/node': 16.11.7 '@types/yargs': 15.0.14 - chalk: 4.1.2 + chalk: 4.1.1 /@jest/types/27.2.5: resolution: {integrity: sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ==} @@ -3370,7 +3431,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.11.6 + '@types/node': 16.11.7 '@types/yargs': 16.0.4 chalk: 4.1.1 @@ -5110,7 +5171,7 @@ packages: /@types/babel__core/7.1.16: resolution: {integrity: sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==} dependencies: - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.3 '@babel/types': 7.16.0 '@types/babel__generator': 7.6.3 '@types/babel__template': 7.4.1 @@ -5124,7 +5185,7 @@ packages: /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.3 '@babel/types': 7.16.0 /@types/babel__traverse/7.14.2: @@ -5139,7 +5200,7 @@ packages: /@types/cheerio/0.22.30: resolution: {integrity: sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 /@types/color-convert/2.0.0: resolution: {integrity: sha512-m7GG7IKKGuJUXvkZ1qqG3ChccdIM/qBBo913z+Xft0nKCX4hAU/IxKwZBU4cpRZ7GS5kV4vOblUkILtSShCPXQ==} @@ -5173,7 +5234,7 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 dev: true /@types/glob-base/0.3.0: @@ -5184,13 +5245,13 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 /@types/hast/2.3.4: resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} @@ -5226,7 +5287,7 @@ packages: /@types/jest/27.0.2: resolution: {integrity: sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA==} dependencies: - jest-diff: 27.2.0 + jest-diff: 27.3.1 pretty-format: 27.3.1 dev: true @@ -5278,6 +5339,10 @@ packages: /@types/node/16.11.6: resolution: {integrity: sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==} + dev: true + + /@types/node/16.11.7: + resolution: {integrity: sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -5361,13 +5426,13 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 dev: true /@types/sass/1.43.0: resolution: {integrity: sha512-DPSXNJ1rYLo88GyF9tuB4bsYGfpKI1a4+wOQmc+LI1SUoocm9QLRSpz0GxxuyjmJsYFIQo/dDlRSSpIXngff+w==} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 dev: true /@types/scheduler/0.16.2: @@ -5439,7 +5504,7 @@ packages: resolution: {integrity: sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==} requiresBuild: true dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 dev: true optional: true @@ -5814,7 +5879,7 @@ packages: resolution: {integrity: sha512-s6ghUetvxRPDyC3fohaXtOeoTQeA1JPYPNSic616LWLWvx/bOCY4RibfwxS7p7prY1+0Px2VhxsPIM2kZuR/wA==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/dom-ready': 3.2.2 '@wordpress/i18n': 4.2.3 @@ -5848,7 +5913,7 @@ packages: resolution: {integrity: sha512-AAwqdN76qsJkgAERCfNWftZxOnmvjRg+OSDXQrQG4A/0RdztWFW4uQS79RinW8nL0h3g6Nm5P4Kt5iitT/tHeQ==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/i18n': 4.2.3 '@wordpress/url': 3.3.0 @@ -6006,20 +6071,20 @@ packages: - redux dev: true - /@wordpress/block-editor/8.0.0_595f56c80e7e5fab2a648c0f724c83ea: + /@wordpress/block-editor/8.0.0_@babel+core@7.16.0+react@17.0.2: resolution: {integrity: sha512-POzr9e5QXEzBUMMMAqjDYrt+cITG1nRXjsOkh+f7RhEDex8ymiG8bE31WLlnlwQvbB0jFKO4H706TTUzCZ6AmA==} engines: {node: '>=12'} dependencies: '@babel/runtime': 7.16.0 - '@react-spring/web': 9.3.0_react-dom@17.0.2+react@17.0.2 + '@react-spring/web': 9.3.0_react@17.0.2 '@wordpress/a11y': 3.2.3 '@wordpress/api-fetch': 5.2.5 '@wordpress/blob': 3.2.1 '@wordpress/block-serialization-default-parser': 4.2.2 - '@wordpress/blocks': 11.1.3_react@17.0.2+redux@4.0.5 - '@wordpress/components': 19.0.1_595f56c80e7e5fab2a648c0f724c83ea + '@wordpress/blocks': 11.1.3_react@17.0.2 + '@wordpress/components': 19.0.1_@babel+core@7.16.0+react@17.0.2 '@wordpress/compose': 5.0.5_react@17.0.2 - '@wordpress/data': 6.1.3_react@17.0.2+redux@4.0.5 + '@wordpress/data': 6.1.3_react@17.0.2 '@wordpress/deprecated': 3.2.2 '@wordpress/dom': 3.2.6 '@wordpress/element': 4.0.3 @@ -6028,10 +6093,10 @@ packages: '@wordpress/i18n': 4.2.3 '@wordpress/icons': 6.1.0 '@wordpress/is-shallow-equal': 4.2.0 - '@wordpress/keyboard-shortcuts': 3.0.5_react@17.0.2+redux@4.0.5 + '@wordpress/keyboard-shortcuts': 3.0.5_react@17.0.2 '@wordpress/keycodes': 3.2.3 - '@wordpress/notices': 3.2.6_react@17.0.2+redux@4.0.5 - '@wordpress/rich-text': 5.0.5_react@17.0.2+redux@4.0.5 + '@wordpress/notices': 3.2.6_react@17.0.2 + '@wordpress/rich-text': 5.0.5_react@17.0.2 '@wordpress/shortcode': 3.2.2 '@wordpress/token-list': 2.2.1 '@wordpress/url': 3.3.0 @@ -6045,8 +6110,8 @@ packages: inherits: 2.0.4 lodash: 4.17.21 memize: 1.1.0 - react-autosize-textarea: 7.1.0_react-dom@17.0.2+react@17.0.2 - react-easy-crop: 3.5.3_react-dom@17.0.2+react@17.0.2 + react-autosize-textarea: 7.1.0_react@17.0.2 + react-easy-crop: 3.5.3_react@17.0.2 redux-multi: 0.1.12 rememo: 3.0.0 traverse: 0.6.6 @@ -6059,20 +6124,20 @@ packages: - redux dev: true - /@wordpress/block-editor/8.0.0_@babel+core@7.16.0+react@17.0.2: - resolution: {integrity: sha512-POzr9e5QXEzBUMMMAqjDYrt+cITG1nRXjsOkh+f7RhEDex8ymiG8bE31WLlnlwQvbB0jFKO4H706TTUzCZ6AmA==} + /@wordpress/block-editor/8.0.1_595f56c80e7e5fab2a648c0f724c83ea: + resolution: {integrity: sha512-U/NCgbNzpwNOHoQTfGTGHgjHY86a7VqHVlHBIKUrPbevwZg8dlEq5yrQeRskJ5TzHLk9UWUkyLoStdVnb1SUQg==} engines: {node: '>=12'} dependencies: '@babel/runtime': 7.16.0 - '@react-spring/web': 9.3.0_react@17.0.2 + '@react-spring/web': 9.3.0_react-dom@17.0.2+react@17.0.2 '@wordpress/a11y': 3.2.3 '@wordpress/api-fetch': 5.2.5 '@wordpress/blob': 3.2.1 '@wordpress/block-serialization-default-parser': 4.2.2 - '@wordpress/blocks': 11.1.3_react@17.0.2 - '@wordpress/components': 19.0.1_@babel+core@7.16.0+react@17.0.2 + '@wordpress/blocks': 11.1.3_react@17.0.2+redux@4.0.5 + '@wordpress/components': 19.0.1_595f56c80e7e5fab2a648c0f724c83ea '@wordpress/compose': 5.0.5_react@17.0.2 - '@wordpress/data': 6.1.3_react@17.0.2 + '@wordpress/data': 6.1.3_react@17.0.2+redux@4.0.5 '@wordpress/deprecated': 3.2.2 '@wordpress/dom': 3.2.6 '@wordpress/element': 4.0.3 @@ -6081,10 +6146,10 @@ packages: '@wordpress/i18n': 4.2.3 '@wordpress/icons': 6.1.0 '@wordpress/is-shallow-equal': 4.2.0 - '@wordpress/keyboard-shortcuts': 3.0.5_react@17.0.2 + '@wordpress/keyboard-shortcuts': 3.0.5_react@17.0.2+redux@4.0.5 '@wordpress/keycodes': 3.2.3 - '@wordpress/notices': 3.2.6_react@17.0.2 - '@wordpress/rich-text': 5.0.5_react@17.0.2 + '@wordpress/notices': 3.2.6_react@17.0.2+redux@4.0.5 + '@wordpress/rich-text': 5.0.5_react@17.0.2+redux@4.0.5 '@wordpress/shortcode': 3.2.2 '@wordpress/token-list': 2.2.1 '@wordpress/url': 3.3.0 @@ -6098,8 +6163,8 @@ packages: inherits: 2.0.4 lodash: 4.17.21 memize: 1.1.0 - react-autosize-textarea: 7.1.0_react@17.0.2 - react-easy-crop: 3.5.3_react@17.0.2 + react-autosize-textarea: 7.1.0_react-dom@17.0.2+react@17.0.2 + react-easy-crop: 3.5.3_react-dom@17.0.2+react@17.0.2 redux-multi: 0.1.12 rememo: 3.0.0 traverse: 0.6.6 @@ -6322,7 +6387,7 @@ packages: peerDependencies: reakit-utils: ^0.15.1 dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/css': 11.5.0_@babel+core@7.16.0 '@emotion/react': 11.5.0_@babel+core@7.16.0+react@17.0.2 @@ -6373,7 +6438,7 @@ packages: peerDependencies: reakit-utils: ^0.15.1 dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/css': 11.5.0_@babel+core@7.16.0 '@emotion/react': 11.5.0_@babel+core@7.16.0 @@ -6425,7 +6490,7 @@ packages: peerDependencies: reakit-utils: ^0.15.1 dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/css': 11.5.0_@babel+core@7.16.0 '@emotion/react': 11.5.0_@babel+core@7.16.0+react@17.0.2 @@ -6477,7 +6542,7 @@ packages: peerDependencies: reakit-utils: ^0.15.1 dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@emotion/cache': 11.5.0 '@emotion/css': 11.5.0 '@emotion/react': 11.5.0_react@17.0.2 @@ -6530,10 +6595,10 @@ packages: reakit-utils: ^0.15.1 dependencies: '@babel/runtime': 7.16.0 - '@emotion/cache': 11.4.0 - '@emotion/css': 11.1.3_@babel+core@7.16.0 - '@emotion/react': 11.4.1_@babel+core@7.16.0+react@17.0.2 - '@emotion/styled': 11.3.0_91407f9eb4eb8e1117ab61d4d046dc59 + '@emotion/cache': 11.5.0 + '@emotion/css': 11.5.0_@babel+core@7.16.0 + '@emotion/react': 11.5.0_@babel+core@7.16.0+react@17.0.2 + '@emotion/styled': 11.3.0_a3ce58c1335df7ae302d472d57f59cc5 '@emotion/utils': 1.0.0 '@wordpress/a11y': 3.2.3 '@wordpress/compose': 5.0.5_react@17.0.2 @@ -6582,10 +6647,10 @@ packages: reakit-utils: ^0.15.1 dependencies: '@babel/runtime': 7.16.0 - '@emotion/cache': 11.4.0 - '@emotion/css': 11.1.3_@babel+core@7.16.0 - '@emotion/react': 11.4.1_@babel+core@7.16.0+react@17.0.2 - '@emotion/styled': 11.3.0_91407f9eb4eb8e1117ab61d4d046dc59 + '@emotion/cache': 11.5.0 + '@emotion/css': 11.5.0_@babel+core@7.16.0 + '@emotion/react': 11.5.0_@babel+core@7.16.0+react@17.0.2 + '@emotion/styled': 11.3.0_a3ce58c1335df7ae302d472d57f59cc5 '@emotion/utils': 1.0.0 '@wordpress/a11y': 3.2.3 '@wordpress/compose': 5.0.5_react@17.0.2 @@ -6692,7 +6757,7 @@ packages: resolution: {integrity: sha512-sxwbkLqX9RKzFao4Oo17Kpntnn4kJjAdmULazp608SDtmQ3hv+rdKZb+UjrLCx8rNZgzjXkbM25ewL63o1SUrA==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@types/lodash': 4.14.176 '@types/mousetrap': 1.6.8 '@wordpress/deprecated': 3.2.2 @@ -6714,7 +6779,7 @@ packages: resolution: {integrity: sha512-sxwbkLqX9RKzFao4Oo17Kpntnn4kJjAdmULazp608SDtmQ3hv+rdKZb+UjrLCx8rNZgzjXkbM25ewL63o1SUrA==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@types/lodash': 4.14.176 '@types/mousetrap': 1.6.8 '@wordpress/deprecated': 3.2.2 @@ -6839,7 +6904,7 @@ packages: is-promise: 4.0.0 lodash: 4.17.21 memize: 1.1.0 - redux: 4.0.5 + redux: 4.1.2 turbo-combine-reducers: 1.0.2 use-memo-one: 1.1.2_react@17.0.2 transitivePeerDependencies: @@ -6988,16 +7053,16 @@ packages: dependencies: '@babel/runtime': 7.16.0 moment: 2.29.1 - moment-timezone: 0.5.33 + moment-timezone: 0.5.34 dev: false /@wordpress/date/4.2.2: resolution: {integrity: sha512-sYcMvFwrVoYv5lL9NsYLVd29hfuqgf1L1WsIjDV8hMna1eqr9f8xCrZSLgBKkDBmVWiIcleYGP5uDdrKpu6EiA==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 moment: 2.29.1 - moment-timezone: 0.5.33 + moment-timezone: 0.5.34 /@wordpress/dependency-extraction-webpack-plugin/3.2.1_webpack@5.51.1: resolution: {integrity: sha512-Ltd+1CJb7PMh6iN2Mse+3yN/oMORug5qXSj/3xmuZERzZO2SO6xNEJGml8yK9ev747cbHktEpitK4H+8VO3Ekg==} @@ -7012,7 +7077,7 @@ packages: /@wordpress/deprecated/2.12.3: resolution: {integrity: sha512-qr+yDfTQfI3M4h6oY6IeHWwoHr4jxbILjSlV+Ht6Jjto9Owap6OuzSqR13Ev4xqIoG4C7b5B3gZXVfwVDae1zg==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 '@wordpress/hooks': 2.12.3 dev: false @@ -7020,7 +7085,7 @@ packages: resolution: {integrity: sha512-htsu2zJUuGYG1+jejAi0r25bQQOT3bB0MGjoSixqZ0sRkFMRIdjmMLrSbpGrl0s5IRK2/w/slsStPFmm3reJtA==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/hooks': 3.2.1 /@wordpress/dom-ready/2.13.2: @@ -7033,12 +7098,12 @@ packages: resolution: {integrity: sha512-yCpm/vG3GanhhACnpbc7GZ2sv6oSHIkTxNPgejA5Z8cr0mEc6irsWDzhEHKcP3OhSina++IZ9ZidO7JH7eE2Xg==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /@wordpress/dom/2.18.0: resolution: {integrity: sha512-tM2WeQuSObl3nzWjUTF0/dyLnA7sdl/MXaSe32D64OF89bjSyJvjUipI7gjKzI3kJ7ddGhwcTggGvSB06MOoCQ==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 lodash: 4.17.21 dev: false @@ -7046,7 +7111,7 @@ packages: resolution: {integrity: sha512-Iy3eYn6wcQFDBsQJmm4NGUA4HswX4YG5TY9T+C1VwCLepgR1yOUFdNmRojiKXMbO4pv2swoStrhh75IBNWPyFg==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 lodash: 4.17.21 /@wordpress/e2e-test-utils/5.4.5: @@ -7056,7 +7121,7 @@ packages: jest: '>=26' puppeteer: '>=1.19.0' dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/api-fetch': 5.2.5 '@wordpress/keycodes': 3.2.3 '@wordpress/url': 3.3.0 @@ -7093,7 +7158,7 @@ packages: '@wordpress/keycodes': 3.2.3 '@wordpress/media-utils': 3.0.4 '@wordpress/notices': 3.2.6_react@17.0.2+redux@4.0.5 - '@wordpress/reusable-blocks': 3.0.5_595f56c80e7e5fab2a648c0f724c83ea + '@wordpress/reusable-blocks': 3.0.6_595f56c80e7e5fab2a648c0f724c83ea '@wordpress/rich-text': 5.0.5_react@17.0.2+redux@4.0.5 '@wordpress/server-side-render': 3.0.4_595f56c80e7e5fab2a648c0f724c83ea '@wordpress/url': 3.2.3 @@ -7115,7 +7180,7 @@ packages: /@wordpress/element/2.20.3: resolution: {integrity: sha512-f4ZPTDf9CxiiOXiMxc4v1K7jcBMT4dsiehVOpkKzCDKboNXp4qVf8oe5PE23VGZNEjcOj5Mkg9hB57R0nqvMTw==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 '@types/react': 16.14.20 '@types/react-dom': 16.9.14 '@wordpress/escape-html': 1.12.2 @@ -7128,7 +7193,7 @@ packages: resolution: {integrity: sha512-uFL8Xx0Uq/C+nCL5aM4Fb6YVub//1wuHyQK9VDtKwYg9UBELrexSCHo1XaesYRiGUqVW0o837qC7RCP2NLUBJw==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@types/react': 16.14.20 '@types/react-dom': 16.9.14 '@wordpress/escape-html': 2.2.2 @@ -7139,14 +7204,14 @@ packages: /@wordpress/escape-html/1.12.2: resolution: {integrity: sha512-FabgSwznhdaUwe6hr1CsGpgxQbzqEoGevv73WIL1B9GvlZ6csRWodgHfWh4P6fYqpzxFL4WYB8wPJ1PdO32XFA==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 dev: false /@wordpress/escape-html/2.2.2: resolution: {integrity: sha512-NuPury2dyaqF7zpDaUOKaoM0FrEuqaDE1c3j7rM6kceJ4ZFDHnCLf5NivwchOLo7Xs0oVtqBdDza/dcSQaLFGg==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /@wordpress/eslint-plugin/9.2.0_eslint@7.32.0: resolution: {integrity: sha512-x0vI4EWeG20TyewXdiyUhGSJRqXR8vw47WZjzdmL8iuitDCoyWkKe73wtEs/mWLDrSNms8S0bTnp0dK6UAMXJw==} @@ -7168,10 +7233,10 @@ packages: eslint-plugin-import: 2.25.2_eslint@7.32.0 eslint-plugin-jest: 24.7.0_d3b4c2d4ac51f4275548d5d796aee5d5 eslint-plugin-jsdoc: 36.1.1_eslint@7.32.0 - eslint-plugin-jsx-a11y: 6.4.1_eslint@7.32.0 + eslint-plugin-jsx-a11y: 6.5.1_eslint@7.32.0 eslint-plugin-prettier: 3.4.1_34b707f3a53b0942f3919c1ff656ce36 - eslint-plugin-react: 7.26.1_eslint@7.32.0 - eslint-plugin-react-hooks: 4.2.0_eslint@7.32.0 + eslint-plugin-react: 7.27.0_eslint@7.32.0 + eslint-plugin-react-hooks: 4.3.0_eslint@7.32.0 globals: 12.4.0 prettier: /wp-prettier/2.2.1-beta-1 requireindex: 1.2.0 @@ -7198,10 +7263,10 @@ packages: eslint-plugin-import: 2.25.2 eslint-plugin-jest: 24.7.0_efe5affc8557e7e9fa1c0569af222dcc eslint-plugin-jsdoc: 36.1.1 - eslint-plugin-jsx-a11y: 6.4.1 + eslint-plugin-jsx-a11y: 6.5.1 eslint-plugin-prettier: 3.4.1_4d43abc6352a457c49b6b94ed6df87af - eslint-plugin-react: 7.26.1 - eslint-plugin-react-hooks: 4.2.0 + eslint-plugin-react: 7.27.0 + eslint-plugin-react-hooks: 4.3.0 globals: 12.4.0 prettier: /wp-prettier/2.2.1-beta-1 requireindex: 1.2.0 @@ -7248,7 +7313,7 @@ packages: resolution: {integrity: sha512-yI8MHs6UsvgJdDsOnXGkY7/7hrOCEv/M7vwdEVA5r6nGzgJaJxf8pjBqzRkCq3nVaWqxoNZgCMHJSul6Q8RR2g==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /@wordpress/html-entities/3.2.2: resolution: {integrity: sha512-MsmB1wtDMFfvNQiKMVMW+1ie2P3+tBZiHESkDPnXw34Dt4Tk0+QY7eYCR9krNcjJImWYJcxL+4n4M1OF9oQv0Q==} @@ -7274,7 +7339,7 @@ packages: engines: {node: '>=12'} hasBin: true dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/hooks': 3.2.1 gettext-parser: 1.4.0 lodash: 4.17.21 @@ -7302,21 +7367,21 @@ packages: resolution: {integrity: sha512-XzPtisDJlAbh8uZIzNafCVf76KkitllJPrGLPPPTJjFFNgga+qGisCIuybKB79LrenPVEIvyBhZ388hrR5rmVw==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/element': 4.0.3 '@wordpress/primitives': 3.0.3 /@wordpress/is-shallow-equal/3.1.3: resolution: {integrity: sha512-eDLhfC4aaSgklzqwc6F/F4zmJVpTVTAvhqX+q0SP/8LPcP2HuKErPHVrEc75PMWqIutja2wJg98YSNPdewrj1w==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 dev: false /@wordpress/is-shallow-equal/4.2.0: resolution: {integrity: sha512-9Oy7f3HFLMNfry4LLwYmfx4tROmusPAOfanv9F/MgzSBfMH7eyxU2JZd4KrP7IbPb59UfoUa8GhaLsnqKm66og==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /@wordpress/keyboard-shortcuts/3.0.5_react@17.0.2: resolution: {integrity: sha512-21pdiMMFeU5ZGVMmoIWfRQsCN21enIMxMudfZDhZQlXbQvqNmmeq2hZojWah8iAHqxQUXUOTiHFH7NK3k3AKkw==} @@ -7352,7 +7417,7 @@ packages: /@wordpress/keycodes/2.19.3: resolution: {integrity: sha512-8rNdmP5M1ifTgLIL0dt/N1uTGsq/Rx1ydCXy+gg24WdxBRhyu5sudNVCtascVXo26aIfOH9OJRdqRZZTEORhog==} dependencies: - '@babel/runtime': 7.15.3 + '@babel/runtime': 7.16.0 '@wordpress/i18n': 3.20.0 lodash: 4.17.21 dev: false @@ -7361,7 +7426,7 @@ packages: resolution: {integrity: sha512-1ClhtTbOSijLsyubbTlg1Df++W4CmjjRj88L7rzGX63iEHfBX6SSvui2pWVlQigDNdLNoaYGOaWm5eqDnvxkeQ==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/i18n': 4.2.3 lodash: 4.17.21 @@ -7429,7 +7494,7 @@ packages: resolution: {integrity: sha512-eG1UE5d9xnML7PCr1DpP1PEliwLM4KIuEFieHVpW1HkiybyENeTl33HdqXalOSuNAdYrnYa4KifThbjcTdzP2Q==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 '@wordpress/element': 4.0.3 classnames: 2.3.1 @@ -7443,7 +7508,7 @@ packages: resolution: {integrity: sha512-28zPQ1jIhM+9w0xfLzL8xoHIEyG0ORjIi4A8j3aWBYXHYH9f/7oVAtJRXgVTJ9iJFyiUTL8sDiaZQ6aTFV78Tg==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /@wordpress/redux-routine/3.14.2: resolution: {integrity: sha512-aqi4UtvMP/+NhULxyCR8ktG0v4BJVTRcMpByAqDg7Oabq2sz2LPuShxd5UY8vxQYQY9t1uUJbslhom4ytcohWg==} @@ -7458,26 +7523,26 @@ packages: resolution: {integrity: sha512-u//4vdeKzYvu4YBRmSUsIbnUazai+PybEnquLPqxQdaF4JqVN1D5OPWHSeFtmaXR1c78I+lUf40Q7dnmA2waXw==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 is-promise: 4.0.0 lodash: 4.17.21 redux: 4.1.2 rungen: 0.3.2 - /@wordpress/reusable-blocks/3.0.5_595f56c80e7e5fab2a648c0f724c83ea: + /@wordpress/reusable-blocks/3.0.5_@babel+core@7.16.0+react@17.0.2: resolution: {integrity: sha512-VRNMdwKBHU4NO7A23UW7GG2DavPymeHq2ixN3okViXOTvyg5nIY7bayDf/D5pH1SbGxSRXP/1Xl1kT9BtJ59VQ==} engines: {node: '>=12'} dependencies: - '@wordpress/block-editor': 8.0.0_595f56c80e7e5fab2a648c0f724c83ea - '@wordpress/blocks': 11.1.3_react@17.0.2+redux@4.0.5 - '@wordpress/components': 19.0.1_595f56c80e7e5fab2a648c0f724c83ea + '@wordpress/block-editor': 8.0.0_@babel+core@7.16.0+react@17.0.2 + '@wordpress/blocks': 11.1.3_react@17.0.2 + '@wordpress/components': 19.0.1_@babel+core@7.16.0+react@17.0.2 '@wordpress/compose': 5.0.5_react@17.0.2 - '@wordpress/core-data': 4.0.5_react@17.0.2+redux@4.0.5 - '@wordpress/data': 6.1.3_react@17.0.2+redux@4.0.5 + '@wordpress/core-data': 4.0.5_react@17.0.2 + '@wordpress/data': 6.1.3_react@17.0.2 '@wordpress/element': 4.0.3 '@wordpress/i18n': 4.2.3 '@wordpress/icons': 6.1.0 - '@wordpress/notices': 3.2.6_react@17.0.2+redux@4.0.5 + '@wordpress/notices': 3.2.6_react@17.0.2 '@wordpress/url': 3.3.0 lodash: 4.17.21 transitivePeerDependencies: @@ -7489,20 +7554,20 @@ packages: - redux dev: true - /@wordpress/reusable-blocks/3.0.5_@babel+core@7.16.0+react@17.0.2: - resolution: {integrity: sha512-VRNMdwKBHU4NO7A23UW7GG2DavPymeHq2ixN3okViXOTvyg5nIY7bayDf/D5pH1SbGxSRXP/1Xl1kT9BtJ59VQ==} + /@wordpress/reusable-blocks/3.0.6_595f56c80e7e5fab2a648c0f724c83ea: + resolution: {integrity: sha512-qKkRU89+NPvri1Hl7Z2r2YdHnafw4aiR59a/6soElypPANuZuR1LKhvBL5fwHIXX1Pxq/cBk4ptY5KIG+WxpHA==} engines: {node: '>=12'} dependencies: - '@wordpress/block-editor': 8.0.0_@babel+core@7.16.0+react@17.0.2 - '@wordpress/blocks': 11.1.3_react@17.0.2 - '@wordpress/components': 19.0.1_@babel+core@7.16.0+react@17.0.2 + '@wordpress/block-editor': 8.0.1_595f56c80e7e5fab2a648c0f724c83ea + '@wordpress/blocks': 11.1.3_react@17.0.2+redux@4.0.5 + '@wordpress/components': 19.0.1_595f56c80e7e5fab2a648c0f724c83ea '@wordpress/compose': 5.0.5_react@17.0.2 - '@wordpress/core-data': 4.0.5_react@17.0.2 - '@wordpress/data': 6.1.3_react@17.0.2 + '@wordpress/core-data': 4.0.5_react@17.0.2+redux@4.0.5 + '@wordpress/data': 6.1.3_react@17.0.2+redux@4.0.5 '@wordpress/element': 4.0.3 '@wordpress/i18n': 4.2.3 '@wordpress/icons': 6.1.0 - '@wordpress/notices': 3.2.6_react@17.0.2 + '@wordpress/notices': 3.2.6_react@17.0.2+redux@4.0.5 '@wordpress/url': 3.3.0 lodash: 4.17.21 transitivePeerDependencies: @@ -7674,7 +7739,7 @@ packages: resolution: {integrity: sha512-DpbtjtN/p+CmAFMegI5z2dFSad3QQGDZxQmHephNa0KC0hE0rYvYEWwikRCHMI3l2tPGioYHQtiPxC8tszeSpw==} engines: {node: '>=12'} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 lodash: 4.17.21 /@wordpress/viewport/4.0.4_react@17.0.2+redux@4.0.5: @@ -7982,8 +8047,8 @@ packages: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - /ajv/8.6.3: - resolution: {integrity: sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==} + /ajv/8.7.1: + resolution: {integrity: sha512-gPpOObTO1QjbnN1sVMjJcp1TF9nggMfO4MBR5uQl6ZVTOaEPq5i4oq/6R9q2alMMPB3eg53wFv1RuJBLuxf3Hw==} dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 @@ -8164,8 +8229,8 @@ packages: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} engines: {node: '>=6.0'} dependencies: - '@babel/runtime': 7.16.0 - '@babel/runtime-corejs3': 7.16.0 + '@babel/runtime': 7.16.3 + '@babel/runtime-corejs3': 7.16.3 dev: true /arr-diff/1.1.0: @@ -8294,14 +8359,6 @@ packages: define-properties: 1.1.3 es-abstract: 1.19.1 - /array.prototype.flat/1.2.4: - resolution: {integrity: sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.3 - es-abstract: 1.19.1 - /array.prototype.flat/1.2.5: resolution: {integrity: sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==} engines: {node: '>= 0.4'} @@ -8446,7 +8503,7 @@ packages: hasBin: true dependencies: browserslist: 4.17.6 - caniuse-lite: 1.0.30001278 + caniuse-lite: 1.0.30001279 normalize-range: 0.1.2 num2fraction: 1.2.2 picocolors: 0.2.1 @@ -8486,8 +8543,8 @@ packages: eslint: '>= 4.12.1' dependencies: '@babel/code-frame': 7.16.0 - '@babel/parser': 7.16.2 - '@babel/traverse': 7.16.0 + '@babel/parser': 7.16.3 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 eslint-visitor-keys: 1.3.0 resolve: 1.20.0 @@ -8503,8 +8560,8 @@ packages: eslint: '>= 4.12.1' dependencies: '@babel/code-frame': 7.16.0 - '@babel/parser': 7.16.2 - '@babel/traverse': 7.16.0 + '@babel/parser': 7.16.3 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 eslint: 7.32.0 eslint-visitor-keys: 1.3.0 @@ -8525,7 +8582,7 @@ packages: '@types/babel__core': 7.1.16 babel-plugin-istanbul: 6.1.1 babel-preset-jest: 27.2.0_@babel+core@7.16.0 - chalk: 4.1.2 + chalk: 4.1.1 graceful-fs: 4.2.8 slash: 3.0.0 transitivePeerDependencies: @@ -8614,7 +8671,7 @@ packages: /babel-plugin-macros/2.8.0: resolution: {integrity: sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 cosmiconfig: 6.0.0 resolve: 1.20.0 @@ -8974,14 +9031,15 @@ packages: escalade: 3.1.1 node-releases: 2.0.1 picocolors: 1.0.0 + dev: false /browserslist/4.17.6: resolution: {integrity: sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001278 - electron-to-chromium: 1.3.890 + caniuse-lite: 1.0.30001279 + electron-to-chromium: 1.3.894 escalade: 3.1.1 node-releases: 2.0.1 picocolors: 1.0.0 @@ -9206,6 +9264,9 @@ packages: /caniuse-lite/1.0.30001278: resolution: {integrity: sha512-mpF9KeH8u5cMoEmIic/cr7PNS+F5LWBk0t2ekGT60lFf0Wq+n9LspAj0g3P+o7DQhD3sUdlMln4YFAWhFYn9jg==} + /caniuse-lite/1.0.30001279: + resolution: {integrity: sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ==} + /capture-exit/2.0.0: resolution: {integrity: sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==} engines: {node: 6.* || 8.* || >= 10.*} @@ -9287,6 +9348,7 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + dev: true /char-regex/1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} @@ -9777,7 +9839,7 @@ packages: engines: {node: '>=10.0.0'} hasBin: true dependencies: - chalk: 4.1.2 + chalk: 4.1.1 date-fns: 2.25.0 lodash: 4.17.21 read-pkg: 5.2.0 @@ -10800,7 +10862,7 @@ packages: peerDependencies: react: '>=16.12.0' dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 compute-scroll-into-view: 1.0.17 prop-types: 15.7.2 react-is: 17.0.2 @@ -10812,7 +10874,7 @@ packages: peerDependencies: react: '>=16.12.0' dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 compute-scroll-into-view: 1.0.17 prop-types: 15.7.2 react: 17.0.2 @@ -10872,6 +10934,10 @@ packages: /electron-to-chromium/1.3.890: resolution: {integrity: sha512-VWlVXSkv0cA/OOehrEyqjUTHwV8YXCPTfPvbtoeU2aHR21vI4Ejh5aC4AxUwOmbLbBgb6Gd3URZahoCxtBqCYQ==} + dev: false + + /electron-to-chromium/1.3.894: + resolution: {integrity: sha512-WY8pA4irAZ4cm/Pr7YFPtPLVqj3nU6d0SbfoHF6M7HZNONfPdAnYAarumqQ75go2LuN72uO9wGuCEqnfya/ytg==} /elegant-spinner/1.0.1: resolution: {integrity: sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=} @@ -11444,7 +11510,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y/6.4.1: + /eslint-plugin-jsx-a11y/6.4.1_eslint@7.32.0: resolution: {integrity: sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==} engines: {node: '>=4.0'} peerDependencies: @@ -11458,18 +11524,39 @@ packages: axobject-query: 2.2.0 damerau-levenshtein: 1.0.7 emoji-regex: 9.2.2 + eslint: 7.32.0 has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 dev: true - /eslint-plugin-jsx-a11y/6.4.1_eslint@7.32.0: - resolution: {integrity: sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==} + /eslint-plugin-jsx-a11y/6.5.1: + resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} engines: {node: '>=4.0'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 + aria-query: 4.2.2 + array-includes: 3.1.4 + ast-types-flow: 0.0.7 + axe-core: 4.3.5 + axobject-query: 2.2.0 + damerau-levenshtein: 1.0.7 + emoji-regex: 9.2.2 + has: 1.0.3 + jsx-ast-utils: 3.2.1 + language-tags: 1.0.5 + minimatch: 3.0.4 + dev: true + + /eslint-plugin-jsx-a11y/6.5.1_eslint@7.32.0: + resolution: {integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==} + engines: {node: '>=4.0'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + '@babel/runtime': 7.16.3 aria-query: 4.2.2 array-includes: 3.1.4 ast-types-flow: 0.0.7 @@ -11481,6 +11568,7 @@ packages: has: 1.0.3 jsx-ast-utils: 3.2.1 language-tags: 1.0.5 + minimatch: 3.0.4 dev: true /eslint-plugin-lodash/7.3.0_eslint@7.32.0: @@ -11543,23 +11631,32 @@ packages: prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-react-hooks/4.2.0: + /eslint-plugin-react-hooks/4.2.0_eslint@7.32.0: resolution: {integrity: sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + dependencies: + eslint: 7.32.0 dev: true - /eslint-plugin-react-hooks/4.2.0_eslint@7.32.0: - resolution: {integrity: sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==} + /eslint-plugin-react-hooks/4.3.0: + resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} engines: {node: '>=10'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dev: true + + /eslint-plugin-react-hooks/4.3.0_eslint@7.32.0: + resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: eslint: 7.32.0 dev: true - /eslint-plugin-react/7.26.1: + /eslint-plugin-react/7.26.1_eslint@7.32.0: resolution: {integrity: sha512-Lug0+NOFXeOE+ORZ5pbsh6mSKjBKXDXItUD2sQoT+5Yl0eoT82DqnXeTMfUare4QVCn9QwXbfzO/dBLjLXwVjQ==} engines: {node: '>=4'} peerDependencies: @@ -11568,6 +11665,7 @@ packages: array-includes: 3.1.4 array.prototype.flatmap: 1.2.5 doctrine: 2.1.0 + eslint: 7.32.0 estraverse: 5.3.0 jsx-ast-utils: 3.2.1 minimatch: 3.0.4 @@ -11581,11 +11679,33 @@ packages: string.prototype.matchall: 4.0.6 dev: true - /eslint-plugin-react/7.26.1_eslint@7.32.0: - resolution: {integrity: sha512-Lug0+NOFXeOE+ORZ5pbsh6mSKjBKXDXItUD2sQoT+5Yl0eoT82DqnXeTMfUare4QVCn9QwXbfzO/dBLjLXwVjQ==} + /eslint-plugin-react/7.27.0: + resolution: {integrity: sha512-0Ut+CkzpppgFtoIhdzi2LpdpxxBvgFf99eFqWxJnUrO7mMe0eOiNpou6rvNYeVVV6lWZvTah0BFne7k5xHjARg==} engines: {node: '>=4'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + dependencies: + array-includes: 3.1.4 + array.prototype.flatmap: 1.2.5 + doctrine: 2.1.0 + estraverse: 5.3.0 + jsx-ast-utils: 3.2.1 + minimatch: 3.0.4 + object.entries: 1.1.5 + object.fromentries: 2.0.5 + object.hasown: 1.1.0 + object.values: 1.1.5 + prop-types: 15.7.2 + resolve: 2.0.0-next.3 + semver: 6.3.0 + string.prototype.matchall: 4.0.6 + dev: true + + /eslint-plugin-react/7.27.0_eslint@7.32.0: + resolution: {integrity: sha512-0Ut+CkzpppgFtoIhdzi2LpdpxxBvgFf99eFqWxJnUrO7mMe0eOiNpou6rvNYeVVV6lWZvTah0BFne7k5xHjARg==} + engines: {node: '>=4'} + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: array-includes: 3.1.4 array.prototype.flatmap: 1.2.5 @@ -11675,9 +11795,9 @@ packages: '@eslint/eslintrc': 0.4.3 '@humanwhocodes/config-array': 0.5.0 ajv: 6.12.6 - chalk: 4.1.2 + chalk: 4.1.1 cross-spawn: 7.0.3 - debug: 4.3.2 + debug: 4.3.1 doctrine: 3.0.0 enquirer: 2.3.6 escape-string-regexp: 4.0.0 @@ -12328,7 +12448,7 @@ packages: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.2.2 + flatted: 3.2.4 rimraf: 3.0.2 dev: true @@ -12336,8 +12456,8 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - /flatted/3.2.2: - resolution: {integrity: sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==} + /flatted/3.2.4: + resolution: {integrity: sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==} dev: true /flush-write-stream/1.1.1: @@ -12431,7 +12551,7 @@ packages: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 - mime-types: 2.1.33 + mime-types: 2.1.34 dev: false /form-data/3.0.1: @@ -12440,7 +12560,7 @@ packages: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 - mime-types: 2.1.33 + mime-types: 2.1.34 /form-data/4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -12448,7 +12568,7 @@ packages: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 - mime-types: 2.1.33 + mime-types: 2.1.34 dev: true /format/0.2.2: @@ -12817,7 +12937,7 @@ packages: engines: {node: '>= 0.10'} dependencies: extend: 3.0.2 - glob: 7.2.0 + glob: 7.1.6 glob-parent: 3.1.0 is-negated-glob: 1.0.0 ordered-read-streams: 1.0.1 @@ -13194,7 +13314,7 @@ packages: resolution: {integrity: sha512-J0aH0/2N4+2szGCeut0ktGHK0Wg8L9uWivuigrl7xv+nhxozBQRAKLrhnDDaTa3FeUWYtgT8w4RlgdhRy5v16w==} engines: {node: '>=12'} dependencies: - chalk: 4.1.2 + chalk: 4.1.1 lodash: 4.17.21 plugin-error: 1.0.1 replace-ext: 2.0.0 @@ -13645,7 +13765,7 @@ packages: dependencies: '@tannin/sprintf': 1.2.0 '@wordpress/compose': 3.25.3_react@16.14.0 - debug: 4.3.2 + debug: 4.3.1 events: 3.3.0 hash.js: 1.1.7 interpolate-components: 1.1.1 @@ -14373,7 +14493,7 @@ packages: engines: {node: '>=8'} dependencies: '@babel/core': 7.16.0 - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.3 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.0 @@ -14448,8 +14568,8 @@ packages: '@jest/environment': 27.3.1 '@jest/test-result': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 co: 4.6.0 dedent: 0.7.0 expect: 27.3.1 @@ -14480,7 +14600,7 @@ packages: '@jest/core': 27.3.1 '@jest/test-result': 27.3.1 '@jest/types': 27.2.5 - chalk: 4.1.2 + chalk: 4.1.1 exit: 0.1.2 graceful-fs: 4.2.8 import-local: 3.0.3 @@ -14510,10 +14630,10 @@ packages: '@jest/test-sequencer': 27.3.1 '@jest/types': 27.2.5 babel-jest: 27.3.1_@babel+core@7.16.0 - chalk: 4.1.2 + chalk: 4.1.1 ci-info: 3.2.0 deepmerge: 4.2.2 - glob: 7.2.0 + glob: 7.1.6 graceful-fs: 4.2.8 jest-circus: 27.3.1 jest-environment-jsdom: 27.3.1 @@ -14533,21 +14653,11 @@ packages: - supports-color - utf-8-validate - /jest-diff/27.2.0: - resolution: {integrity: sha512-QSO9WC6btFYWtRJ3Hac0sRrkspf7B01mGrrQEiCW6TobtViJ9RWL0EmOs/WnBsZDsI/Y2IoSHZA2x6offu0sYw==} - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 27.0.6 - jest-get-type: 27.3.1 - pretty-format: 27.3.1 - dev: true - /jest-diff/27.3.1: resolution: {integrity: sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - chalk: 4.1.2 + chalk: 4.1.1 diff-sequences: 27.0.6 jest-get-type: 27.3.1 pretty-format: 27.3.1 @@ -14563,7 +14673,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.2.5 - chalk: 4.1.2 + chalk: 4.1.1 jest-get-type: 27.3.1 jest-util: 27.3.1 pretty-format: 27.3.1 @@ -14617,7 +14727,7 @@ packages: '@jest/environment': 26.6.2 '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-mock: 26.6.2 jest-util: 26.6.2 jsdom: 16.7.0 @@ -14634,7 +14744,7 @@ packages: '@jest/environment': 27.3.1 '@jest/fake-timers': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-mock: 27.3.0 jest-util: 27.3.1 jsdom: 16.7.0 @@ -14651,7 +14761,7 @@ packages: '@jest/environment': 27.3.1 '@jest/fake-timers': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 jest-mock: 27.3.0 jest-util: 27.3.1 @@ -14722,7 +14832,7 @@ packages: dependencies: '@jest/types': 27.2.5 '@types/graceful-fs': 4.1.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 anymatch: 3.1.2 fb-watchman: 2.0.1 graceful-fs: 4.2.8 @@ -14739,13 +14849,13 @@ packages: resolution: {integrity: sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@jest/environment': 27.3.1 '@jest/source-map': 27.0.6 '@jest/test-result': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 co: 4.6.0 expect: 27.3.1 is-generator-fn: 2.1.0 @@ -14771,7 +14881,7 @@ packages: resolution: {integrity: sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - chalk: 4.1.2 + chalk: 4.1.1 jest-diff: 27.3.1 jest-get-type: 27.3.1 pretty-format: 27.3.1 @@ -14797,7 +14907,7 @@ packages: '@babel/code-frame': 7.16.0 '@jest/types': 27.2.5 '@types/stack-utils': 2.0.1 - chalk: 4.1.2 + chalk: 4.1.1 graceful-fs: 4.2.8 micromatch: 4.0.4 pretty-format: 27.3.1 @@ -14809,14 +14919,14 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 16.11.6 + '@types/node': 16.11.7 /jest-mock/27.3.0: resolution: {integrity: sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 /jest-pnp-resolver/1.2.2_jest-resolve@27.3.1: resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} @@ -14854,7 +14964,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.2.5 - chalk: 4.1.2 + chalk: 4.1.1 graceful-fs: 4.2.8 jest-haste-map: 27.3.1 jest-pnp-resolver: 1.2.2_jest-resolve@27.3.1 @@ -14873,8 +14983,8 @@ packages: '@jest/test-result': 27.3.1 '@jest/transform': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 emittery: 0.8.1 exit: 0.1.2 graceful-fs: 4.2.8 @@ -14908,12 +15018,12 @@ packages: '@jest/transform': 27.3.1 '@jest/types': 27.2.5 '@types/yargs': 16.0.4 - chalk: 4.1.2 + chalk: 4.1.1 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 execa: 5.1.1 exit: 0.1.2 - glob: 7.2.0 + glob: 7.1.6 graceful-fs: 4.2.8 jest-haste-map: 27.3.1 jest-message-util: 27.3.1 @@ -14941,7 +15051,7 @@ packages: resolution: {integrity: sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 graceful-fs: 4.2.8 /jest-snapshot/27.3.1: @@ -14950,16 +15060,16 @@ packages: dependencies: '@babel/core': 7.16.0 '@babel/generator': 7.16.0 - '@babel/parser': 7.16.2 + '@babel/parser': 7.16.3 '@babel/plugin-syntax-typescript': 7.16.0_@babel+core@7.16.0 - '@babel/traverse': 7.16.0 + '@babel/traverse': 7.16.3 '@babel/types': 7.16.0 '@jest/transform': 27.3.1 '@jest/types': 27.2.5 '@types/babel__traverse': 7.14.2 '@types/prettier': 2.4.1 babel-preset-current-node-syntax: 1.0.1_@babel+core@7.16.0 - chalk: 4.1.2 + chalk: 4.1.1 expect: 27.3.1 graceful-fs: 4.2.8 jest-diff: 27.3.1 @@ -14980,8 +15090,8 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 16.11.6 - chalk: 4.1.2 + '@types/node': 16.11.7 + chalk: 4.1.1 graceful-fs: 4.2.8 is-ci: 2.0.0 micromatch: 4.0.4 @@ -14991,7 +15101,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 chalk: 4.1.1 ci-info: 3.2.0 graceful-fs: 4.2.8 @@ -15003,7 +15113,7 @@ packages: dependencies: '@jest/types': 27.2.5 camelcase: 6.2.0 - chalk: 4.1.2 + chalk: 4.1.1 jest-get-type: 27.3.1 leven: 3.1.0 pretty-format: 27.3.1 @@ -15014,9 +15124,9 @@ packages: dependencies: '@jest/test-result': 27.3.1 '@jest/types': 27.2.5 - '@types/node': 16.11.6 + '@types/node': 16.11.7 ansi-escapes: 4.3.2 - chalk: 4.1.2 + chalk: 4.1.1 jest-util: 27.3.1 string-length: 4.0.2 dev: true @@ -15025,7 +15135,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 merge-stream: 2.0.0 supports-color: 7.2.0 @@ -15033,7 +15143,7 @@ packages: resolution: {integrity: sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.11.6 + '@types/node': 16.11.7 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -16047,12 +16157,24 @@ packages: /mime-db/1.50.0: resolution: {integrity: sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==} engines: {node: '>= 0.6'} + dev: true + + /mime-db/1.51.0: + resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==} + engines: {node: '>= 0.6'} /mime-types/2.1.33: resolution: {integrity: sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.50.0 + dev: true + + /mime-types/2.1.34: + resolution: {integrity: sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.51.0 /mime/1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} @@ -16227,8 +16349,8 @@ packages: resolution: {integrity: sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==} dev: true - /moment-timezone/0.5.33: - resolution: {integrity: sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==} + /moment-timezone/0.5.34: + resolution: {integrity: sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==} dependencies: moment: 2.29.1 @@ -16356,7 +16478,7 @@ packages: resolution: {integrity: sha512-hr5+mknLpIbTOXifB13lx9mAKF1zQPUCMh53Galx79ic5opvNOd55jiB0iGCp2xqh+hwnFbNE/ddBKHsJNQrbw==} engines: {node: '>= 10.13'} dependencies: - debug: 4.3.2 + debug: 4.3.1 json-stringify-safe: 5.0.1 lodash.set: 4.3.2 propagate: 2.0.1 @@ -16569,7 +16691,7 @@ packages: find-up: 4.1.0 foreground-child: 2.0.0 get-package-type: 0.1.0 - glob: 7.2.0 + glob: 7.1.6 istanbul-lib-coverage: 3.2.0 istanbul-lib-hook: 3.0.0 istanbul-lib-instrument: 4.0.3 @@ -18774,9 +18896,9 @@ packages: peerDependencies: react-with-styles: ^3.0.0 dependencies: - array.prototype.flat: 1.2.4 + array.prototype.flat: 1.2.5 global-cache: 1.2.1 - react-with-styles: 3.2.3_react-dom@17.0.2+react@17.0.2 + react-with-styles: 3.2.3 /react-with-styles/3.2.3: resolution: {integrity: sha512-MTI1UOvMHABRLj5M4WpODfwnveHaip6X7QUMI2x6zovinJiBXxzhA9AJP7MZNaKqg1JRFtHPXZdroUC8KcXwlQ==} @@ -19172,7 +19294,7 @@ packages: /redux/4.1.2: resolution: {integrity: sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /reflect.ownkeys/0.2.0: resolution: {integrity: sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=} @@ -19208,7 +19330,7 @@ packages: /regenerator-transform/0.14.5: resolution: {integrity: sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==} dependencies: - '@babel/runtime': 7.16.0 + '@babel/runtime': 7.16.3 /regex-not/1.0.2: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} @@ -19426,7 +19548,7 @@ packages: is-typedarray: 1.0.0 isstream: 0.1.2 json-stringify-safe: 5.0.1 - mime-types: 2.1.33 + mime-types: 2.1.34 oauth-sign: 0.9.0 performance-now: 2.1.0 qs: 6.5.2 @@ -20925,7 +21047,7 @@ packages: resolution: {integrity: sha512-5DkIxeA7XERBqMwJq0aHZOdMadBx4e6eDoFRuyT5VR82J0Ycg2DwM6GfA/EQAhJ+toRTaS1lIdSQCqgrmhPnlw==} engines: {node: '>=10.0.0'} dependencies: - ajv: 8.6.3 + ajv: 8.7.1 lodash.truncate: 4.4.2 slice-ansi: 4.0.0 string-width: 4.2.3 @@ -21060,7 +21182,7 @@ packages: engines: {node: '>=8'} dependencies: '@istanbuljs/schema': 0.1.3 - glob: 7.2.0 + glob: 7.1.6 minimatch: 3.0.4 /text-table/0.2.0: @@ -21674,7 +21796,7 @@ packages: dependencies: file-loader: 6.2.0_webpack@5.51.1 loader-utils: 2.0.2 - mime-types: 2.1.33 + mime-types: 2.1.34 schema-utils: 3.1.1 webpack: 5.51.1 dev: true @@ -21690,7 +21812,7 @@ packages: optional: true dependencies: loader-utils: 2.0.2 - mime-types: 2.1.33 + mime-types: 2.1.34 schema-utils: 3.1.1 webpack: 5.51.1_webpack-cli@4.8.0 dev: true @@ -22116,7 +22238,7 @@ packages: '@webassemblyjs/wasm-parser': 1.11.1 acorn: 8.5.0 acorn-import-assertions: 1.8.0_acorn@8.5.0 - browserslist: 4.17.4 + browserslist: 4.17.6 chrome-trace-event: 1.0.3 enhanced-resolve: 5.8.3 es-module-lexer: 0.7.1 @@ -22126,7 +22248,7 @@ packages: graceful-fs: 4.2.8 json-parse-better-errors: 1.0.2 loader-runner: 4.2.0 - mime-types: 2.1.33 + mime-types: 2.1.34 neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 @@ -22156,7 +22278,7 @@ packages: '@webassemblyjs/wasm-parser': 1.11.1 acorn: 8.5.0 acorn-import-assertions: 1.8.0_acorn@8.5.0 - browserslist: 4.17.4 + browserslist: 4.17.6 chrome-trace-event: 1.0.3 enhanced-resolve: 5.8.3 es-module-lexer: 0.7.1 @@ -22166,7 +22288,7 @@ packages: graceful-fs: 4.2.8 json-parse-better-errors: 1.0.2 loader-runner: 4.2.0 - mime-types: 2.1.33 + mime-types: 2.1.34 neo-async: 2.6.2 schema-utils: 3.1.1 tapable: 2.2.1 diff --git a/projects/js-packages/connection/package.json b/projects/js-packages/connection/package.json index dbd2c0e24172f..51c15df6a8223 100644 --- a/projects/js-packages/connection/package.json +++ b/projects/js-packages/connection/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-connection", - "version": "0.9.1", + "version": "0.9.2-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/idc/package.json b/projects/js-packages/idc/package.json index 832e6517e4bcd..875a6bc7b042b 100644 --- a/projects/js-packages/idc/package.json +++ b/projects/js-packages/idc/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-idc", - "version": "0.4.2", + "version": "0.4.3-alpha", "description": "Jetpack Connection Component", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2#2 b/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/js-packages/storybook/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/js-packages/storybook/package.json b/projects/js-packages/storybook/package.json index cbfa19a20f2b8..eef30482461a6 100644 --- a/projects/js-packages/storybook/package.json +++ b/projects/js-packages/storybook/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@automattic/jetpack-base-styles": "workspace:^0.1.0-alpha", "@automattic/jetpack-components": "workspace:^0.6.0", - "@automattic/jetpack-connection": "workspace:^0.9.1", + "@automattic/jetpack-connection": "workspace:^0.9.2-alpha", "@babel/core": "7.16.0", "@babel/plugin-syntax-jsx": "7.16.0", "@babel/runtime-corejs3": "7.16.0", diff --git a/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/packages/connection-ui/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/packages/connection-ui/package.json b/projects/packages/connection-ui/package.json index 310e86e06a983..a73678eaed30b 100644 --- a/projects/packages/connection-ui/package.json +++ b/projects/packages/connection-ui/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-connection-manager-ui", - "version": "2.0.0", + "version": "2.0.1-alpha", "description": "Jetpack Connection Manager UI", "main": "_inc/admin.jsx", "repository": "https://github.com/Automattic/jetpack-connection-ui", @@ -15,8 +15,8 @@ }, "dependencies": { "@automattic/jetpack-api": "workspace:^0.5.1-alpha", - "@automattic/jetpack-connection": "workspace:^0.9.1", - "@automattic/jetpack-idc": "workspace:^0.4.2", + "@automattic/jetpack-connection": "workspace:^0.9.2-alpha", + "@automattic/jetpack-idc": "workspace:^0.4.3-alpha", "@wordpress/data": "6.1.2" }, "devDependencies": { diff --git a/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/plugins/backup/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/plugins/backup/package.json b/projects/plugins/backup/package.json index 3720c48271076..164c4f56a3f33 100644 --- a/projects/plugins/backup/package.json +++ b/projects/plugins/backup/package.json @@ -29,7 +29,7 @@ "dependencies": { "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.6.0", - "@automattic/jetpack-connection": "workspace:^0.9.1", + "@automattic/jetpack-connection": "workspace:^0.9.2-alpha", "@wordpress/api-fetch": "5.2.4", "@wordpress/data": "6.1.2", "@wordpress/date": "4.2.2", diff --git a/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-user-license-activate-notice-2#2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index 78b8c20cf18cd..2644abad6564d 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -65,7 +65,7 @@ "@automattic/jetpack-analytics": "workspace:^0.1.2", "@automattic/jetpack-api": "workspace:^0.5.1-alpha", "@automattic/jetpack-components": "workspace:^0.6.0", - "@automattic/jetpack-connection": "workspace:^0.9.1", + "@automattic/jetpack-connection": "workspace:^0.9.2-alpha", "@automattic/popup-monitor": "1.0.0", "@automattic/request-external-access": "1.0.0", "@automattic/social-previews": "1.1.1", @@ -149,8 +149,8 @@ "webpack-cli": "4.8.0" }, "devDependencies": { - "@automattic/jetpack-webpack-config": "workspace:^0.1.0", "@automattic/color-studio": "2.5.0", + "@automattic/jetpack-webpack-config": "workspace:^0.1.0", "@babel/core": "7.16.0", "@babel/plugin-proposal-nullish-coalescing-operator": "7.16.0", "@babel/plugin-transform-react-jsx": "7.16.0", @@ -195,7 +195,7 @@ "nyc": "15.1.0", "postcss": "8.3.11", "postcss-loader": "6.2.0", - "prettier": "npm:wp-prettier@2.0.5", + "prettier": "npm:wp-prettier@^2.0.5", "react-click-outside": "3.0.1", "react-test-renderer": "17.0.2", "sass-loader": "10.1.1", From 26d64dbbda9e361abf6f24a3c4d5a508c0d395ec Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 10 Nov 2021 15:49:15 -0500 Subject: [PATCH 29/31] update project/package versions. --- .../plugins/beta/changelog/add-user-license-activate-notice-2 | 4 ++++ .../boost/changelog/add-user-license-activate-notice-2 | 4 ++++ .../debug-helper/changelog/add-user-license-activate-notice-2 | 4 ++++ .../search/changelog/add-user-license-activate-notice-2 | 4 ++++ .../vaultpress/changelog/add-user-license-activate-notice-2 | 4 ++++ 5 files changed, 20 insertions(+) create mode 100644 projects/plugins/beta/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/boost/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/search/changelog/add-user-license-activate-notice-2 create mode 100644 projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 diff --git a/projects/plugins/beta/changelog/add-user-license-activate-notice-2 b/projects/plugins/beta/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/beta/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 b/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/search/changelog/add-user-license-activate-notice-2 b/projects/plugins/search/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/search/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. diff --git a/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 b/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 new file mode 100644 index 0000000000000..1eaea6a769e84 --- /dev/null +++ b/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Updated package dependencies. From 9952f86c319031cd899b151d1741af83ca85cab1 Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Wed, 10 Nov 2021 16:58:17 -0500 Subject: [PATCH 30/31] Fix changelogs "type" property to "changed" for validity pass. --- .../plugins/beta/changelog/add-user-license-activate-notice-2 | 2 +- .../plugins/boost/changelog/add-user-license-activate-notice-2 | 2 +- .../debug-helper/changelog/add-user-license-activate-notice-2 | 2 +- .../plugins/search/changelog/add-user-license-activate-notice-2 | 2 +- .../vaultpress/changelog/add-user-license-activate-notice-2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/plugins/beta/changelog/add-user-license-activate-notice-2 b/projects/plugins/beta/changelog/add-user-license-activate-notice-2 index 1eaea6a769e84..c47cb18e82997 100644 --- a/projects/plugins/beta/changelog/add-user-license-activate-notice-2 +++ b/projects/plugins/beta/changelog/add-user-license-activate-notice-2 @@ -1,4 +1,4 @@ Significance: patch -Type: other +Type: changed Updated package dependencies. diff --git a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 index 1eaea6a769e84..c47cb18e82997 100644 --- a/projects/plugins/boost/changelog/add-user-license-activate-notice-2 +++ b/projects/plugins/boost/changelog/add-user-license-activate-notice-2 @@ -1,4 +1,4 @@ Significance: patch -Type: other +Type: changed Updated package dependencies. diff --git a/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 b/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 index 1eaea6a769e84..c47cb18e82997 100644 --- a/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 +++ b/projects/plugins/debug-helper/changelog/add-user-license-activate-notice-2 @@ -1,4 +1,4 @@ Significance: patch -Type: other +Type: changed Updated package dependencies. diff --git a/projects/plugins/search/changelog/add-user-license-activate-notice-2 b/projects/plugins/search/changelog/add-user-license-activate-notice-2 index 1eaea6a769e84..c47cb18e82997 100644 --- a/projects/plugins/search/changelog/add-user-license-activate-notice-2 +++ b/projects/plugins/search/changelog/add-user-license-activate-notice-2 @@ -1,4 +1,4 @@ Significance: patch -Type: other +Type: changed Updated package dependencies. diff --git a/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 b/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 index 1eaea6a769e84..c47cb18e82997 100644 --- a/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 +++ b/projects/plugins/vaultpress/changelog/add-user-license-activate-notice-2 @@ -1,4 +1,4 @@ Significance: patch -Type: other +Type: changed Updated package dependencies. From 898a8858407d661bd71d6532827e9625f6d14a2e Mon Sep 17 00:00:00 2001 From: elliottprogrammer Date: Thu, 11 Nov 2021 08:32:13 -0500 Subject: [PATCH 31/31] Remove accidental root dev dependency jetpack-e2e-commons. --- package.json | 1 - pnpm-lock.yaml | 2 -- 2 files changed, 3 deletions(-) diff --git a/package.json b/package.json index 18de4ef7ca493..955b64a738d04 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,6 @@ "devDependencies": { "husky": "4.3.8", "jetpack-cli": "workspace:1.0.0", - "jetpack-e2e-commons": "link:tools/e2e-commons", "jetpack-js-tools": "workspace:*" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76528739ac8ba..ce6c15734e435 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,12 +21,10 @@ importers: specifiers: husky: 4.3.8 jetpack-cli: workspace:1.0.0 - jetpack-e2e-commons: link:tools/e2e-commons jetpack-js-tools: workspace:* devDependencies: husky: 4.3.8 jetpack-cli: link:tools/cli - jetpack-e2e-commons: link:tools/e2e-commons jetpack-js-tools: link:tools/js-tools projects/github-actions/repo-gardening: