From cf1d9f39102fa64d101a821e09ee3ba9005da916 Mon Sep 17 00:00:00 2001 From: Adnan Haque <3737780+haqadn@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:49:17 +0600 Subject: [PATCH 01/37] Jetpack: Fix Jetpack my-jetpack version ref (#36630) * Fix my-jetpack version reference * changelog * Update pnpm lock file * Reverted pnpm-lock changes. --------- Co-authored-by: Igor Zinovyev --- pnpm-lock.yaml | 2 +- .../jetpack/changelog/fix-jetpack-my-jetpack-version-ref | 5 +++++ projects/plugins/jetpack/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fff3e8e164688..1691e30c07cb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3282,7 +3282,7 @@ importers: specifier: workspace:* version: link:../../js-packages/licensing '@automattic/jetpack-my-jetpack': - specifier: workspace:4.20.0-alpha + specifier: workspace:* version: link:../../packages/my-jetpack '@automattic/jetpack-partner-coupon': specifier: workspace:* diff --git a/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref b/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref new file mode 100644 index 0000000000000..a4496b1b619f2 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Fixed a pnpm version reference for internal dependency + + diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index bbf11f97e3606..b9a4311c6f2cc 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -53,7 +53,7 @@ "@automattic/jetpack-components": "workspace:*", "@automattic/jetpack-connection": "workspace:*", "@automattic/jetpack-licensing": "workspace:*", - "@automattic/jetpack-my-jetpack": "workspace:4.20.0-alpha", + "@automattic/jetpack-my-jetpack": "workspace:*", "@automattic/jetpack-partner-coupon": "workspace:*", "@automattic/jetpack-publicize-components": "workspace:*", "@automattic/jetpack-shared-extension-utils": "workspace:*", From 55ccd6001105251e74b127d2f7eb38996df4e48f Mon Sep 17 00:00:00 2001 From: Renato Augusto Gama dos Santos Date: Thu, 28 Mar 2024 09:32:44 -0300 Subject: [PATCH 02/37] AI Featured Image: Implement accept logic (save to library and set as featured image) (#36626) --- .../changelog/add-format-response-image-hook | 4 ++ projects/js-packages/ai-client/package.json | 2 +- .../src/hooks/use-image-generator/index.ts | 8 +-- .../jetpack/changelog/add-set-featured-image | 4 ++ .../components/featured-image/index.tsx | 33 +++++++++--- .../hooks/use-save-to-media-library.ts | 54 +++++++++++++++++++ 6 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 projects/js-packages/ai-client/changelog/add-format-response-image-hook create mode 100644 projects/plugins/jetpack/changelog/add-set-featured-image create mode 100644 projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts diff --git a/projects/js-packages/ai-client/changelog/add-format-response-image-hook b/projects/js-packages/ai-client/changelog/add-format-response-image-hook new file mode 100644 index 0000000000000..1e6e018d93d38 --- /dev/null +++ b/projects/js-packages/ai-client/changelog/add-format-response-image-hook @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Support different responses in image hook diff --git a/projects/js-packages/ai-client/package.json b/projects/js-packages/ai-client/package.json index 55f50c93cb428..a332d155d4087 100644 --- a/projects/js-packages/ai-client/package.json +++ b/projects/js-packages/ai-client/package.json @@ -1,7 +1,7 @@ { "private": false, "name": "@automattic/jetpack-ai-client", - "version": "0.10.2-alpha", + "version": "0.11.0-alpha", "description": "A JS client for consuming Jetpack AI services", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme", "bugs": { diff --git a/projects/js-packages/ai-client/src/hooks/use-image-generator/index.ts b/projects/js-packages/ai-client/src/hooks/use-image-generator/index.ts index bd3574c13f7bf..7de4eb93b6524 100644 --- a/projects/js-packages/ai-client/src/hooks/use-image-generator/index.ts +++ b/projects/js-packages/ai-client/src/hooks/use-image-generator/index.ts @@ -13,10 +13,12 @@ const useImageGenerator = () => { const generateImage = async function ( { feature, postContent, + responseFormat = 'url', }: { feature: string; postContent: string; - } ): Promise< { data: Array< { url: string } > } > { + responseFormat?: 'url' | 'b64_json'; + } ): Promise< { data: Array< { [ key: string ]: string } > } > { let token = ''; try { @@ -49,7 +51,7 @@ This is the post content: const body = { prompt: imageGenerationPrompt, - response_format: 'url', + response_format: responseFormat, feature, size: '1792x1024', }; @@ -65,7 +67,7 @@ This is the post content: body: JSON.stringify( body ), } ).then( response => response.json() ); - return data as { data: { url: string }[] }; + return data as { data: { [ key: string ]: string }[] }; } catch ( error ) { return; } diff --git a/projects/plugins/jetpack/changelog/add-set-featured-image b/projects/plugins/jetpack/changelog/add-set-featured-image new file mode 100644 index 0000000000000..9e5b9c35a14a6 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-set-featured-image @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Save generated AI image to library and set as featured image diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx index 350c05f9156a2..bbd8e6f7b9260 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx @@ -3,6 +3,8 @@ */ import { useImageGenerator } from '@automattic/jetpack-ai-client'; import { Button, Spinner } from '@wordpress/components'; +import { useDispatch } from '@wordpress/data'; +import { store as editorStore } from '@wordpress/editor'; import { useCallback, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; /** @@ -10,15 +12,18 @@ import { __ } from '@wordpress/i18n'; */ import './style.scss'; import usePostContent from '../../hooks/use-post-content'; +import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library'; import AiAssistantModal from '../modal'; const FEATURED_IMAGE_FEATURE_NAME = 'featured-post-image'; export default function FeaturedImage() { + const { editPost } = useDispatch( editorStore ); const [ isFeaturedImageModalVisible, setIsFeaturedImageModalVisible ] = useState( false ); const [ generating, setGenerating ] = useState( false ); const [ imageURL, setImageURL ] = useState( null ); const { generateImage } = useImageGenerator(); + const { isLoading: isSavingToMediaLibrary, saveToMediaLibrary } = useSaveToMediaLibrary(); const postContent = usePostContent(); @@ -27,10 +32,14 @@ export default function FeaturedImage() { */ const processImageGeneration = useCallback( () => { setGenerating( true ); - generateImage( { feature: FEATURED_IMAGE_FEATURE_NAME, postContent } ) + generateImage( { + feature: FEATURED_IMAGE_FEATURE_NAME, + postContent, + responseFormat: 'b64_json', + } ) .then( result => { if ( result.data.length > 0 ) { - const image = result.data[ 0 ].url; + const image = 'data:image/png;base64,' + result.data[ 0 ].b64_json; setImageURL( image ); } } ) @@ -57,8 +66,11 @@ export default function FeaturedImage() { }, [ processImageGeneration ] ); const handleAccept = useCallback( () => { - toggleFeaturedImageModal(); - }, [ toggleFeaturedImageModal ] ); + saveToMediaLibrary( imageURL ).then( image => { + editPost( { featured_media: image.id } ); + toggleFeaturedImageModal(); + } ); + }, [ editPost, imageURL, saveToMediaLibrary, toggleFeaturedImageModal ] ); const modalTitleWhenGenerating = __( 'Generating featured image…', 'jetpack' ); const modalTitleWhenDone = __( 'Featured Image Generation', 'jetpack' ); @@ -92,10 +104,19 @@ export default function FeaturedImage() {
- -
diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts new file mode 100644 index 0000000000000..9d006e3ff1554 --- /dev/null +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts @@ -0,0 +1,54 @@ +/** + * External dependencies + */ +import { isBlobURL } from '@wordpress/blob'; +import { store as blockEditorStore } from '@wordpress/block-editor'; +import { useSelect } from '@wordpress/data'; +import { useState } from 'react'; +/** + * Types + */ +import type { BlockEditorStore } from '../../../blocks/ai-assistant/types'; + +export default function useSaveToMediaLibrary() { + const [ isLoading, setIsLoading ] = useState( false ); + const { getSettings } = useSelect( blockEditorStore, [] ) as BlockEditorStore[ 'selectors' ]; + + const saveToMediaLibrary = ( url: string ): Promise< { id: string } > => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const settings = getSettings() as any; + + return new Promise( ( resolve, reject ) => { + fetch( url ).then( response => { + response.blob().then( ( blob: Blob ) => { + const filesList = [ blob ]; + settings.mediaUpload( { + allowedTypes: [ 'image' ], + filesList, + onFileChange( [ image ] ) { + if ( isBlobURL( image?.url ) ) { + setIsLoading( true ); + return; + } + + if ( image ) { + resolve( image ); + } + + setIsLoading( false ); + }, + onError( message ) { + // TODO: Handle error + reject( message ); + }, + } ); + } ); + } ); + } ); + }; + + return { + isLoading, + saveToMediaLibrary, + }; +} From 2ece6313204d73307b504691d1bca60b62909610 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Thu, 28 Mar 2024 14:40:55 +0100 Subject: [PATCH 03/37] SEO Tools: make feature available on non-connected sites. (#36528) * SEO Tools: make feature available on non-connected sites. The module was previously restricted to paid Jetpack plans. When we added the options to customize the different SEO options to wp-admin (in the block editor and in Jetpack settings), we made the module available to all plans. It is still restricted to paid plans on WordPress.com though. As a result: - On self-hosted, we do not need to be checking if the feature is available; it always is. - On WordPress.com, we should be checking if the feature is available. - On self-hosted, the feature can consequently be available on offline mode. * Add missing parameter to stub function The original function on WordPress.com simple does include that second parameter. * Update Phan config * Bump version * Update plugin registration to match simplified module availability * Bump version * Add plan check back to editor extension It does not currently make any calls to WordPress.com behind the scenes. `set_availability_for_plan` relies on `Current_Plan::supports()` behind the scenes, but without passing a `$refresh_from_wpcom` second parameter so it only relies on local data on self-hosted sites. * Remove offline mode check in wp-admin UI --- .../changelog/update-seo-settings | 4 +++ .../packages/jetpack-mu-wpcom/package.json | 2 +- .../src/class-jetpack-mu-wpcom.php | 2 +- .../changelog/update-seo-settings | 4 +++ .../src/class-scheduled-updates.php | 2 +- projects/plugins/jetpack/.phan/baseline.php | 2 +- .../jetpack/_inc/client/traffic/seo.jsx | 4 +-- .../jetpack/changelog/update-seo-settings | 4 +++ .../jetpack/extensions/plugins/seo/seo.php | 31 ++++--------------- .../plugins/jetpack/modules/seo-tools.php | 2 +- .../seo-tools/class-jetpack-seo-utils.php | 8 +++-- .../jetpack/tests/php/lib/mock-functions.php | 2 +- 12 files changed, 30 insertions(+), 37 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings create mode 100644 projects/packages/scheduled-updates/changelog/update-seo-settings create mode 100644 projects/plugins/jetpack/changelog/update-seo-settings diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings b/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings new file mode 100644 index 0000000000000..8b2fa2c9a494a --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update Phan configuration. diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index 986ea39ed4e75..67c2d79a24bc6 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom", - "version": "5.21.0", + "version": "5.21.1-alpha", "description": "Enhances your site with features powered by WordPress.com", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme", "bugs": { diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index cdaa8f1297b29..c376e9b935601 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -13,7 +13,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '5.21.0'; + const PACKAGE_VERSION = '5.21.1-alpha'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/projects/packages/scheduled-updates/changelog/update-seo-settings b/projects/packages/scheduled-updates/changelog/update-seo-settings new file mode 100644 index 0000000000000..8b2fa2c9a494a --- /dev/null +++ b/projects/packages/scheduled-updates/changelog/update-seo-settings @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update Phan configuration. diff --git a/projects/packages/scheduled-updates/src/class-scheduled-updates.php b/projects/packages/scheduled-updates/src/class-scheduled-updates.php index 5c894c72329be..3fb6417ee5a1b 100644 --- a/projects/packages/scheduled-updates/src/class-scheduled-updates.php +++ b/projects/packages/scheduled-updates/src/class-scheduled-updates.php @@ -20,7 +20,7 @@ class Scheduled_Updates { * * @var string */ - const PACKAGE_VERSION = '0.5.2'; + const PACKAGE_VERSION = '0.5.3-alpha'; /** * The cron event hook for the scheduled plugins update. * diff --git a/projects/plugins/jetpack/.phan/baseline.php b/projects/plugins/jetpack/.phan/baseline.php index b2420febfe324..ff8d4a34b14c1 100644 --- a/projects/plugins/jetpack/.phan/baseline.php +++ b/projects/plugins/jetpack/.phan/baseline.php @@ -145,7 +145,7 @@ '_inc/lib/admin-pages/class-jetpack-about-page.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'], '_inc/lib/admin-pages/class-jetpack-redux-state-helper.php' => ['PhanParamTooMany', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimAssignment'], '_inc/lib/admin-pages/class.jetpack-admin-page.php' => ['PhanDeprecatedProperty', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredProperty'], - '_inc/lib/class-jetpack-ai-helper.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchPropertyDefault', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'], + '_inc/lib/class-jetpack-ai-helper.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchPropertyDefault', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'], '_inc/lib/class-jetpack-currencies.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal'], '_inc/lib/class-jetpack-google-drive-helper.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'], '_inc/lib/class-jetpack-instagram-gallery-helper.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'], diff --git a/projects/plugins/jetpack/_inc/client/traffic/seo.jsx b/projects/plugins/jetpack/_inc/client/traffic/seo.jsx index 2f144e9ed33cb..1a419cce7212d 100644 --- a/projects/plugins/jetpack/_inc/client/traffic/seo.jsx +++ b/projects/plugins/jetpack/_inc/client/traffic/seo.jsx @@ -118,8 +118,7 @@ export const SEO = withModuleSettingsFormHelpers( }; render() { - const isOfflineMode = this.props.isOfflineMode, - seo = this.props.getModule( 'seo-tools' ), + const seo = this.props.getModule( 'seo-tools' ), isSeoActive = this.props.getOptionValue( seo.module ), customSeoTitles = this.props.getOptionValue( 'advanced_seo_title_formats' ), frontPageMetaDescription = this.props.getOptionValue( @@ -204,7 +203,6 @@ export const SEO = withModuleSettingsFormHelpers( { isSeoActive && - ! isOfflineMode && ! isFetchingPluginsData( this.props.state ) && ! hasConflictingSeoPlugin && ( <> diff --git a/projects/plugins/jetpack/changelog/update-seo-settings b/projects/plugins/jetpack/changelog/update-seo-settings new file mode 100644 index 0000000000000..ba005bc7ad289 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-seo-settings @@ -0,0 +1,4 @@ +Significance: patch +Type: compat + +SEO Tools: make the feature available on non-connected sites. diff --git a/projects/plugins/jetpack/extensions/plugins/seo/seo.php b/projects/plugins/jetpack/extensions/plugins/seo/seo.php index b2bcf5e8b7288..8404bb7b0be40 100644 --- a/projects/plugins/jetpack/extensions/plugins/seo/seo.php +++ b/projects/plugins/jetpack/extensions/plugins/seo/seo.php @@ -7,32 +7,13 @@ namespace Automattic\Jetpack\Extensions\Seo; -use Automattic\Jetpack\Connection\Manager as Connection_Manager; -use Automattic\Jetpack\Status; -use Automattic\Jetpack\Status\Host; -use Jetpack_Gutenberg; - -/** - * Register SEO plugin. - * - * @return void - */ -function register_plugins() { - // Setting availability for Advanced SEO plan. - Jetpack_Gutenberg::set_availability_for_plan( 'advanced-seo' ); - - // On WPCOM sites we handle plan with Upsell message if needed. - // On Self-Hosted we check if there's an active connection and if the site is not in offline mode. - $is_wpcom_platform = ( new Host() )->is_wpcom_platform(); - if ( - $is_wpcom_platform - || ( ( new Connection_Manager( 'jetpack' ) )->has_connected_owner() && ! ( new Status() )->is_offline_mode() ) - ) { - Jetpack_Gutenberg::set_extension_available( 'jetpack-seo' ); +add_action( + 'jetpack_register_gutenberg_extensions', + function () { + \Jetpack_Gutenberg::set_availability_for_plan( 'advanced-seo' ); + \Jetpack_Gutenberg::set_extension_available( 'jetpack-seo' ); } -} - -add_action( 'jetpack_register_gutenberg_extensions', __NAMESPACE__ . '\register_plugins' ); +); add_filter( 'jetpack_set_available_extensions', diff --git a/projects/plugins/jetpack/modules/seo-tools.php b/projects/plugins/jetpack/modules/seo-tools.php index b6eb7a1c80420..ccabe8518fc35 100644 --- a/projects/plugins/jetpack/modules/seo-tools.php +++ b/projects/plugins/jetpack/modules/seo-tools.php @@ -5,7 +5,7 @@ * Sort Order: 35 * Recommendation Order: 15 * First Introduced: 4.4 - * Requires Connection: Yes + * Requires Connection: No * Requires User Connection: No * Auto Activate: No * Module Tags: Social, Appearance diff --git a/projects/plugins/jetpack/modules/seo-tools/class-jetpack-seo-utils.php b/projects/plugins/jetpack/modules/seo-tools/class-jetpack-seo-utils.php index bb114566e87d5..c143562186e03 100644 --- a/projects/plugins/jetpack/modules/seo-tools/class-jetpack-seo-utils.php +++ b/projects/plugins/jetpack/modules/seo-tools/class-jetpack-seo-utils.php @@ -5,8 +5,6 @@ * @package automattic/jetpack */ -use Automattic\Jetpack\Current_Plan as Jetpack_Plan; - /** * Class containing utility static methods that other SEO tools are relying on. */ @@ -41,7 +39,11 @@ public static function is_enabled_jetpack_seo() { return false; } - return Jetpack_Plan::supports( 'advanced-seo' ); + if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { + return wpcom_site_has_feature( 'advanced-seo', get_current_blog_id() ); + } + + return true; } /** diff --git a/projects/plugins/jetpack/tests/php/lib/mock-functions.php b/projects/plugins/jetpack/tests/php/lib/mock-functions.php index 4f85726efee6b..59615c07f9550 100644 --- a/projects/plugins/jetpack/tests/php/lib/mock-functions.php +++ b/projects/plugins/jetpack/tests/php/lib/mock-functions.php @@ -18,7 +18,7 @@ function wp_cache_is_enabled() {} * * @param string $feature The feature to check. */ - function wpcom_site_has_feature( $feature ) { + function wpcom_site_has_feature( $feature, $blog_id = 0 ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable switch ( $feature ) { case WPCOM_Features::ATOMIC: case WPCOM_Features::MANAGE_PLUGINS: From 9d777e13d68793c65425d3a01b4a50133f7a7197 Mon Sep 17 00:00:00 2001 From: Przemek Kuliga Date: Thu, 28 Mar 2024 14:42:09 +0100 Subject: [PATCH 04/37] Subscription Site: Hook Subscriber Login block into the navigation (#36487) --- .../newsletter/subscriptions-settings.jsx | 42 ++++++++++ .../lib/class.core-rest-api-endpoints.php | 7 ++ ...lass.jetpack-core-api-module-endpoints.php | 1 + .../update-subscription-site-login-navigation | 4 + .../class-jetpack-subscription-site.php | 84 +++++++++++++++++++ .../subscriber-login/subscriber-login.php | 4 + 6 files changed, 142 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/update-subscription-site-login-navigation create mode 100644 projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php diff --git a/projects/plugins/jetpack/_inc/client/newsletter/subscriptions-settings.jsx b/projects/plugins/jetpack/_inc/client/newsletter/subscriptions-settings.jsx index 3697b42c0a8de..d45bf9f4d084a 100644 --- a/projects/plugins/jetpack/_inc/client/newsletter/subscriptions-settings.jsx +++ b/projects/plugins/jetpack/_inc/client/newsletter/subscriptions-settings.jsx @@ -46,6 +46,8 @@ function SubscriptionsSettings( props ) { isStcEnabled, isSmEnabled, isSubscribePostEndEnabled, + isLoginNavigationEnabled, + isSubscriptionSiteFeatureEnabled, isSubscriptionSiteEditSupported, isSubscriptionsActive, siteRawUrl, @@ -74,6 +76,13 @@ function SubscriptionsSettings( props ) { } ) : null; + const headerTemplateEditorUrl = siteAdminUrl + ? addQueryArgs( `${ siteAdminUrl }site-editor.php`, { + postType: 'wp_template_part', + postId: `${ themeStylesheet }//header`, + } ) + : null; + const handleSubscribeToBlogToggleChange = useCallback( () => { updateFormStateModuleOption( SUBSCRIPTIONS_MODULE_NAME, 'stb_enabled' ); }, [ updateFormStateModuleOption ] ); @@ -93,6 +102,13 @@ function SubscriptionsSettings( props ) { ); }, [ updateFormStateModuleOption ] ); + const handleLoginNavigationToggleChange = useCallback( () => { + updateFormStateModuleOption( + SUBSCRIPTIONS_MODULE_NAME, + 'jetpack_subscriptions_login_navigation_enabled' + ); + }, [ updateFormStateModuleOption ] ); + const getSubClickableCard = () => { if ( unavailableInOfflineMode || ! isSubscriptionsActive || ! isLinked ) { return ''; @@ -231,6 +247,29 @@ function SubscriptionsSettings( props ) { 'jetpack' ) } /> + { isSubscriptionSiteFeatureEnabled && ( + + { __( 'Add the Subscriber Login Block to the navigation', 'jetpack' ) } + { isBlockTheme && headerTemplateEditorUrl && ( + <> + { '. ' } + + { __( 'Preview and edit', 'jetpack' ) } + + + ) } + + } + /> + ) } } @@ -264,6 +303,9 @@ export default withModuleSettingsFormHelpers( isSubscribePostEndEnabled: ownProps.getOptionValue( 'jetpack_subscriptions_subscribe_post_end_enabled' ), + isLoginNavigationEnabled: ownProps.getOptionValue( + 'jetpack_subscriptions_login_navigation_enabled' + ), isSubscriptionSiteFeatureEnabled: isSubscriptionSiteEnabled( state ), isSubscriptionSiteEditSupported: subscriptionSiteEditSupported( state ), isBlockTheme: currentThemeIsBlockTheme( state ), 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 1ea218fcb25dc..cb104c91c4dda 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 @@ -2659,6 +2659,13 @@ public static function get_updateable_data_list( $selector = '' ) { 'validate_callback' => __CLASS__ . '::validate_boolean', 'jp_group' => 'subscriptions', ), + 'jetpack_subscriptions_login_navigation_enabled' => array( + 'description' => esc_html__( 'Add Subscriber Login block to the navigation.', 'jetpack' ), + 'type' => 'boolean', + 'default' => 0, + 'validate_callback' => __CLASS__ . '::validate_boolean', + 'jp_group' => 'subscriptions', + ), 'social_notifications_subscribe' => array( 'description' => esc_html__( 'Send email notification when someone subscribes to my blog', 'jetpack' ), 'type' => 'boolean', diff --git a/projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php b/projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php index 435d407e6bd4e..4361110b6429b 100644 --- a/projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php +++ b/projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php @@ -987,6 +987,7 @@ public function update_data( $request ) { case 'wpcom_featured_image_in_email': case 'wpcom_subscription_emails_use_excerpt': case 'jetpack_subscriptions_subscribe_post_end_enabled': + case 'jetpack_subscriptions_login_navigation_enabled': // Convert the false value to 0. This allows the option to be updated if it doesn't exist yet. $sub_value = $value ? $value : 0; $updated = (string) get_option( $option ) !== (string) $sub_value ? update_option( $option, $sub_value ) : true; diff --git a/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation b/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation new file mode 100644 index 0000000000000..9e71355559483 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Subscription Site: Hook Subscriber Login block into the navigation diff --git a/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php b/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php new file mode 100644 index 0000000000000..ddb16ee16c35b --- /dev/null +++ b/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php @@ -0,0 +1,84 @@ +is_subscription_site_feature_enabled() ) { + return; + } + + $this->handle_subscriber_login_block_navigation_placement(); + } + + /** + * Returns true if Subscription Site feature is enabled. + * + * @return bool + */ + protected function is_subscription_site_feature_enabled() { + // It's temporary. Allows to enable the Subscription Site feature. + return (bool) apply_filters( 'jetpack_subscription_site_enabled', false ); + } + + /** + * Handles Subscriber Login block navigation placement. + * + * @return void + */ + protected function handle_subscriber_login_block_navigation_placement() { + $subscriber_login_navigation_enabled = get_option( 'jetpack_subscriptions_login_navigation_enabled', false ); + if ( ! $subscriber_login_navigation_enabled ) { + return; + } + + if ( ! wp_is_block_theme() ) { // TODO Fallback for classic themes. + return; + } + + add_filter( + 'hooked_block_types', + function ( $hooked_blocks, $relative_position, $anchor_block ) { + if ( $anchor_block === 'core/navigation' && $relative_position === 'last_child' ) { + $hooked_blocks[] = 'jetpack/subscriber-login'; + } + + return $hooked_blocks; + }, + 10, + 3 + ); + } +} diff --git a/projects/plugins/jetpack/extensions/blocks/subscriber-login/subscriber-login.php b/projects/plugins/jetpack/extensions/blocks/subscriber-login/subscriber-login.php index fa75f2b431aaf..99869f726e65f 100644 --- a/projects/plugins/jetpack/extensions/blocks/subscriber-login/subscriber-login.php +++ b/projects/plugins/jetpack/extensions/blocks/subscriber-login/subscriber-login.php @@ -17,6 +17,8 @@ use Jetpack_Memberships; use Jetpack_Options; +require_once __DIR__ . '/class-jetpack-subscription-site.php'; + /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable @@ -35,6 +37,8 @@ function register_block() { __DIR__, array( 'render_callback' => __NAMESPACE__ . '\render_block' ) ); + + Jetpack_Subscription_Site::init()->handle_subscriber_login_block_placements(); } add_action( 'init', __NAMESPACE__ . '\register_block' ); From 0dd9d79508c4a1b3f1c848ad675343785ecb8dbb Mon Sep 17 00:00:00 2001 From: Luiz Kowalski Date: Thu, 28 Mar 2024 11:05:45 -0300 Subject: [PATCH 05/37] AI Featured Image: Add event tracking for generating, regenerating and using images (#36638) * Add event tracking to generate, regenerate and use image actions * Add placement property on the events so we can know from where the user triggered the image generation * changelog --- .../update-featured-image-add-event-tracking | 4 +++ .../components/featured-image/index.tsx | 25 ++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking diff --git a/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking b/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking new file mode 100644 index 0000000000000..f64938c4543c1 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +AI Featured Image: track events for generating, regenerating and using images diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx index bbd8e6f7b9260..69ba9c8598343 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx @@ -2,6 +2,7 @@ * External dependencies */ import { useImageGenerator } from '@automattic/jetpack-ai-client'; +import { useAnalytics } from '@automattic/jetpack-shared-extension-utils'; import { Button, Spinner } from '@wordpress/components'; import { useDispatch } from '@wordpress/data'; import { store as editorStore } from '@wordpress/editor'; @@ -16,6 +17,7 @@ import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library'; import AiAssistantModal from '../modal'; const FEATURED_IMAGE_FEATURE_NAME = 'featured-post-image'; +const JETPACK_SIDEBAR_PLACEMENT = 'jetpack-sidebar'; export default function FeaturedImage() { const { editPost } = useDispatch( editorStore ); @@ -24,6 +26,8 @@ export default function FeaturedImage() { const [ imageURL, setImageURL ] = useState( null ); const { generateImage } = useImageGenerator(); const { isLoading: isSavingToMediaLibrary, saveToMediaLibrary } = useSaveToMediaLibrary(); + const { tracks } = useAnalytics(); + const { recordEvent } = tracks; const postContent = usePostContent(); @@ -57,20 +61,35 @@ export default function FeaturedImage() { }, [ isFeaturedImageModalVisible, setIsFeaturedImageModalVisible ] ); const handleGenerate = useCallback( () => { + // track the generate image event + recordEvent( 'jetpack_ai_featured_image_generation_generate_image', { + placement: JETPACK_SIDEBAR_PLACEMENT, + } ); + toggleFeaturedImageModal(); processImageGeneration(); - }, [ toggleFeaturedImageModal, processImageGeneration ] ); + }, [ toggleFeaturedImageModal, processImageGeneration, recordEvent ] ); const handleRegenerate = useCallback( () => { + // track the regenerate image event + recordEvent( 'jetpack_ai_featured_image_generation_generate_another_image', { + placement: JETPACK_SIDEBAR_PLACEMENT, + } ); + processImageGeneration(); - }, [ processImageGeneration ] ); + }, [ processImageGeneration, recordEvent ] ); const handleAccept = useCallback( () => { + // track the accept/use image event + recordEvent( 'jetpack_ai_featured_image_generation_use_image', { + placement: JETPACK_SIDEBAR_PLACEMENT, + } ); + saveToMediaLibrary( imageURL ).then( image => { editPost( { featured_media: image.id } ); toggleFeaturedImageModal(); } ); - }, [ editPost, imageURL, saveToMediaLibrary, toggleFeaturedImageModal ] ); + }, [ editPost, imageURL, saveToMediaLibrary, toggleFeaturedImageModal, recordEvent ] ); const modalTitleWhenGenerating = __( 'Generating featured image…', 'jetpack' ); const modalTitleWhenDone = __( 'Featured Image Generation', 'jetpack' ); From 972ec8229a724e8f9ffc7e90945906759701587c Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Thu, 28 Mar 2024 15:16:37 +0100 Subject: [PATCH 06/37] Carousel: disable WordPress Core' Lightbox option (#36565) Fixes #32668 It's best to keep only one lightbox option, to avoid any confusion. Since Jetpack's Carousel feature currently offers more features, let's keep ours in favor of Core's for now. In the future, when core's lightbox option becomes more robust, we can consider deprecating Jetpack's Carousel feature altogether. --- .../changelog/fix-carousel-lightbox-disable | 4 +++ .../modules/carousel/jetpack-carousel.php | 29 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable diff --git a/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable b/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable new file mode 100644 index 0000000000000..c874fe587656a --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable @@ -0,0 +1,4 @@ +Significance: patch +Type: compat + +Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. diff --git a/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php b/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php index b486d3e99f19b..cac86b3a6d466 100644 --- a/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php +++ b/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php @@ -83,6 +83,9 @@ public function init() { $this->single_image_gallery_enabled = ! $this->maybe_disable_jp_carousel_single_images(); $this->single_image_gallery_enabled_media_file = $this->maybe_enable_jp_carousel_single_images_media_file(); + // Disable core lightbox when Carousel is enabled. + add_action( 'wp_theme_json_data_theme', array( $this, 'disable_core_lightbox' ) ); + if ( is_admin() ) { // Register the Carousel-related related settings. add_action( 'admin_init', array( $this, 'register_settings' ), 5 ); @@ -206,6 +209,32 @@ public function maybe_enable_jp_carousel_single_images_media_file() { return apply_filters( 'jp_carousel_load_for_images_linked_to_file', false ); } + /** + * Disable the "Lightbox" option offered in WordPress core + * whenever Jetpack's Carousel feature is enabled. + * + * @since $$next-version$$ + * + * @param WP_Theme_JSON_Data $theme_json Class to access and update theme.json data. + */ + public function disable_core_lightbox( $theme_json ) { + return $theme_json->update_with( + array( + 'version' => 2, + 'settings' => array( + 'blocks' => array( + 'core/image' => array( + 'lightbox' => array( + 'allowEditing' => false, + 'enabled' => false, + ), + ), + ), + ), + ) + ); + } + /** * Returns the value of the applied jp_carousel_asset_version filter * From 259a82145aae24ff31dad6f4b65cc5a889ff4d2a Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Thu, 28 Mar 2024 11:26:36 -0300 Subject: [PATCH 07/37] remove dead code on the use suggestion hook (#36625) --- .../remove-ai-assistant-hook-dead-code | 4 ++ .../use-suggestions-from-openai/index.js | 70 +------------------ 2 files changed, 5 insertions(+), 69 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code diff --git a/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code b/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code new file mode 100644 index 0000000000000..0c67209624ae9 --- /dev/null +++ b/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +AI Assistant: remove dead code from the suggestions hook diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js index 4dc31b60e01bf..5d6b5b9e84ef1 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js @@ -4,7 +4,7 @@ import { askQuestion } from '@automattic/jetpack-ai-client'; import { parse } from '@wordpress/blocks'; import { useSelect, useDispatch, dispatch } from '@wordpress/data'; -import { useEffect, useState, useRef } from '@wordpress/element'; +import { useState, useRef } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import debugFactory from 'debug'; /** @@ -50,75 +50,7 @@ const useSuggestionsFromOpenAI = ( { select( 'core/editor' ).getEditedPostAttribute( 'title' ) ); - //TODO: decide if we still want to load categories and tags now user is providing the prompt by default. - // If not the following can be removed. - let loading = false; - const categories = - useSelect( select => select( 'core/editor' ).getEditedPostAttribute( 'categories' ) ) || []; - - const categoryObjects = useSelect( - select => { - return categories - .map( categoryId => { - const category = select( 'core' ).getEntityRecord( 'taxonomy', 'category', categoryId ); - - if ( ! category ) { - // Data is not yet loaded - loading = true; - return; - } - - return category; - } ) - .filter( Boolean ); // Remove undefined values - }, - [ categories ] - ); - - const tags = - useSelect( select => select( 'core/editor' ).getEditedPostAttribute( 'tags' ), [] ) || []; - const tagObjects = useSelect( - select => { - return tags - .map( tagId => { - const tag = select( 'core' ).getEntityRecord( 'taxonomy', 'post_tag', tagId ); - - if ( ! tag ) { - // Data is not yet loaded - loading = true; - return; - } - - return tag; - } ) - .filter( Boolean ); // Remove undefined values - }, - [ tags ] - ); - - useEffect( () => { - setIsLoadingCategories( loading ); - - /* - * Returning a cleanup function that will stop - * the suggestion if it's still rolling. - */ - return () => { - if ( source?.current ) { - debug( 'Cleaning things up...' ); - source?.current?.close(); - } - }; - }, [ loading, source ] ); - const postId = useSelect( select => select( 'core/editor' ).getCurrentPostId() ); - // eslint-disable-next-line no-unused-vars - const categoryNames = categoryObjects - .filter( cat => cat.id !== 1 ) - .map( ( { name } ) => name ) - .join( ', ' ); - // eslint-disable-next-line no-unused-vars - const tagNames = tagObjects.map( ( { name } ) => name ).join( ', ' ); const getStreamedSuggestionFromOpenAI = async ( type, options = {} ) => { /* From 3d87c7a8fe53e3463661781f46f65ae9da9bd635 Mon Sep 17 00:00:00 2001 From: Kev Date: Thu, 28 Mar 2024 10:49:48 -0400 Subject: [PATCH 08/37] Google Embed blocks: make proportion values translatable (#36641) --- .../fix-google-embed-blocks-not-translatable-text | 4 ++++ .../jetpack/extensions/blocks/google-docs-embed/edit.js | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text diff --git a/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text b/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text new file mode 100644 index 0000000000000..7c1ebf3a129d8 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Google Embed blocks: make proportion values translatable diff --git a/projects/plugins/jetpack/extensions/blocks/google-docs-embed/edit.js b/projects/plugins/jetpack/extensions/blocks/google-docs-embed/edit.js index 0de159d107480..38894082ee6be 100644 --- a/projects/plugins/jetpack/extensions/blocks/google-docs-embed/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/google-docs-embed/edit.js @@ -141,9 +141,12 @@ const GsuiteBlockEdit = props => { }; const aspectRatios = [ - { label: 'Default', value: '' }, - { label: '100% - Show the whole document', value: 'ar-100' }, - { label: '50% - Show half of the document', value: 'ar-50' }, + // translators: default aspect ratio for the embedded Google document. + { label: __( 'Default', 'jetpack' ), value: '' }, + // translators: aspect ratio for the embedded Google document. + { label: __( '100% - Show the whole document', 'jetpack' ), value: 'ar-100' }, + // translators: aspect ratio for the embedded Google document. + { label: __( '50% - Show half of the document', 'jetpack' ), value: 'ar-50' }, ]; return ( From 977bd7741d994101b3a604f3564c99e01d28bbf8 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Thu, 28 Mar 2024 15:58:52 +0100 Subject: [PATCH 09/37] a4a: display warning modal when deactivating the plugin (#36523) * a4a: display warning modal when deactivating the plugin References: - pfunGA-sQ-p2#comment-1126 - 129-gh-automattic-for-agencies-dev * Adjust modal appearance * Set buttons font-weight * Set margins based on Figma designs --------- Co-authored-by: Renzo Canepa --- .../changelog/add-a4a-plugin-deactivationn | 4 + .../composer.json | 1 + .../composer.lock | 109 ++++++++++++++---- .../src/admin/deactivation-dialog.php | 83 +++++++++++++ .../class-automattic-for-agencies-client.php | 4 + 5 files changed, 179 insertions(+), 22 deletions(-) create mode 100644 projects/plugins/automattic-for-agencies-client/changelog/add-a4a-plugin-deactivationn create mode 100644 projects/plugins/automattic-for-agencies-client/src/admin/deactivation-dialog.php diff --git a/projects/plugins/automattic-for-agencies-client/changelog/add-a4a-plugin-deactivationn b/projects/plugins/automattic-for-agencies-client/changelog/add-a4a-plugin-deactivationn new file mode 100644 index 0000000000000..f411ce3e73f2f --- /dev/null +++ b/projects/plugins/automattic-for-agencies-client/changelog/add-a4a-plugin-deactivationn @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +General: add modal displayed when deactivating the plugin. diff --git a/projects/plugins/automattic-for-agencies-client/composer.json b/projects/plugins/automattic-for-agencies-client/composer.json index a94a2dfa180aa..003f8fc0584f1 100644 --- a/projects/plugins/automattic-for-agencies-client/composer.json +++ b/projects/plugins/automattic-for-agencies-client/composer.json @@ -10,6 +10,7 @@ "automattic/jetpack-config": "@dev", "automattic/jetpack-connection": "@dev", "automattic/jetpack-identity-crisis": "@dev", + "automattic/jetpack-plugin-deactivation": "@dev", "automattic/jetpack-plugins-installer": "@dev", "automattic/jetpack-sync": "@dev" }, diff --git a/projects/plugins/automattic-for-agencies-client/composer.lock b/projects/plugins/automattic-for-agencies-client/composer.lock index de7ea45500d9d..cf0e87d73031b 100644 --- a/projects/plugins/automattic-for-agencies-client/composer.lock +++ b/projects/plugins/automattic-for-agencies-client/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": "84193362ebcb355342fa10fac4a2e0c1", + "content-hash": "e66cc876c2ac74a035fbe75e1887e010", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -712,6 +712,71 @@ "relative": true } }, + { + "name": "automattic/jetpack-plugin-deactivation", + "version": "dev-trunk", + "dist": { + "type": "path", + "url": "../../packages/plugin-deactivation", + "reference": "f79b33e19916f3efb0339e32af0936ccfa47d5cf" + }, + "require": { + "automattic/jetpack-assets": "@dev", + "php": ">=7.0" + }, + "require-dev": { + "automattic/jetpack-changelogger": "@dev", + "yoast/phpunit-polyfills": "1.1.0" + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + }, + "type": "jetpack-library", + "extra": { + "mirror-repo": "Automattic/jetpack-plugin-deactivation", + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-plugin-deactivation/compare/v${old}...v${new}" + }, + "autotagger": true, + "branch-alias": { + "dev-trunk": "0.2.x-dev" + }, + "textdomain": "jetpack-plugin-deactivation", + "version-constants": { + "::PACKAGE_VERSION": "src/class-deactivation-handler.php" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "phpunit": [ + "./vendor/phpunit/phpunit/phpunit --colors=always" + ], + "test-php": [ + "@composer phpunit" + ], + "build-development": [ + "pnpm run build" + ], + "build-production": [ + "NODE_ENV=production pnpm run build" + ], + "watch": [ + "Composer\\Config::disableProcessTimeout", + "pnpm run watch" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "description": "Ask for feedback while deactivating a plugin", + "transport-options": { + "relative": true + } + }, { "name": "automattic/jetpack-plugins-installer", "version": "dev-trunk", @@ -1350,16 +1415,16 @@ }, { "name": "mockery/mockery", - "version": "1.6.9", + "version": "1.6.11", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06" + "reference": "81a161d0b135df89951abd52296adf97deb0723d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", - "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "url": "https://api.github.com/repos/mockery/mockery/zipball/81a161d0b135df89951abd52296adf97deb0723d", + "reference": "81a161d0b135df89951abd52296adf97deb0723d", "shasum": "" }, "require": { @@ -1371,8 +1436,8 @@ "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.6.10", - "symplify/easy-coding-standard": "^12.0.8" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", "autoload": { @@ -1429,7 +1494,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2023-12-10T02:24:34+00:00" + "time": "2024-03-21T18:34:15+00:00" }, { "name": "myclabs/deep-copy", @@ -1987,16 +2052,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.17", + "version": "9.6.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", "shasum": "" }, "require": { @@ -2070,7 +2135,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.18" }, "funding": [ { @@ -2086,7 +2151,7 @@ "type": "tidelift" } ], - "time": "2024-02-23T13:14:51+00:00" + "time": "2024-03-21T12:07:32+00:00" }, { "name": "psr/container", @@ -3127,16 +3192,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -3148,7 +3213,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3169,8 +3234,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -3178,7 +3242,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -4117,6 +4181,7 @@ "automattic/jetpack-config": 20, "automattic/jetpack-connection": 20, "automattic/jetpack-identity-crisis": 20, + "automattic/jetpack-plugin-deactivation": 20, "automattic/jetpack-plugins-installer": 20, "automattic/jetpack-sync": 20, "automattic/jetpack-changelogger": 20 diff --git a/projects/plugins/automattic-for-agencies-client/src/admin/deactivation-dialog.php b/projects/plugins/automattic-for-agencies-client/src/admin/deactivation-dialog.php new file mode 100644 index 0000000000000..066721e936770 --- /dev/null +++ b/projects/plugins/automattic-for-agencies-client/src/admin/deactivation-dialog.php @@ -0,0 +1,83 @@ + +
+

+

+
+
+ + +
+ + diff --git a/projects/plugins/automattic-for-agencies-client/src/class-automattic-for-agencies-client.php b/projects/plugins/automattic-for-agencies-client/src/class-automattic-for-agencies-client.php index ca2c41cbb508c..5a62d3cfa3cd3 100644 --- a/projects/plugins/automattic-for-agencies-client/src/class-automattic-for-agencies-client.php +++ b/projects/plugins/automattic-for-agencies-client/src/class-automattic-for-agencies-client.php @@ -13,6 +13,7 @@ use Automattic\Jetpack\Connection\Initial_State as Connection_Initial_State; use Automattic\Jetpack\Connection\Manager as Connection_Manager; use Automattic\Jetpack\Connection\Rest_Authentication as Connection_Rest_Authentication; +use Automattic\Jetpack\Plugin_Deactivation\Deactivation_Handler; use Automattic\Jetpack\Sync\Data_Settings; /** @@ -34,6 +35,9 @@ public static function init() { // Add scripts and styles to our admin page. add_action( 'load-settings_page_' . AUTOMATTIC_FOR_AGENCIES_CLIENT_SLUG, array( static::class, 'load_scripts_styles' ) ); + + // Display a modal when trying to deactivate the plugin. + Deactivation_Handler::init( AUTOMATTIC_FOR_AGENCIES_CLIENT_SLUG, __DIR__ . '/admin/deactivation-dialog.php' ); } /** From edfdc5a0cd76b9bbaa0f480264f1e199a415dc31 Mon Sep 17 00:00:00 2001 From: Siddarthan Sarumathi Pandian Date: Thu, 28 Mar 2024 21:25:17 +0530 Subject: [PATCH 10/37] Social: Added shortcode and share urls helper functions (#36328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Social: init commit for displaying share urls. * changelog * Social: Add the shares shortcode. * Remove comment * Get rid of the namespace and added a custom filter hook. * make the strings translatable. * Cleanup doc comments. * Fix the markup and make it a list and document the filter. * Update the mark up and add the theme function. * Fix the return type in the PHPDoc. * Update class-social-shares.php Co-authored-by: Gergely Márk Juhász <36671565+gmjuhasz@users.noreply.github.com> --------- Co-authored-by: Paul Bunkham Co-authored-by: Gergely Márk Juhász <36671565+gmjuhasz@users.noreply.github.com> --- .../social/changelog/add-share-urls-templates | 4 + projects/plugins/social/composer.json | 3 + .../social/src/class-jetpack-social.php | 9 ++ .../social/src/class-social-shares.php | 119 ++++++++++++++++++ projects/plugins/social/src/utils.php | 15 +++ 5 files changed, 150 insertions(+) create mode 100644 projects/plugins/social/changelog/add-share-urls-templates create mode 100644 projects/plugins/social/src/class-social-shares.php create mode 100644 projects/plugins/social/src/utils.php diff --git a/projects/plugins/social/changelog/add-share-urls-templates b/projects/plugins/social/changelog/add-share-urls-templates new file mode 100644 index 0000000000000..e3d67d3f75774 --- /dev/null +++ b/projects/plugins/social/changelog/add-share-urls-templates @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Added functions to display share urls diff --git a/projects/plugins/social/composer.json b/projects/plugins/social/composer.json index 864de45b2317d..f6e4defc726ad 100644 --- a/projects/plugins/social/composer.json +++ b/projects/plugins/social/composer.json @@ -27,6 +27,9 @@ "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/utils.php" ] }, "scripts": { diff --git a/projects/plugins/social/src/class-jetpack-social.php b/projects/plugins/social/src/class-jetpack-social.php index 635c1c24b213c..47691a8c97241 100644 --- a/projects/plugins/social/src/class-jetpack-social.php +++ b/projects/plugins/social/src/class-jetpack-social.php @@ -123,6 +123,8 @@ function () { add_filter( 'jetpack_get_available_standalone_modules', array( $this, 'social_filter_available_modules' ), 10, 1 ); add_filter( 'plugin_action_links_' . JETPACK_SOCIAL_PLUGIN_FOLDER . '/jetpack-social.php', array( $this, 'add_settings_link' ) ); + + add_shortcode( 'jp_shares_shortcode', array( $this, 'add_shares_shortcode' ) ); } /** @@ -505,4 +507,11 @@ public function add_settings_link( $actions ) { $actions ); } + + /** + * Adds the shares shortcode. + */ + public function add_shares_shortcode() { + return Social_Shares::get_the_social_shares( get_the_ID() ); + } } diff --git a/projects/plugins/social/src/class-social-shares.php b/projects/plugins/social/src/class-social-shares.php new file mode 100644 index 0000000000000..c87b61f678b21 --- /dev/null +++ b/projects/plugins/social/src/class-social-shares.php @@ -0,0 +1,119 @@ +ID ?? 0; + } + + if ( empty( $post_id ) ) { + return array(); + } + + $shares = get_post_meta( $post_id, self::SOCIAL_SHARES_POST_META_KEY ); + + if ( empty( $shares ) ) { + return array(); + } + + $succesful_shares = array_filter( + $shares[0], + function ( $share ) { + return isset( $share['status'] ) && 'success' === $share['status']; + } + ); + + $shares_by_service = array(); + + foreach ( $succesful_shares as $share ) { + $service = $share['service']; + $timestamp = $share['timestamp']; + + if ( ! isset( $shares_by_service[ $service ] ) || $timestamp > $shares_by_service[ $service ]['timestamp'] ) { + $shares_by_service[ $service ] = $share; + } + } + return $shares_by_service; + } + + /** + * Return a html to display the social shares. + * + * @param int $post_id The Post ID. + * @return string Markup representing the social share links. + */ + public static function get_the_social_shares( $post_id = 0 ) { + $shares = self::get_social_shares( $post_id ); + + $html = ''; + } + + $html .= '
'; + /** + * Apply filters to the social shares data. + * + * @param string $html The html markup to display the shares. + * @param array $shares The social shares data. + * @param int $post_id The ID of the post being shared. + * @return array The modified $html markup. + */ + return apply_filters( + 'jp_social_shares', + $html, + $shares, + $post_id + ); + } + + /** + * Given a service identify, this returns the name suitable for display. + * + * @param string $service The name of the social connection provider in small case. + * @return string The display name of the social connection provider such as LinkedIn for linkein. + */ + public static function get_service_display_name( $service ) { + switch ( $service ) { + case 'facebook': + return 'Facebook'; + case 'linkedin': + return 'LinkedIn '; + case 'instagram-business': + return 'Instagram '; + case 'nextdoor': + return 'Nextdoor'; + case 'mastodon': + return 'Mastodon'; + case 'tumblr': + return 'Tumblr'; + default: + return $service; + } + } +} diff --git a/projects/plugins/social/src/utils.php b/projects/plugins/social/src/utils.php new file mode 100644 index 0000000000000..2257709ab1a54 --- /dev/null +++ b/projects/plugins/social/src/utils.php @@ -0,0 +1,15 @@ + Date: Thu, 28 Mar 2024 13:27:49 -0300 Subject: [PATCH 11/37] AI Featured Image: Improve UX on accepting image (#36643) --- .../changelog/update-set-ai-featured-image-ux | 4 + .../components/featured-image/index.tsx | 50 +++++++++++- .../hooks/use-save-to-media-library.ts | 77 +++++++++++++------ 3 files changed, 102 insertions(+), 29 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux diff --git a/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux b/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux new file mode 100644 index 0000000000000..a136382cea055 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Improve UX when setting AI Featured Image diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx index 69ba9c8598343..4f5060e3f08c5 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx @@ -4,8 +4,7 @@ import { useImageGenerator } from '@automattic/jetpack-ai-client'; import { useAnalytics } from '@automattic/jetpack-shared-extension-utils'; import { Button, Spinner } from '@wordpress/components'; -import { useDispatch } from '@wordpress/data'; -import { store as editorStore } from '@wordpress/editor'; +import { useDispatch, useSelect } from '@wordpress/data'; import { useCallback, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; /** @@ -20,7 +19,12 @@ const FEATURED_IMAGE_FEATURE_NAME = 'featured-post-image'; const JETPACK_SIDEBAR_PLACEMENT = 'jetpack-sidebar'; export default function FeaturedImage() { - const { editPost } = useDispatch( editorStore ); + const { toggleEditorPanelOpened: toggleEditorPanelOpenedFromEditPost } = + useDispatch( 'core/edit-post' ); + const { editPost, toggleEditorPanelOpened: toggleEditorPanelOpenedFromEditor } = + useDispatch( 'core/editor' ); + + const { enableComplementaryArea } = useDispatch( 'core/interface' ); const [ isFeaturedImageModalVisible, setIsFeaturedImageModalVisible ] = useState( false ); const [ generating, setGenerating ] = useState( false ); const [ imageURL, setImageURL ] = useState( null ); @@ -31,6 +35,19 @@ export default function FeaturedImage() { const postContent = usePostContent(); + // Handle deprecation and move of toggle action from edit-post. + // https://github.com/WordPress/gutenberg/blob/fe4d8cb936df52945c01c1863f7b87b58b7cc69f/packages/edit-post/CHANGELOG.md?plain=1#L19 + const toggleEditorPanelOpened = + toggleEditorPanelOpenedFromEditor ?? toggleEditorPanelOpenedFromEditPost; + const isEditorPanelOpened = useSelect( select => { + const isOpened = + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ( select( 'core/editor' ) as any ).isEditorPanelOpened ?? + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ( select( 'core/edit-post' ) as any ).isEditorPanelOpened; + return isOpened; + }, [] ); + /* * Function to generate a new image with the current value of the post content. */ @@ -79,6 +96,10 @@ export default function FeaturedImage() { processImageGeneration(); }, [ processImageGeneration, recordEvent ] ); + const triggerComplementaryArea = useCallback( () => { + enableComplementaryArea( 'core/edit-post', 'edit-post/document' ); + }, [ enableComplementaryArea ] ); + const handleAccept = useCallback( () => { // track the accept/use image event recordEvent( 'jetpack_ai_featured_image_generation_use_image', { @@ -88,8 +109,29 @@ export default function FeaturedImage() { saveToMediaLibrary( imageURL ).then( image => { editPost( { featured_media: image.id } ); toggleFeaturedImageModal(); + + // Open the featured image panel for users to see the new image. + setTimeout( () => { + // If the panel is not opened, open it and then trigger the complementary area. + if ( ! isEditorPanelOpened( 'featured-image' ) ) { + toggleEditorPanelOpened?.( 'featured-image' ).then( () => { + triggerComplementaryArea(); + } ); + } else { + triggerComplementaryArea(); + } + }, 500 ); } ); - }, [ editPost, imageURL, saveToMediaLibrary, toggleFeaturedImageModal, recordEvent ] ); + }, [ + editPost, + imageURL, + isEditorPanelOpened, + recordEvent, + saveToMediaLibrary, + toggleEditorPanelOpened, + toggleFeaturedImageModal, + triggerComplementaryArea, + ] ); const modalTitleWhenGenerating = __( 'Generating featured image…', 'jetpack' ); const modalTitleWhenDone = __( 'Featured Image Generation', 'jetpack' ); diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts index 9d006e3ff1554..16cb0ed1d5ab3 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/hooks/use-save-to-media-library.ts @@ -2,48 +2,75 @@ * External dependencies */ import { isBlobURL } from '@wordpress/blob'; -import { store as blockEditorStore } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; -import { useState } from 'react'; +import { useState } from '@wordpress/element'; +import debugFactory from 'debug'; /** * Types */ import type { BlockEditorStore } from '../../../blocks/ai-assistant/types'; +const debug = debugFactory( 'jetpack-ai-assistant-plugin:save-to-media-library' ); + export default function useSaveToMediaLibrary() { const [ isLoading, setIsLoading ] = useState( false ); - const { getSettings } = useSelect( blockEditorStore, [] ) as BlockEditorStore[ 'selectors' ]; + const { getSettings } = useSelect( + select => select( 'core/block-editor' ), + [] + ) as BlockEditorStore[ 'selectors' ]; const saveToMediaLibrary = ( url: string ): Promise< { id: string } > => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const settings = getSettings() as any; return new Promise( ( resolve, reject ) => { - fetch( url ).then( response => { - response.blob().then( ( blob: Blob ) => { - const filesList = [ blob ]; - settings.mediaUpload( { - allowedTypes: [ 'image' ], - filesList, - onFileChange( [ image ] ) { - if ( isBlobURL( image?.url ) ) { - setIsLoading( true ); - return; - } - - if ( image ) { - resolve( image ); - } + setIsLoading( true ); + + debug( 'Fetching image from URL' ); + + fetch( url ) + .then( response => { + debug( 'Transforming response to blob' ); + + response + .blob() + .then( ( blob: Blob ) => { + debug( 'Uploading blob to media library' ); + + const filesList = [ blob ]; + settings.mediaUpload( { + allowedTypes: [ 'image' ], + filesList, + onFileChange( [ image ] ) { + if ( isBlobURL( image?.url ) ) { + return; + } + + if ( image ) { + debug( 'Image uploaded to media library' ); + resolve( image ); + } + setIsLoading( false ); + }, + onError( message ) { + debug( 'Error uploading image to media library:', message ); + reject( message ); + setIsLoading( false ); + }, + } ); + } ) + .catch( e => { + debug( 'Error transforming response to blob:', e?.message ); + reject( e?.message ); setIsLoading( false ); - }, - onError( message ) { - // TODO: Handle error - reject( message ); - }, - } ); + } ); + } ) + .catch( e => { + debug( 'Error fetching image from URL:', e?.message ); + reject( e?.message ); + setIsLoading( false ); } ); - } ); } ); }; From 3c4c16b8e9b34c8b6e798839ddf029a5c9a59e77 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 28 Mar 2024 16:38:35 -0400 Subject: [PATCH 12/37] tools: Add a plugin readme validation tool (#36468) Unfortunately we have to screen-scrape the HTML output of the w.org validator, because there's no API, the validation itself is buried inside a custom plugin, and some of the validation queries the database of the plugin repository itself. --- tools/validate-plugin-readme.php | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100755 tools/validate-plugin-readme.php diff --git a/tools/validate-plugin-readme.php b/tools/validate-plugin-readme.php new file mode 100755 index 0000000000000..1668aaaa207e3 --- /dev/null +++ b/tools/validate-plugin-readme.php @@ -0,0 +1,94 @@ +#!/usr/bin/env php +', $argv[0] ); + exit( 1 ); +} + +$readme = file_get_contents( $argv[1] ); +if ( ! $readme ) { + printErr( 'Failed to read %s', $argv[1] ); + exit( 1 ); +} + +$response = ''; +$curl = curl_init(); +curl_setopt_array( + $curl, + array( + CURLOPT_URL => 'https://wordpress.org/plugins/developers/readme-validator/', + CURLOPT_WRITEFUNCTION => function ( $ch, $data ) use ( &$response ) { + $response .= $data; + return strlen( $data ); + }, + CURLOPT_FAILONERROR => true, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 30, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_POST => 1, + CURLOPT_POSTFIELDS => array( + 'readme' => '', + 'readme_contents' => base64_encode( $readme ), + ), + ) +); + +if ( ! curl_exec( $curl ) || curl_getinfo( $curl, CURLINFO_RESPONSE_CODE ) >= 400 ) { + printErr( 'Failed to query validator' ); + echo $response; + exit( 1 ); +} + +$doc = new DOMDocument(); +$doc->loadHTML( $response, LIBXML_NOERROR ); +$xpath = new DOMXPath( $doc ); + +if ( $xpath->query( "//div[contains(@class,'notice-success')]" )->length > 0 ) { + echo "No issues found!\n"; + exit( 0 ); +} + +$ignore = array( + 'The following tags are not widely used: ', + 'No == Upgrade Notice == section was found', + 'No donate link was found', +); + +$any = false; +$anyatall = false; +foreach ( array( 'errors', 'warnings', 'notes' ) as $class ) { + foreach ( $xpath->evaluate( "//ul[contains(@class,'$class')]/li" ) as $n ) { + $anyatall = true; + $v = $xpath->evaluate( 'string(.)', $n ); + if ( ! in_array( $v, $ignore, true ) ) { + $any = true; + echo "$v\n"; + } + } +} +if ( ! $any ) { + echo "No issues found!\n"; +} +if ( ! $anyatall ) { + echo "(something may be wrong, found neither issues nor the success message)\n"; +} From 0e84eb40abc0c6f438c1b5db6c132173ad140040 Mon Sep 17 00:00:00 2001 From: bindlegirl <1242807+bindlegirl@users.noreply.github.com> Date: Fri, 29 Mar 2024 01:25:45 +0100 Subject: [PATCH 13/37] Packages: add version tracking for idc package (#36635) --- .../add-idc-package-version-tracking | 4 ++ .../src/class-identity-crisis.php | 21 +++++++++ .../tests/php/test-package-version.php | 46 +++++++++++++++++++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ .../add-idc-package-version-tracking | 4 ++ .../add-idc-package-version-tracking#2 | 5 ++ 23 files changed, 161 insertions(+) create mode 100644 projects/packages/identity-crisis/changelog/add-idc-package-version-tracking create mode 100644 projects/packages/identity-crisis/tests/php/test-package-version.php create mode 100644 projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/backup/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/backup/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/boost/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/boost/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/jetpack/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/migration/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/migration/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/protect/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/protect/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/search/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/search/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/social/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/social/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking#2 create mode 100644 projects/plugins/videopress/changelog/add-idc-package-version-tracking create mode 100644 projects/plugins/videopress/changelog/add-idc-package-version-tracking#2 diff --git a/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking b/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..fa71d5bb57ff5 --- /dev/null +++ b/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: added version tracking for identity-crisis. diff --git a/projects/packages/identity-crisis/src/class-identity-crisis.php b/projects/packages/identity-crisis/src/class-identity-crisis.php index b32928d48aece..64e4bc8ee573c 100644 --- a/projects/packages/identity-crisis/src/class-identity-crisis.php +++ b/projects/packages/identity-crisis/src/class-identity-crisis.php @@ -28,6 +28,11 @@ class Identity_Crisis { */ const PACKAGE_VERSION = '0.18.0-alpha'; + /** + * Package Slug + */ + const PACKAGE_SLUG = 'identity-crisis'; + /** * Persistent WPCOM blog ID that stays in the options after disconnect. */ @@ -98,6 +103,9 @@ private function __construct() { add_filter( 'jetpack_register_request_body', array( static::class, 'register_request_body' ) ); add_action( 'jetpack_site_registered', array( static::class, 'site_registered' ) ); + // Set up package version hook. + add_filter( 'jetpack_package_versions', array( static::class, 'send_package_version_to_tracker' ) ); + $urls_in_crisis = self::check_identity_crisis(); if ( false === $urls_in_crisis ) { return; @@ -107,6 +115,19 @@ private function __construct() { add_action( 'init', array( $this, 'wordpress_init' ) ); } + /** + * Adds the package slug and version to the package version tracker's data. + * + * @param array $package_versions The package version array. + * + * @return array The package version array. + */ + public static function send_package_version_to_tracker( $package_versions ) { + $package_versions[ self::PACKAGE_SLUG ] = self::PACKAGE_VERSION; + + return $package_versions; + } + /** * Disconnect current connection and clear IDC options. */ diff --git a/projects/packages/identity-crisis/tests/php/test-package-version.php b/projects/packages/identity-crisis/tests/php/test-package-version.php new file mode 100644 index 0000000000000..2f269fb895587 --- /dev/null +++ b/projects/packages/identity-crisis/tests/php/test-package-version.php @@ -0,0 +1,46 @@ + Identity_Crisis::PACKAGE_VERSION, + ); + + $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', array() ) ); + } + + /** + * Tests that the identity-crisis package version is added to the package versions array obtained by the + * Package_Version_Tracker. + */ + public function test_send_package_version_to_tracker_existing_array() { + $existing_array = array( + 'test-package-slug' => '1.0.0', + ); + + $expected = array_merge( + $existing_array, + array( Identity_Crisis::PACKAGE_SLUG => Identity_Crisis::PACKAGE_VERSION ) + ); + + add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Identity_Crisis::send_package_version_to_tracker' ); + + $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', $existing_array ) ); + } +} diff --git a/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking b/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking#2 b/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/automattic-for-agencies-client/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/backup/changelog/add-idc-package-version-tracking b/projects/plugins/backup/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/backup/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/backup/changelog/add-idc-package-version-tracking#2 b/projects/plugins/backup/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/backup/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/boost/changelog/add-idc-package-version-tracking b/projects/plugins/boost/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/boost/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 b/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..9c0f65a3721e9 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..a1c1831fa1ef7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Updated composer.lock. + + diff --git a/projects/plugins/migration/changelog/add-idc-package-version-tracking b/projects/plugins/migration/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/migration/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/migration/changelog/add-idc-package-version-tracking#2 b/projects/plugins/migration/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/migration/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/protect/changelog/add-idc-package-version-tracking b/projects/plugins/protect/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/protect/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/protect/changelog/add-idc-package-version-tracking#2 b/projects/plugins/protect/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/protect/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/search/changelog/add-idc-package-version-tracking b/projects/plugins/search/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/search/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/search/changelog/add-idc-package-version-tracking#2 b/projects/plugins/search/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/search/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/social/changelog/add-idc-package-version-tracking b/projects/plugins/social/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/social/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/social/changelog/add-idc-package-version-tracking#2 b/projects/plugins/social/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/social/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking b/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking#2 b/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/starter-plugin/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/videopress/changelog/add-idc-package-version-tracking b/projects/plugins/videopress/changelog/add-idc-package-version-tracking new file mode 100644 index 0000000000000..2801f40a5c5ac --- /dev/null +++ b/projects/plugins/videopress/changelog/add-idc-package-version-tracking @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/videopress/changelog/add-idc-package-version-tracking#2 b/projects/plugins/videopress/changelog/add-idc-package-version-tracking#2 new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/videopress/changelog/add-idc-package-version-tracking#2 @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + From b7a2c86514b58214dc85f5915621f1d2c51729a1 Mon Sep 17 00:00:00 2001 From: Griffith Chen Date: Fri, 29 Mar 2024 14:18:44 +0800 Subject: [PATCH 14/37] Phan: Add stub for wordpress functions (#36627) --- .phan/config.base.php | 1 + .phan/stubs/wpcom-functions.php | 13 +++++++++++++ projects/packages/blaze/.phan/baseline.php | 2 +- .../changelog/add-phan-stub-wordpress-functions | 4 ++++ projects/packages/blaze/package.json | 2 +- projects/packages/blaze/src/class-dashboard.php | 2 +- .../packages/jetpack-mu-wpcom/.phan/baseline.php | 7 +++---- .../changelog/add-phan-stub-wordpress-functions | 4 ++++ projects/packages/my-jetpack/.phan/baseline.php | 2 +- .../changelog/add-phan-stub-wordpress-functions | 4 ++++ projects/packages/stats-admin/.phan/baseline.php | 2 +- .../changelog/add-phan-stub-wordpress-functions | 4 ++++ projects/plugins/jetpack/.phan/baseline.php | 2 +- .../class-wpcom-rest-api-v2-endpoint-admin-menu.php | 2 -- .../changelog/add-phan-stub-wordpress-functions | 4 ++++ 15 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 .phan/stubs/wpcom-functions.php create mode 100644 projects/packages/blaze/changelog/add-phan-stub-wordpress-functions create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions create mode 100644 projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions create mode 100644 projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions create mode 100644 projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions diff --git a/.phan/config.base.php b/.phan/config.base.php index 5a1e42b129014..aed10a22d1dc6 100644 --- a/.phan/config.base.php +++ b/.phan/config.base.php @@ -95,6 +95,7 @@ function make_phan_config( $dir, $options = array() ) { "$root/vendor/php-stubs/wp-cli-stubs/wp-cli-commands-stubs.php", "$root/vendor/php-stubs/wp-cli-stubs/wp-cli-i18n-stubs.php", "$root/.phan/stubs/wordpress-constants.php", + "$root/.phan/stubs/wpcom-functions.php", ) : array(), $options['file_list'], $options['parse_file_list'] diff --git a/.phan/stubs/wpcom-functions.php b/.phan/stubs/wpcom-functions.php new file mode 100644 index 0000000000000..65d8b45d0de85 --- /dev/null +++ b/.phan/stubs/wpcom-functions.php @@ -0,0 +1,13 @@ + ['PhanNoopNew', 'PhanUndeclaredConstant', 'PhanUndeclaredFunction'], 'src/features/100-year-plan/enhanced-ownership.php' => ['PhanEmptyFQSENInCallable', 'PhanUndeclaredClassConstant', 'PhanUndeclaredFunction'], 'src/features/100-year-plan/locked-mode.php' => ['PhanEmptyFQSENInCallable', 'PhanUndeclaredClassConstant', 'PhanUndeclaredFunction'], - 'src/features/admin-color-schemes/admin-color-schemes.php' => ['PhanUndeclaredConstant', 'PhanUndeclaredFunction'], + 'src/features/admin-color-schemes/admin-color-schemes.php' => ['PhanUndeclaredConstant'], 'src/features/block-patterns/block-patterns.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredTypeParameter'], 'src/features/block-patterns/class-wpcom-block-patterns-from-api.php' => ['PhanRedundantConditionInLoop'], 'src/features/block-patterns/class-wpcom-block-patterns-utils.php' => ['PhanTypeMismatchReturnNullable', 'PhanUndeclaredFunction'], - 'src/features/block-theme-previews/block-theme-previews.php' => ['PhanUndeclaredFunction'], 'src/features/coming-soon/coming-soon.php' => ['PhanTypeArraySuspicious', 'PhanTypeMismatchArgumentInternal', 'PhanUndeclaredFunction', 'PhanUndeclaredFunctionInCallable'], 'src/features/coming-soon/fallback-coming-soon-page.php' => ['PhanTypeMismatchArgument', 'PhanTypeVoidArgument', 'PhanUndeclaredFunction'], 'src/features/error-reporting/error-reporting.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanUndeclaredFunction'], @@ -73,7 +72,7 @@ 'src/features/wpcom-command-palette/wpcom-command-palette.php' => ['PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'], 'src/features/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-launchpad.php' => ['PhanPluginDuplicateConditionalNullCoalescing'], 'src/features/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-site-migration-migrate-guru-key.php' => ['PhanUndeclaredClassMethod'], - 'src/features/wpcom-site-menu/wpcom-site-menu.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredClassInCallable', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction', 'PhanUndeclaredFunctionInCallable'], + 'src/features/wpcom-site-menu/wpcom-site-menu.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredClassInCallable', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunctionInCallable'], 'src/utils.php' => ['PhanUndeclaredClassMethod', 'PhanUndeclaredClassReference'], 'tests/lib/functions-wordpress.php' => ['PhanRedefineFunction'], 'tests/php/features/block-patterns/class-wpcom-block-patterns-from-api-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanUndeclaredClassMethod', 'PhanUndeclaredTypeReturnType'], diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions b/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions new file mode 100644 index 0000000000000..6ba42305f6abc --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Change Phan baselines. diff --git a/projects/packages/my-jetpack/.phan/baseline.php b/projects/packages/my-jetpack/.phan/baseline.php index a379446dfd959..5c1ae9542fcb8 100644 --- a/projects/packages/my-jetpack/.phan/baseline.php +++ b/projects/packages/my-jetpack/.phan/baseline.php @@ -20,11 +20,11 @@ // PhanNoopNew : 6 occurrences // PhanUndeclaredStaticProperty : 6 occurrences // PhanPluginDuplicateConditionalNullCoalescing : 5 occurrences - // PhanTypeMismatchArgument : 4 occurrences // PhanUndeclaredTypeParameter : 4 occurrences // PhanUndeclaredTypeReturnType : 4 occurrences // PhanUnextractableAnnotation : 4 occurrences // PhanTypeArraySuspicious : 3 occurrences + // PhanTypeMismatchArgument : 3 occurrences // PhanTypeMismatchReturnNullable : 3 occurrences // PhanImpossibleCondition : 2 occurrences // PhanNonClassMethodCall : 2 occurrences diff --git a/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions b/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions new file mode 100644 index 0000000000000..6ba42305f6abc --- /dev/null +++ b/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Change Phan baselines. diff --git a/projects/packages/stats-admin/.phan/baseline.php b/projects/packages/stats-admin/.phan/baseline.php index 62e8b499f4e17..50beeaffa937d 100644 --- a/projects/packages/stats-admin/.phan/baseline.php +++ b/projects/packages/stats-admin/.phan/baseline.php @@ -12,7 +12,7 @@ // PhanUndeclaredClassMethod : 60+ occurrences // PhanUndeclaredTypeParameter : 20+ occurrences // PhanTypeMismatchReturn : 8 occurrences - // PhanTypeMismatchArgumentProbablyReal : 6 occurrences + // PhanTypeMismatchArgumentProbablyReal : 7 occurrences // PhanPluginDuplicateConditionalNullCoalescing : 4 occurrences // PhanTypeMismatchReturnProbablyReal : 2 occurrences // PhanTypeMismatchArgument : 1 occurrence diff --git a/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions b/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions new file mode 100644 index 0000000000000..6ba42305f6abc --- /dev/null +++ b/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Change Phan baselines. diff --git a/projects/plugins/jetpack/.phan/baseline.php b/projects/plugins/jetpack/.phan/baseline.php index ff8d4a34b14c1..264c285439c69 100644 --- a/projects/plugins/jetpack/.phan/baseline.php +++ b/projects/plugins/jetpack/.phan/baseline.php @@ -412,7 +412,7 @@ 'modules/likes/jetpack-likes-master-iframe.php' => ['PhanPluginDuplicateConditionalNullCoalescing'], 'modules/likes/jetpack-likes-settings.php' => ['PhanDeprecatedFunction', 'PhanRedundantCondition'], 'modules/markdown/easy-markdown.php' => ['PhanParamTooMany', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], - 'modules/masterbar.php' => ['PhanNoopNew', 'PhanUndeclaredFunction'], + 'modules/masterbar.php' => ['PhanNoopNew'], 'modules/masterbar/admin-menu/class-admin-menu.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'], 'modules/masterbar/admin-menu/class-atomic-admin-menu.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMissingReturn', 'PhanUndeclaredFunctionInCallable'], 'modules/masterbar/admin-menu/class-base-admin-menu.php' => ['PhanEmptyFQSENInCallable', 'PhanParamTooMany', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInstantiateAbstract', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], diff --git a/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-admin-menu.php b/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-admin-menu.php index 5edd924f2b3d6..77d183d1a1510 100644 --- a/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-admin-menu.php +++ b/projects/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-admin-menu.php @@ -83,8 +83,6 @@ public function get_item_permissions_check( $request ) { // phpcs:ignore Generic * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_item( $request ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable - - // @phan-suppress-next-line PhanUndeclaredFunction if ( ! function_exists( 'wpcom_is_nav_redesign_enabled' ) || ! wpcom_is_nav_redesign_enabled() ) { require_once JETPACK__PLUGIN_DIR . '/modules/masterbar/admin-menu/load.php'; } diff --git a/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions b/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions new file mode 100644 index 0000000000000..c671a72e7351c --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Add Phan stub for wordpress functions. From 1dfa4bead12f14d34a79904b12a67bb8c6d587a9 Mon Sep 17 00:00:00 2001 From: Candy Tsai Date: Fri, 29 Mar 2024 15:43:52 +0800 Subject: [PATCH 15/37] Add configs for simple classic to load odyssey stats (#36633) * Add configs for simple classic to load odyssey stats * changelog * Set the correct value for jetpack * Update unit test * Update unit test to check for is_running_in_jetpack_site --------- Co-authored-by: DustyReagan --- .../stats-admin/changelog/update-odyssey-stats-config | 4 ++++ .../stats-admin/src/class-odyssey-config-data.php | 8 ++++++-- .../stats-admin/tests/php/test-odyssey-config-data.php | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 projects/packages/stats-admin/changelog/update-odyssey-stats-config diff --git a/projects/packages/stats-admin/changelog/update-odyssey-stats-config b/projects/packages/stats-admin/changelog/update-odyssey-stats-config new file mode 100644 index 0000000000000..84ef80e032af8 --- /dev/null +++ b/projects/packages/stats-admin/changelog/update-odyssey-stats-config @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Add config fields for odyssey stats to be loaded in Simple Site Classic. diff --git a/projects/packages/stats-admin/src/class-odyssey-config-data.php b/projects/packages/stats-admin/src/class-odyssey-config-data.php index 7e99cb7bf2314..303d76f1b639e 100644 --- a/projects/packages/stats-admin/src/class-odyssey-config-data.php +++ b/projects/packages/stats-admin/src/class-odyssey-config-data.php @@ -57,7 +57,9 @@ public function get_data() { 'site_name' => \get_bloginfo( 'name' ), 'sections' => array(), // Features are inlined @see https://github.com/Automattic/wp-calypso/pull/70122 - 'features' => array(), + 'features' => array( + 'is_running_in_jetpack_site' => ! $host->is_wpcom_simple(), + ), // Intended for apps that do not use redux. 'gmt_offset' => $this->get_gmt_offset(), 'odyssey_stats_base_url' => admin_url( 'admin.php?page=stats' ), @@ -77,7 +79,8 @@ public function get_data() { "$blog_id" => array( 'ID' => $blog_id, 'URL' => site_url(), - 'jetpack' => true, + // Atomic and jetpack sites should return true. + 'jetpack' => ! $host->is_wpcom_simple(), 'visible' => true, 'capabilities' => $this->get_current_user_capabilities(), 'products' => Jetpack_Plan::get_products(), @@ -88,6 +91,7 @@ public function get_data() { 'gmt_offset' => $this->get_gmt_offset(), 'is_automated_transfer' => $this->is_automated_transfer( $blog_id ), 'is_wpcom_atomic' => $host->is_woa_site(), + 'is_wpcom_simple' => $host->is_wpcom_simple(), 'is_vip' => $host->is_vip_site(), 'jetpack_version' => defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '', 'stats_admin_version' => Main::VERSION, diff --git a/projects/packages/stats-admin/tests/php/test-odyssey-config-data.php b/projects/packages/stats-admin/tests/php/test-odyssey-config-data.php index 18598993168c8..630882535bc7a 100644 --- a/projects/packages/stats-admin/tests/php/test-odyssey-config-data.php +++ b/projects/packages/stats-admin/tests/php/test-odyssey-config-data.php @@ -42,6 +42,6 @@ public function test_config_data() { $this->assertArrayHasKey( 'nonce', $data ); $this->assertArrayHasKey( 'site_name', $data ); $this->assertArrayHasKey( 'intial_state', $data ); - $this->assertEmpty( $data['features'] ); + $this->assertArrayHasKey( 'is_running_in_jetpack_site', $data['features'] ); } } From b542d777003c479b0f31c13438c7ba136eca13c5 Mon Sep 17 00:00:00 2001 From: bindlegirl <1242807+bindlegirl@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:26:46 +0100 Subject: [PATCH 16/37] Stats: add package version to composer (#36657) --- .../packages/stats/changelog/add-version-constant-composer | 4 ++++ projects/packages/stats/composer.json | 3 +++ .../plugins/jetpack/changelog/add-version-constant-composer | 5 +++++ projects/plugins/jetpack/composer.lock | 5 ++++- .../plugins/search/changelog/add-version-constant-composer | 5 +++++ projects/plugins/search/composer.lock | 5 ++++- 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 projects/packages/stats/changelog/add-version-constant-composer create mode 100644 projects/plugins/jetpack/changelog/add-version-constant-composer create mode 100644 projects/plugins/search/changelog/add-version-constant-composer diff --git a/projects/packages/stats/changelog/add-version-constant-composer b/projects/packages/stats/changelog/add-version-constant-composer new file mode 100644 index 0000000000000..b75a4925c121f --- /dev/null +++ b/projects/packages/stats/changelog/add-version-constant-composer @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Composer: added version constant for ststs package. diff --git a/projects/packages/stats/composer.json b/projects/packages/stats/composer.json index 4f1ecf43eecb9..24529c2f7d023 100644 --- a/projects/packages/stats/composer.json +++ b/projects/packages/stats/composer.json @@ -46,6 +46,9 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-stats", + "version-constants": { + "::PACKAGE_VERSION": "src/class-package-version.php" + }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-stats/compare/v${old}...v${new}" }, diff --git a/projects/plugins/jetpack/changelog/add-version-constant-composer b/projects/plugins/jetpack/changelog/add-version-constant-composer new file mode 100644 index 0000000000000..a1c1831fa1ef7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-version-constant-composer @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Updated composer.lock. + + diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 914b2a487323f..3b2aafcbaa7f6 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -2265,7 +2265,7 @@ "dist": { "type": "path", "url": "../../packages/stats", - "reference": "c3085980c8bf62c83110babfb35b1a56a7690a9a" + "reference": "a73f14c137cb5bfa1ed40ff0927573261dee3d1b" }, "require": { "automattic/jetpack-connection": "@dev", @@ -2285,6 +2285,9 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-stats", + "version-constants": { + "::PACKAGE_VERSION": "src/class-package-version.php" + }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-stats/compare/v${old}...v${new}" }, diff --git a/projects/plugins/search/changelog/add-version-constant-composer b/projects/plugins/search/changelog/add-version-constant-composer new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/search/changelog/add-version-constant-composer @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index b815361065448..34b40103da769 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -1431,7 +1431,7 @@ "dist": { "type": "path", "url": "../../packages/stats", - "reference": "c3085980c8bf62c83110babfb35b1a56a7690a9a" + "reference": "a73f14c137cb5bfa1ed40ff0927573261dee3d1b" }, "require": { "automattic/jetpack-connection": "@dev", @@ -1451,6 +1451,9 @@ "extra": { "autotagger": true, "mirror-repo": "Automattic/jetpack-stats", + "version-constants": { + "::PACKAGE_VERSION": "src/class-package-version.php" + }, "changelogger": { "link-template": "https://github.com/Automattic/jetpack-stats/compare/v${old}...v${new}" }, From 9c41a3fa579710002bdfadd937eba4960a57f832 Mon Sep 17 00:00:00 2001 From: bindlegirl <1242807+bindlegirl@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:29:19 +0100 Subject: [PATCH 17/37] Tests: moved couple of idc package tests to a main tests file (#36656) --- .../changelog/fix-idc-tests-cleanup | 4 ++ .../tests/php/test-identity-crisis.php | 33 +++++++++++++ .../tests/php/test-package-version.php | 46 ------------------- 3 files changed, 37 insertions(+), 46 deletions(-) create mode 100644 projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup delete mode 100644 projects/packages/identity-crisis/tests/php/test-package-version.php diff --git a/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup b/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup new file mode 100644 index 0000000000000..0b425be575f6a --- /dev/null +++ b/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Tests: moved tests from a separate files to the main tests file. diff --git a/projects/packages/identity-crisis/tests/php/test-identity-crisis.php b/projects/packages/identity-crisis/tests/php/test-identity-crisis.php index 7815c940d2148..af434aaa3220e 100644 --- a/projects/packages/identity-crisis/tests/php/test-identity-crisis.php +++ b/projects/packages/identity-crisis/tests/php/test-identity-crisis.php @@ -1110,4 +1110,37 @@ public function testAddIPRequesterForIdc() { $this->assertNotContains( $expected_ip3, $ip ); } } + + /** + * Tests that the identity-crisis package version is added to the package versions array obtained by the + * Package_Version_Tracker. + */ + public function test_send_package_version_to_tracker_empty_array() { + Identity_Crisis::init(); + + $expected = array( + Identity_Crisis::PACKAGE_SLUG => Identity_Crisis::PACKAGE_VERSION, + ); + + $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', array() ) ); + } + + /** + * Tests that the identity-crisis package version is added to the package versions array obtained by the + * Package_Version_Tracker. + */ + public function test_send_package_version_to_tracker_existing_array() { + $existing_array = array( + 'test-package-slug' => '1.0.0', + ); + + $expected = array_merge( + $existing_array, + array( Identity_Crisis::PACKAGE_SLUG => Identity_Crisis::PACKAGE_VERSION ) + ); + + add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Identity_Crisis::send_package_version_to_tracker' ); + + $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', $existing_array ) ); + } } diff --git a/projects/packages/identity-crisis/tests/php/test-package-version.php b/projects/packages/identity-crisis/tests/php/test-package-version.php deleted file mode 100644 index 2f269fb895587..0000000000000 --- a/projects/packages/identity-crisis/tests/php/test-package-version.php +++ /dev/null @@ -1,46 +0,0 @@ - Identity_Crisis::PACKAGE_VERSION, - ); - - $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', array() ) ); - } - - /** - * Tests that the identity-crisis package version is added to the package versions array obtained by the - * Package_Version_Tracker. - */ - public function test_send_package_version_to_tracker_existing_array() { - $existing_array = array( - 'test-package-slug' => '1.0.0', - ); - - $expected = array_merge( - $existing_array, - array( Identity_Crisis::PACKAGE_SLUG => Identity_Crisis::PACKAGE_VERSION ) - ); - - add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Identity_Crisis::send_package_version_to_tracker' ); - - $this->assertSame( $expected, apply_filters( 'jetpack_package_versions', $existing_array ) ); - } -} From 395b973b48aba7902e80fa237fb3af50bcc99894 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Fri, 29 Mar 2024 11:34:29 -0300 Subject: [PATCH 18/37] AI Client: fix change handler (#36651) * remove effect reverting value changes * add watch option --- .../changelog/fix-ai-client-change-handler | 4 ++++ projects/js-packages/ai-client/package.json | 3 ++- .../ai-client/src/components/ai-control/index.tsx | 13 ++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 projects/js-packages/ai-client/changelog/fix-ai-client-change-handler diff --git a/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler b/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler new file mode 100644 index 0000000000000..e221a91b4e394 --- /dev/null +++ b/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +AI Client: fix a bug where quick prompts would not work after getting suggested content diff --git a/projects/js-packages/ai-client/package.json b/projects/js-packages/ai-client/package.json index a332d155d4087..1cd6883510045 100644 --- a/projects/js-packages/ai-client/package.json +++ b/projects/js-packages/ai-client/package.json @@ -18,7 +18,8 @@ "build": "pnpm run clean && pnpm run compile-ts", "clean": "rm -rf build/", "compile-ts": "tsc --pretty", - "test": "NODE_OPTIONS=--experimental-vm-modules jest" + "test": "NODE_OPTIONS=--experimental-vm-modules jest", + "watch": "tsc --watch --pretty" }, "type": "module", "devDependencies": { diff --git a/projects/js-packages/ai-client/src/components/ai-control/index.tsx b/projects/js-packages/ai-client/src/components/ai-control/index.tsx index 739bf50faa55d..0f99c97f84e92 100644 --- a/projects/js-packages/ai-client/src/components/ai-control/index.tsx +++ b/projects/js-packages/ai-client/src/components/ai-control/index.tsx @@ -8,8 +8,8 @@ import { useImperativeHandle, useRef, useEffect, useCallback } from '@wordpress/ import { __ } from '@wordpress/i18n'; import { Icon, closeSmall, check, arrowUp, trash, reusableBlock } from '@wordpress/icons'; import classNames from 'classnames'; -import { forwardRef } from 'react'; -import React from 'react'; +import debugFactory from 'debug'; +import React, { forwardRef } from 'react'; /** * Internal dependencies */ @@ -45,6 +45,8 @@ type AiControlProps = { // eslint-disable-next-line @typescript-eslint/no-empty-function const noop = () => {}; +const debug = debugFactory( 'jetpack-ai-client:ai-control' ); + /** * AI Control component. * @@ -84,11 +86,7 @@ export function AIControl( if ( editRequest ) { promptUserInputRef?.current?.focus(); } - - if ( ! editRequest && lastValue !== null && value !== lastValue ) { - onChange?.( lastValue ); - } - }, [ editRequest, lastValue, value ] ); + }, [ editRequest ] ); const sendRequest = useCallback( () => { setLastValue( value ); @@ -119,6 +117,7 @@ export function AIControl( }, [] ); const cancelEdit = useCallback( () => { + debug( 'cancelEdit, revert to last value', lastValue ); onChange( lastValue || '' ); setEditRequest( false ); }, [ lastValue ] ); From db0b2ea66be8266575e2cf813db7be9a9d3e304a Mon Sep 17 00:00:00 2001 From: Renato Augusto Gama dos Santos Date: Fri, 29 Mar 2024 12:06:34 -0300 Subject: [PATCH 19/37] AI Featured Image: Disable button if requires upgrade or no post content (#36653) --- .../changelog/add-disable-ai-featured-image-button | 4 ++++ .../components/ai-assistant-plugin-sidebar/index.tsx | 2 +- .../components/featured-image/index.tsx | 9 +++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button diff --git a/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button b/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button new file mode 100644 index 0000000000000..f21938dfb36e9 --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Disable AI Featured Image button if requires upgrade or no post content diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx index 5919661c28636..336474660dda0 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx @@ -120,7 +120,7 @@ export default function AiAssistantPluginSidebar() { { isAIFeaturedImageAvailable && ( - + ) } diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx index 4f5060e3f08c5..b0262c0a47bb3 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/featured-image/index.tsx @@ -18,7 +18,7 @@ import AiAssistantModal from '../modal'; const FEATURED_IMAGE_FEATURE_NAME = 'featured-post-image'; const JETPACK_SIDEBAR_PLACEMENT = 'jetpack-sidebar'; -export default function FeaturedImage() { +export default function FeaturedImage( { busy, disabled }: { busy: boolean; disabled: boolean } ) { const { toggleEditorPanelOpened: toggleEditorPanelOpenedFromEditPost } = useDispatch( 'core/edit-post' ); const { editPost, toggleEditorPanelOpened: toggleEditorPanelOpenedFromEditor } = @@ -144,7 +144,12 @@ export default function FeaturedImage() { 'jetpack' ) }

- { isFeaturedImageModalVisible && ( From a32025b2d152ba194f6df8eccf1235811f1d02bf Mon Sep 17 00:00:00 2001 From: Adnan Haque <3737780+haqadn@users.noreply.github.com> Date: Fri, 29 Mar 2024 21:42:06 +0600 Subject: [PATCH 20/37] Boost: Fix broken reference in cache (#36661) --- .../optimizations/page-cache/pre-wordpress/Request.php | 5 +---- projects/plugins/boost/changelog/fix-cache-broken-reference | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 projects/plugins/boost/changelog/fix-cache-broken-reference diff --git a/projects/plugins/boost/app/modules/optimizations/page-cache/pre-wordpress/Request.php b/projects/plugins/boost/app/modules/optimizations/page-cache/pre-wordpress/Request.php index 12bab8a1151d3..2ce3fc01ca06c 100644 --- a/projects/plugins/boost/app/modules/optimizations/page-cache/pre-wordpress/Request.php +++ b/projects/plugins/boost/app/modules/optimizations/page-cache/pre-wordpress/Request.php @@ -5,9 +5,6 @@ namespace Automattic\Jetpack_Boost\Modules\Optimizations\Page_Cache\Pre_WordPress; -use Automattic\Jetpack_Boost\Lib\Critical_CSS\Generator; -use Automattic\Jetpack_Boost\Modules\Modules_Index; - class Request { /** * @var Request - The request instance for current request. @@ -89,7 +86,7 @@ public function is_url_excluded( $request_uri = '' ) { // Check if the query parameters `jb-disable-modules` or `jb-generate-critical-css` exist. $query_params = isset( $this->request_parameters['get'] ) ? $this->request_parameters['get'] : array(); if ( isset( $query_params ) && - ( isset( $query_params[ Modules_Index::DISABLE_MODULE_QUERY_VAR ] ) || isset( $query_params[ Generator::GENERATE_QUERY_ACTION ] ) ) + ( isset( $query_params['jb-disable-modules'] ) || isset( $query_params['jb-generate-critical-css'] ) ) ) { return true; } diff --git a/projects/plugins/boost/changelog/fix-cache-broken-reference b/projects/plugins/boost/changelog/fix-cache-broken-reference new file mode 100644 index 0000000000000..be00ab950e8ed --- /dev/null +++ b/projects/plugins/boost/changelog/fix-cache-broken-reference @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Fixed a fatal error due to a broken reference + + From 9d6f8f06f1ec32d2d3552257824dbb75614e7b22 Mon Sep 17 00:00:00 2001 From: Miguel San Segundo <1881481+miksansegundo@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:11:22 +0100 Subject: [PATCH 21/37] Dotcom patterns: Show v2 pattern library with all themes (#36588) * Fetch wp_block post type patterns * changelog * Fix tests * Fix test * Fix version * Improve cache and remove source site array * Fix version * Fix tests * Fix test * Remove redundant cast * Hide core and Jetpack form patterns * Update changelog * Update changelog * Add is_automattician as a phan stub * Add param to stub * More specific phpcs:ignore * Update Phan baselines --- .phan/stubs/wpcom-functions.php | 8 + .../jetpack-mu-wpcom/.phan/baseline.php | 2 - .../add-use-dotcom-wp-block-patterns | 4 + .../packages/jetpack-mu-wpcom/composer.json | 2 +- .../packages/jetpack-mu-wpcom/package.json | 2 +- .../src/class-jetpack-mu-wpcom.php | 2 +- .../block-patterns/block-patterns.php | 33 ++- .../class-wpcom-block-patterns-from-api.php | 207 +++++++----------- .../class-wpcom-block-patterns-utils.php | 17 +- ...ass-wpcom-block-patterns-from-api-test.php | 9 +- .../changelog/fix-use-dotcom-pattern-library | 5 + .../plugins/mu-wpcom-plugin/composer.json | 2 +- .../plugins/mu-wpcom-plugin/composer.lock | 4 +- .../mu-wpcom-plugin/mu-wpcom-plugin.php | 2 +- projects/plugins/mu-wpcom-plugin/package.json | 2 +- 15 files changed, 139 insertions(+), 162 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns create mode 100644 projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library diff --git a/.phan/stubs/wpcom-functions.php b/.phan/stubs/wpcom-functions.php index 65d8b45d0de85..a9c36b947a0b5 100644 --- a/.phan/stubs/wpcom-functions.php +++ b/.phan/stubs/wpcom-functions.php @@ -11,3 +11,11 @@ * @phan-return bool Returns true if the nav redesign is enabled, false otherwise. */ function wpcom_is_nav_redesign_enabled(): bool {} + +/** + * Whether the user is an Automattician + * + * @param int|null $user_id The user id. + * @phan-return bool Returns true if the user is Automattician, false otherwise. + */ +function is_automattician( $user_id = null ): bool {} // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable diff --git a/projects/packages/jetpack-mu-wpcom/.phan/baseline.php b/projects/packages/jetpack-mu-wpcom/.phan/baseline.php index e3d52e065ea12..1fd90617a0bc0 100644 --- a/projects/packages/jetpack-mu-wpcom/.phan/baseline.php +++ b/projects/packages/jetpack-mu-wpcom/.phan/baseline.php @@ -38,7 +38,6 @@ // PhanPluginSimplifyExpressionBool : 1 occurrence // PhanRedefineFunction : 1 occurrence // PhanRedundantCondition : 1 occurrence - // PhanRedundantConditionInLoop : 1 occurrence // PhanTypeComparisonToArray : 1 occurrence // PhanTypeInvalidLeftOperandOfNumericOp : 1 occurrence // PhanTypeMismatchDimFetch : 1 occurrence @@ -56,7 +55,6 @@ 'src/features/100-year-plan/locked-mode.php' => ['PhanEmptyFQSENInCallable', 'PhanUndeclaredClassConstant', 'PhanUndeclaredFunction'], 'src/features/admin-color-schemes/admin-color-schemes.php' => ['PhanUndeclaredConstant'], 'src/features/block-patterns/block-patterns.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredTypeParameter'], - 'src/features/block-patterns/class-wpcom-block-patterns-from-api.php' => ['PhanRedundantConditionInLoop'], 'src/features/block-patterns/class-wpcom-block-patterns-utils.php' => ['PhanTypeMismatchReturnNullable', 'PhanUndeclaredFunction'], 'src/features/coming-soon/coming-soon.php' => ['PhanTypeArraySuspicious', 'PhanTypeMismatchArgumentInternal', 'PhanUndeclaredFunction', 'PhanUndeclaredFunctionInCallable'], 'src/features/coming-soon/fallback-coming-soon-page.php' => ['PhanTypeMismatchArgument', 'PhanTypeVoidArgument', 'PhanUndeclaredFunction'], diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns b/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns new file mode 100644 index 0000000000000..aa21e7849790f --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +Dotcom patterns: use wp_block post type patterns in editor with all themes and hide core and Jetpack form patterns diff --git a/projects/packages/jetpack-mu-wpcom/composer.json b/projects/packages/jetpack-mu-wpcom/composer.json index 5eef12c6b5bd2..f78ed35c946ae 100644 --- a/projects/packages/jetpack-mu-wpcom/composer.json +++ b/projects/packages/jetpack-mu-wpcom/composer.json @@ -51,7 +51,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.21.x-dev" + "dev-trunk": "5.22.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": { diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index 67c2d79a24bc6..22c85edff1efb 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom", - "version": "5.21.1-alpha", + "version": "5.22.0-alpha", "description": "Enhances your site with features powered by WordPress.com", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme", "bugs": { diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index c376e9b935601..7e93ba44bc341 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -13,7 +13,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '5.21.1-alpha'; + const PACKAGE_VERSION = '5.22.0-alpha'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/block-patterns.php b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/block-patterns.php index a4eb7e473d78e..eed97189217a6 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/block-patterns.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/block-patterns.php @@ -6,19 +6,24 @@ */ /** - * Re-register some core patterns to push them down in the inserter list. - * The reason is that Dotcom curate the pattern list based on their look. + * Hide Jetpack form patterns. + * The reason is to show only the Dotcom pattern library. */ -function wpcom_reorder_curated_core_patterns() { - $pattern_names = array( 'core/social-links-shared-background-color' ); +function wpcom_unregister_jetpack_patterns() { + // @TODO: It would be better to add 'source: jetpack' when registering them in https://github.com/Automattic/jetpack/blob/3c4c16b8e9b34c8b6e798839ddf029a5c9a59e77/projects/plugins/jetpack/modules/contact-form.php#L152 + // and then here just filter them by source rather than by name. + $pattern_names = array( + 'contact-form', + 'newsletter-form', + 'rsvp-form', + 'registration-form', + 'appointment-form', + 'feedback-form', + ); foreach ( $pattern_names as $pattern_name ) { $pattern = \WP_Block_Patterns_Registry::get_instance()->get_registered( $pattern_name ); if ( $pattern ) { unregister_block_pattern( $pattern_name ); - register_block_pattern( - $pattern_name, - $pattern - ); } } } @@ -59,7 +64,7 @@ function register_patterns_on_api_request( $register_patterns_func ) { $register_patterns_func(); - wpcom_reorder_curated_core_patterns(); + wpcom_unregister_jetpack_patterns(); return $response; }; @@ -75,3 +80,13 @@ function () { 11, 2 ); + +/** + * Hide patterns bundled in core and from the Dotorg pattern directory. + * The reason is to show only the Dotcom pattern library. + */ +function wpcom_unregister_core_block_patterns() { + remove_theme_support( 'core-block-patterns' ); +} + +add_action( 'after_setup_theme', 'wpcom_unregister_core_block_patterns' ); diff --git a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-from-api.php b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-from-api.php index 889ff87cbd5ef..b1d8a6b85aabc 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-from-api.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-from-api.php @@ -16,13 +16,6 @@ class Wpcom_Block_Patterns_From_Api { const PATTERN_NAMESPACE = 'a8c/'; - /** - * Patterns source sites. A array of strings, each of which matches a valid source for retrieving patterns. - * - * @var array - */ - private $patterns_sources; - /** * A collection of utility methods. * @@ -36,8 +29,6 @@ class Wpcom_Block_Patterns_From_Api { * @param Wpcom_Block_Patterns_Utils|null $utils A class dependency containing utils methods. */ public function __construct( Wpcom_Block_Patterns_Utils $utils = null ) { - $this->patterns_sources = array( 'block_patterns' ); - $this->utils = empty( $utils ) ? new Wpcom_Block_Patterns_Utils() : $utils; } @@ -50,92 +41,89 @@ public function register_patterns() { // Used to track which patterns we successfully register. $results = array(); - // For every pattern source site, fetch the patterns. - foreach ( $this->patterns_sources as $patterns_source ) { - $patterns_cache_key = $this->utils->get_patterns_cache_key( $patterns_source ); - - $pattern_categories = array(); - $block_patterns = $this->get_patterns( $patterns_cache_key, $patterns_source ); - - foreach ( (array) $block_patterns as $pattern ) { - foreach ( (array) $pattern['categories'] as $slug => $category ) { - // Register categories from first pattern in each category. - if ( ! isset( $pattern_categories[ $slug ] ) ) { - $pattern_categories[ $slug ] = array( - 'label' => $category['title'], - 'description' => $category['description'], - ); - } - } - } + $patterns_cache_key = $this->utils->get_patterns_cache_key(); + + $pattern_categories = array(); + $block_patterns = $this->get_patterns( $patterns_cache_key ); - // Unregister existing categories so that we can insert them in the desired order (alphabetically). - $existing_categories = array(); - foreach ( \WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered() as $existing_category ) { - $existing_categories[ $existing_category['name'] ] = $existing_category; - unregister_block_pattern_category( $existing_category['name'] ); + foreach ( (array) $block_patterns as $pattern ) { + foreach ( (array) $pattern['categories'] as $slug => $category ) { + // Register categories from first pattern in each category. + if ( ! isset( $pattern_categories[ $slug ] ) ) { + $pattern_categories[ $slug ] = array( + 'label' => $category['title'], + 'description' => $category['description'], + ); + } } + } - // Existing categories are registered in Gutenberg or other plugins. - // We overwrite them with the categories from Dotcom patterns. - $pattern_categories = array_merge( $existing_categories, $pattern_categories ); + // Unregister existing categories so that we can insert them in the desired order (alphabetically). + $existing_categories = array(); + foreach ( \WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered() as $existing_category ) { + $existing_categories[ $existing_category['name'] ] = $existing_category; + unregister_block_pattern_category( $existing_category['name'] ); + } - // Order categories alphabetically by their label. - uasort( - $pattern_categories, - function ( $a, $b ) { - return strnatcasecmp( $a['label'], $b['label'] ); - } - ); + // Existing categories are registered in Gutenberg or other plugins. + // We overwrite them with the categories from Dotcom patterns. + $pattern_categories = array_merge( $existing_categories, $pattern_categories ); - // Move the Featured category to be the first category. - if ( isset( $pattern_categories['featured'] ) ) { - $featured_category = $pattern_categories['featured']; - $pattern_categories = array( 'featured' => $featured_category ) + $pattern_categories; + // Order categories alphabetically by their label. + uasort( + $pattern_categories, + function ( $a, $b ) { + return strnatcasecmp( $a['label'], $b['label'] ); } + ); - // Register categories (and re-register existing categories). - foreach ( (array) $pattern_categories as $slug => &$category_properties ) { - // Rename category labels. - if ( 'posts' === $slug ) { - $category_properties['label'] = __( - 'Blog Posts', - 'jetpack-mu-wpcom' - ); - } - register_block_pattern_category( $slug, $category_properties ); + // Move the Featured category to be the first category. + if ( isset( $pattern_categories['featured'] ) ) { + $featured_category = $pattern_categories['featured']; + $pattern_categories = array( 'featured' => $featured_category ) + $pattern_categories; + } + + // Register categories (and re-register existing categories). + foreach ( $pattern_categories as $slug => &$category_properties ) { + // Rename category labels. + if ( 'posts' === $slug ) { + $category_properties['label'] = __( + 'Blog Posts', + 'jetpack-mu-wpcom' + ); } + register_block_pattern_category( $slug, $category_properties ); + } - foreach ( (array) $block_patterns as &$pattern ) { - if ( $this->can_register_pattern( $pattern ) ) { - $is_premium = isset( $pattern['pattern_meta']['is_premium'] ) ? boolval( $pattern['pattern_meta']['is_premium'] ) : false; - - // Set custom viewport width for the pattern preview with a - // default width of 1280 and ensure a safe minimum width of 320. - $viewport_width = isset( $pattern['pattern_meta']['viewport_width'] ) ? intval( $pattern['pattern_meta']['viewport_width'] ) : 1280; - $viewport_width = $viewport_width < 320 ? 320 : $viewport_width; - $pattern_name = self::PATTERN_NAMESPACE . $pattern['name']; - $block_types = $this->utils->maybe_get_pattern_block_types_from_pattern_meta( $pattern ); - if ( empty( $block_types ) ) { - // For wp_block patterns because don't use pattern meta for block types. - $block_types = $this->utils->get_block_types_from_categories( $pattern ); - } - - $results[ $pattern_name ] = register_block_pattern( - $pattern_name, - array( - 'title' => $pattern['title'], - 'description' => $pattern['description'], - 'content' => $pattern['html'], - 'viewportWidth' => $viewport_width, - 'categories' => array_keys( - $pattern['categories'] - ), - 'isPremium' => $is_premium, - 'blockTypes' => $block_types, - ) - ); + foreach ( (array) $block_patterns as &$pattern ) { + if ( $this->can_register_pattern( $pattern ) ) { + $is_premium = isset( $pattern['pattern_meta']['is_premium'] ) ? boolval( $pattern['pattern_meta']['is_premium'] ) : false; + + // Set custom viewport width for the pattern preview with a + // default width of 1280 and ensure a safe minimum width of 320. + $viewport_width = isset( $pattern['pattern_meta']['viewport_width'] ) ? intval( $pattern['pattern_meta']['viewport_width'] ) : 1280; + $viewport_width = $viewport_width < 320 ? 320 : $viewport_width; + $pattern_name = self::PATTERN_NAMESPACE . $pattern['name']; + $block_types = $this->utils->maybe_get_pattern_block_types_from_pattern_meta( $pattern ); + if ( empty( $block_types ) ) { + // For wp_block patterns because don't use pattern meta for block types. + $block_types = $this->utils->get_block_types_from_categories( $pattern ); } + + $results[ $pattern_name ] = register_block_pattern( + $pattern_name, + array( + 'title' => $pattern['title'], + 'description' => $pattern['description'], + 'content' => $pattern['html'], + 'viewportWidth' => $viewport_width, + 'categories' => array_keys( + $pattern['categories'] + ), + 'isPremium' => $is_premium, + 'blockTypes' => $block_types, + ) + ); } } @@ -156,49 +144,21 @@ function ( $a, $b ) { * Returns a list of patterns. * * @param string $patterns_cache_key Key to store responses to and fetch responses from cache. - * @param string $patterns_source Slug for valid patterns source site, e.g., `block_patterns`. - * @return array The list of translated patterns. + * @return array The list of patterns. */ - private function get_patterns( $patterns_cache_key, $patterns_source ) { + private function get_patterns( $patterns_cache_key ) { $override_source_site = apply_filters( 'a8c_override_patterns_source_site', false ); - if ( $override_source_site ) { - // Skip caching and request all patterns from a specified source site. - // This allows testing patterns in development with immediate feedback - // while avoiding polluting the cache. Note that this request gets - // all patterns on the source site, not just those with the 'pattern' tag. - $request_url = esc_url_raw( - add_query_arg( - array( - 'site' => $override_source_site, - 'tags' => 'pattern', - 'pattern_meta' => 'is_web', - ), - 'https://public-api.wordpress.com/rest/v1/ptk/patterns/' . $this->utils->get_block_patterns_locale() - ) - ); - - return $this->utils->remote_get( $request_url ); - } $block_patterns = $this->utils->cache_get( $patterns_cache_key, 'ptk_patterns' ); + $disable_cache = ( function_exists( 'is_automattician' ) && is_automattician() ) || $override_source_site || ( defined( 'WP_DISABLE_PATTERN_CACHE' ) && WP_DISABLE_PATTERN_CACHE ); - // Enable testing v2 patterns on sites with Assembler theme active - $enable_testing_v2_patterns = in_array( get_stylesheet(), array( 'pub/assembler', 'assembler' ), true ); - - // Load fresh data if we don't have any patterns. - if ( $enable_testing_v2_patterns || false === $block_patterns || ( defined( 'WP_DISABLE_PATTERN_CACHE' ) && WP_DISABLE_PATTERN_CACHE ) ) { - if ( $enable_testing_v2_patterns ) { - $request_params = array( - 'site' => 'dotcompatterns.wordpress.com', - 'post_type' => 'wp_block', - ); - } + // Load fresh data if is automattician or we don't have any data. + if ( $disable_cache || false === $block_patterns ) { $request_url = esc_url_raw( add_query_arg( - $request_params ?? array( - 'tags' => 'pattern', - 'pattern_meta' => 'is_web', - 'patterns_source' => $patterns_source, + array( + 'site' => $override_source_site ?? 'dotcompatterns.wordpress.com', + 'post_type' => 'wp_block', ), 'https://public-api.wordpress.com/rest/v1/ptk/patterns/' . $this->utils->get_block_patterns_locale() ) @@ -206,8 +166,9 @@ private function get_patterns( $patterns_cache_key, $patterns_source ) { $block_patterns = $this->utils->remote_get( $request_url ); - if ( ! $enable_testing_v2_patterns ) { - $this->utils->cache_add( $patterns_cache_key, $block_patterns, 'ptk_patterns', DAY_IN_SECONDS ); + // Only save to cache when is not disabled. + if ( ! $disable_cache ) { + $this->utils->cache_add( $patterns_cache_key, $block_patterns, 'ptk_patterns', 5 * MINUTE_IN_SECONDS ); } } diff --git a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-utils.php b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-utils.php index 6213144aef2ce..7139223a77582 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-utils.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/block-patterns/class-wpcom-block-patterns-utils.php @@ -5,7 +5,6 @@ * @package automattic/jetpack-mu-wpcom */ -use Automattic\Jetpack\Jetpack_Mu_Wpcom; use Automattic\Jetpack\Jetpack_Mu_Wpcom\Common; /** @@ -59,22 +58,12 @@ public function cache_get( $key, $group ) { } /** - * Returns the sha1 hash of a concatenated string to use as a cache key. + * Returns a cache key per locale. * - * @param string $patterns_slug A slug for a patterns source site, e.g., `block_patterns`. * @return string locale slug */ - public function get_patterns_cache_key( $patterns_slug ) { - return sha1( - implode( - '_', - array( - $patterns_slug, - Jetpack_Mu_Wpcom::PACKAGE_VERSION, - $this->get_block_patterns_locale(), - ) - ) - ); + public function get_patterns_cache_key() { + return 'wpcom_block_patterns_' . $this->get_block_patterns_locale(); } /** diff --git a/projects/packages/jetpack-mu-wpcom/tests/php/features/block-patterns/class-wpcom-block-patterns-from-api-test.php b/projects/packages/jetpack-mu-wpcom/tests/php/features/block-patterns/class-wpcom-block-patterns-from-api-test.php index 22e0b3c068772..e514ecbb6945b 100644 --- a/projects/packages/jetpack-mu-wpcom/tests/php/features/block-patterns/class-wpcom-block-patterns-from-api-test.php +++ b/projects/packages/jetpack-mu-wpcom/tests/php/features/block-patterns/class-wpcom-block-patterns-from-api-test.php @@ -87,7 +87,7 @@ public function test_patterns_request_succeeds_with_empty_cache() { $utils_mock->expects( $this->once() ) ->method( 'cache_add' ) - ->with( $this->stringContains( 'key-largo' ), array( $this->pattern_mock_object ), 'ptk_patterns', DAY_IN_SECONDS ); + ->with( $this->stringContains( 'key-largo' ), array( $this->pattern_mock_object ), 'ptk_patterns', 5 * MINUTE_IN_SECONDS ); $this->assertEquals( array( 'a8c/' . $this->pattern_mock_object['name'] => true ), $block_patterns_from_api->register_patterns() ); } @@ -102,7 +102,7 @@ public function test_patterns_site_editor_source_site() { $utils_mock->expects( $this->once() ) ->method( 'remote_get' ) ->withConsecutive( - array( 'https://public-api.wordpress.com/rest/v1/ptk/patterns/fr?tags=pattern&pattern_meta=is_web&patterns_source=block_patterns' ) + array( 'https://public-api.wordpress.com/rest/v1/ptk/patterns/fr?post_type=wp_block' ) ); $this->assertEquals( array( 'a8c/' . $this->pattern_mock_object['name'] => true ), $block_patterns_from_api->register_patterns() ); @@ -137,15 +137,12 @@ public function test_patterns_request_succeeds_with_override_source_site() { $utils_mock = $this->createBlockPatternsUtilsMock( array( $this->pattern_mock_object ) ); $block_patterns_from_api = new Wpcom_Block_Patterns_From_Api( $utils_mock ); - $utils_mock->expects( $this->never() ) - ->method( 'cache_get' ); - $utils_mock->expects( $this->never() ) ->method( 'cache_add' ); $utils_mock->expects( $this->once() ) ->method( 'remote_get' ) - ->with( 'https://public-api.wordpress.com/rest/v1/ptk/patterns/fr?site=dotcom&tags=pattern&pattern_meta=is_web' ); + ->with( 'https://public-api.wordpress.com/rest/v1/ptk/patterns/fr?site=dotcom&post_type=wp_block' ); $this->assertEquals( array( 'a8c/' . $this->pattern_mock_object['name'] => true ), $block_patterns_from_api->register_patterns() ); diff --git a/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library b/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/mu-wpcom-plugin/composer.json b/projects/plugins/mu-wpcom-plugin/composer.json index 552536480e532..56c3ffe394edf 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.json +++ b/projects/plugins/mu-wpcom-plugin/composer.json @@ -46,6 +46,6 @@ ] }, "config": { - "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_1_10" + "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_1_11_alpha" } } diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index 2dfa7caed3467..d0f58a55b1ba1 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -129,7 +129,7 @@ "dist": { "type": "path", "url": "../../packages/jetpack-mu-wpcom", - "reference": "ffb0929d64dac5ad55847b4b4ed74469efaea15e" + "reference": "0b49970bdde8c3c05388592c86db00b2888f6dd4" }, "require": { "automattic/jetpack-assets": "@dev", @@ -152,7 +152,7 @@ }, "autotagger": true, "branch-alias": { - "dev-trunk": "5.21.x-dev" + "dev-trunk": "5.22.x-dev" }, "textdomain": "jetpack-mu-wpcom", "version-constants": { diff --git a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php index 9caa2b01e23a0..440efcd9bf6cb 100644 --- a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php +++ b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php @@ -3,7 +3,7 @@ * * Plugin Name: WordPress.com Features * Description: Test plugin for the jetpack-mu-wpcom package - * Version: 2.1.10 + * Version: 2.1.11-alpha * Author: Automattic * License: GPLv2 or later * Text Domain: jetpack-mu-wpcom-plugin diff --git a/projects/plugins/mu-wpcom-plugin/package.json b/projects/plugins/mu-wpcom-plugin/package.json index 3242b670708b3..1ba776776ed9e 100644 --- a/projects/plugins/mu-wpcom-plugin/package.json +++ b/projects/plugins/mu-wpcom-plugin/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom-plugin", - "version": "2.1.10", + "version": "2.1.11-alpha", "description": "Test plugin for the jetpack-mu-wpcom package", "homepage": "https://jetpack.com", "bugs": { From 0dec4ca9b9312eda641386980f716d98403e75f2 Mon Sep 17 00:00:00 2001 From: Tim Broddin Date: Mon, 1 Apr 2024 10:54:52 +0200 Subject: [PATCH 22/37] Fix: Mapkit search accuracy (#36634) --- .../jetpack/changelog/fix-mapkit-accuracy | 5 ++++ .../blocks/map/location-search/mapkit.js | 23 +++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/fix-mapkit-accuracy diff --git a/projects/plugins/jetpack/changelog/fix-mapkit-accuracy b/projects/plugins/jetpack/changelog/fix-mapkit-accuracy new file mode 100644 index 0000000000000..4fb28779c697c --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-mapkit-accuracy @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Minor bugfix + + diff --git a/projects/plugins/jetpack/extensions/blocks/map/location-search/mapkit.js b/projects/plugins/jetpack/extensions/blocks/map/location-search/mapkit.js index 74a2c6edcb6bf..aa17af9c3fb9d 100644 --- a/projects/plugins/jetpack/extensions/blocks/map/location-search/mapkit.js +++ b/projects/plugins/jetpack/extensions/blocks/map/location-search/mapkit.js @@ -10,14 +10,14 @@ const MapkitLocationSearch = ( { label, onAddPoint } ) => { const containerRef = useRef(); const textRef = useRef(); const { mapkit } = useMapkit(); + const search = new mapkit.Search( { + includePointsOfInterest: false, + } ); const autocompleter = { name: 'placeSearch', options: async value => { return new Promise( function ( resolve, reject ) { - const search = new mapkit.Search( { - includePointsOfInterest: false, - } ); search.autocomplete( value, ( err, results ) => { if ( err ) { reject( err ); @@ -30,6 +30,7 @@ const MapkitLocationSearch = ( { label, onAddPoint } ) => { const withPlaceName = filtered.map( result => ( { ...result, placeName: result.displayLines?.join( ', ' ), + original: result, // save the original result for later - otherwise mapkit.js gives a type error } ) ); resolve( withPlaceName ); @@ -56,7 +57,21 @@ const MapkitLocationSearch = ( { label, onAddPoint } ) => { value.coordinate.longitude ).toFixed( 2 ) }`, }; - onAddPoint( point ); + search.search( value.original, ( err, results ) => { + if ( ! err ) { + const { places } = results; + if ( places.length > 0 ) { + const place = places[ 0 ]; + point.coordinates = { + longitude: place.coordinate.longitude, + latitude: place.coordinate.latitude, + }; + } + } + + onAddPoint( point ); + } ); + return value.placeName; }, }; From f8c3448fd5bc010b0647e6d16f66309e20da0d93 Mon Sep 17 00:00:00 2001 From: Candy Tsai Date: Mon, 1 Apr 2024 17:06:15 +0800 Subject: [PATCH 23/37] Load Odyssey Stats for simple sites (#36628) * Load Odyssey Stats for simple sites * Changelog * Fix file name to wpcom-simple-odyssey-stats.php * Make Phan happy * Run tools/fixup-project-versions.sh to make linter happy * Add wpcom_is_nav_redesign_enabled check --------- Co-authored-by: DustyReagan --- .../packages/jetpack-mu-wpcom/.phan/config.php | 12 +++++++++++- .../changelog/add-wpcom-simple-odyssey-stats | 4 ++++ .../src/class-jetpack-mu-wpcom.php | 10 ++++++++++ .../wpcom-simple-odyssey-stats.php | 18 ++++++++++++++++++ .../changelog/add-wpcom-simple-odyssey-stats | 5 +++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats create mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php create mode 100644 projects/plugins/mu-wpcom-plugin/changelog/add-wpcom-simple-odyssey-stats diff --git a/projects/packages/jetpack-mu-wpcom/.phan/config.php b/projects/packages/jetpack-mu-wpcom/.phan/config.php index 470bc267e2f52..d12135b6a0250 100644 --- a/projects/packages/jetpack-mu-wpcom/.phan/config.php +++ b/projects/packages/jetpack-mu-wpcom/.phan/config.php @@ -10,4 +10,14 @@ // Require base config. require __DIR__ . '/../../../../.phan/config.base.php'; -return make_phan_config( dirname( __DIR__ ) ); +$root = dirname( __DIR__, 4 ); + +return make_phan_config( + dirname( __DIR__ ), + array( + 'parse_file_list' => array( + "$root/projects/packages/stats-admin/src/class-dashboard.php", + "$root/projects/plugins/jetpack/class-jetpack-stats-dashboard-widget.php", + ), + ) +); diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats b/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats new file mode 100644 index 0000000000000..a7be0df23cfb5 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Add Odyssey Stats to wpcom Simple Site diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 7e93ba44bc341..4df3757a742ba 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -46,6 +46,7 @@ public static function init() { if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { add_action( 'plugins_loaded', array( __CLASS__, 'load_verbum_comments' ) ); add_action( 'wp_loaded', array( __CLASS__, 'load_verbum_comments_admin' ) ); + add_action( 'plugins_loaded', array( __CLASS__, 'load_wpcom_simple_odyssey_stats' ) ); } // Unified navigation fix for changes in WordPress 6.2. @@ -278,4 +279,13 @@ public static function load_verbum_comments_admin() { public static function load_wpcom_command_palette() { require_once __DIR__ . '/features/wpcom-command-palette/wpcom-command-palette.php'; } + + /** + * Load Odyssey Stats in Simple sites. + */ + public static function load_wpcom_simple_odyssey_stats() { + if ( function_exists( 'wpcom_is_nav_redesign_enabled' ) && wpcom_is_nav_redesign_enabled() ) { + require_once __DIR__ . '/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php'; + } + } } diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php new file mode 100644 index 0000000000000..39592e3f70e56 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php @@ -0,0 +1,18 @@ + Date: Mon, 1 Apr 2024 19:08:43 +0600 Subject: [PATCH 24/37] Backport boost 3.2.1 Changes (#36655) * Changelog and readme.txt edits. * Version bumps --- projects/js-packages/components/CHANGELOG.md | 5 +++++ .../changelog/fix-my-jetpack-logo-spacing | 5 ----- projects/js-packages/components/package.json | 2 +- projects/js-packages/image-guide/CHANGELOG.md | 5 +++++ .../renovate-rollup-plugin-commonjs-25.x | 4 ---- projects/js-packages/image-guide/package.json | 2 +- .../backup/changelog/force-a-release} | 2 +- .../backup/src/class-package-version.php | 2 +- .../packages/identity-crisis/CHANGELOG.md | 6 ++++++ .../add-idc-package-version-tracking | 4 ---- .../add-jetpack.idcUrlValidation_to_rest | 4 ---- .../packages/identity-crisis/package.json | 2 +- .../src/class-identity-crisis.php | 2 +- .../src/class-rest-endpoints.php | 2 +- projects/packages/my-jetpack/CHANGELOG.md | 9 +++++++++ .../add-red-bubble-slugs-to-page-view-track | 4 ---- .../refactor-jetpacl-plugin-connect-screen | 5 ----- ...direct-from-interstitial-if-product-active | 4 ---- .../update-show-crm-active-on-my-jetpack | 4 ---- projects/packages/my-jetpack/package.json | 2 +- .../my-jetpack/src/class-initializer.php | 2 +- projects/packages/sync/CHANGELOG.md | 5 +++++ .../sync/src/class-package-version.php | 2 +- projects/plugins/boost/CHANGELOG.md | 17 ++++++++++++++++ .../add-a4a-source-to-jetpack-connect-url | 5 ----- ...add-bad-installation-notices-to-my-jetpack | 4 ---- .../add-cache-clear-on-settings-change | 4 ---- .../boost/changelog/add-check-cache-loaded | 4 ---- .../add-get-heartbeat-data-rest-endpoint | 5 ----- .../add-idc-package-version-tracking | 4 ---- .../add-idc-package-version-tracking#2 | 5 ----- .../add-jetpack.idcUrlValidation_to_rest | 5 ----- .../boost/changelog/add-module-active-status | 4 ---- .../changelog/add-my-jetpack-ai-detail-table | 5 ----- .../changelog/add-phan-more-constant-stubs | 5 ----- .../changelog/add-phan-wp-constant-stubs | 5 ----- .../boost/changelog/add-phpdoc-return-never | 5 ----- .../add-remote-connect-rest-endpoint | 5 ----- .../add-remote-provision-rest-endpoint | 5 ----- .../add-remote-register-rest-endpoint | 5 ----- .../add-test-connection-rest-endpoint | 5 ----- .../boost/changelog/fix-phan-yoast-polyfills | 5 ----- projects/plugins/boost/changelog/prerelease | 5 ----- .../changelog/renovate-wordpress-monorepo | 4 ---- .../update-activate-license-to-hide-on-atomic | 5 ----- .../update-activation-upgrade-screens-copy | 4 ---- ...-cloud-css-endpoint-to-always-be-available | 4 ---- ...llation-error-to-only-show-on-plugins-page | 4 ---- ...ation-error-to-only-show-on-plugins-page#2 | 5 ----- .../update-move-notice-to-my-jetpack | 5 ----- .../boost/changelog/update-query-params | 4 ---- ...direct-from-interstitial-if-product-active | 5 ----- .../update-refactor-speed-score-modules | 5 ----- .../changelog/update-sanitize-annotation-text | 4 ---- .../boost/changelog/update-smarter-cloud-css | 4 ---- .../changelog/update-smarter-cloud-css#2 | 5 ----- projects/plugins/boost/composer.json | 4 ++-- projects/plugins/boost/composer.lock | 2 +- projects/plugins/boost/jetpack-boost.php | 4 ++-- projects/plugins/boost/package.json | 2 +- projects/plugins/boost/readme.txt | 20 ++++++++++++++----- 61 files changed, 78 insertions(+), 203 deletions(-) delete mode 100644 projects/js-packages/components/changelog/fix-my-jetpack-logo-spacing delete mode 100644 projects/js-packages/image-guide/changelog/renovate-rollup-plugin-commonjs-25.x rename projects/{plugins/boost/changelog/renovate-major-storybook-monorepo => packages/backup/changelog/force-a-release} (53%) delete mode 100644 projects/packages/identity-crisis/changelog/add-idc-package-version-tracking delete mode 100644 projects/packages/identity-crisis/changelog/add-jetpack.idcUrlValidation_to_rest delete mode 100644 projects/packages/my-jetpack/changelog/add-red-bubble-slugs-to-page-view-track delete mode 100644 projects/packages/my-jetpack/changelog/refactor-jetpacl-plugin-connect-screen delete mode 100644 projects/packages/my-jetpack/changelog/update-redirect-from-interstitial-if-product-active delete mode 100644 projects/packages/my-jetpack/changelog/update-show-crm-active-on-my-jetpack delete mode 100644 projects/plugins/boost/changelog/add-a4a-source-to-jetpack-connect-url delete mode 100644 projects/plugins/boost/changelog/add-bad-installation-notices-to-my-jetpack delete mode 100644 projects/plugins/boost/changelog/add-cache-clear-on-settings-change delete mode 100644 projects/plugins/boost/changelog/add-check-cache-loaded delete mode 100644 projects/plugins/boost/changelog/add-get-heartbeat-data-rest-endpoint delete mode 100644 projects/plugins/boost/changelog/add-idc-package-version-tracking delete mode 100644 projects/plugins/boost/changelog/add-idc-package-version-tracking#2 delete mode 100644 projects/plugins/boost/changelog/add-jetpack.idcUrlValidation_to_rest delete mode 100644 projects/plugins/boost/changelog/add-module-active-status delete mode 100644 projects/plugins/boost/changelog/add-my-jetpack-ai-detail-table delete mode 100644 projects/plugins/boost/changelog/add-phan-more-constant-stubs delete mode 100644 projects/plugins/boost/changelog/add-phan-wp-constant-stubs delete mode 100644 projects/plugins/boost/changelog/add-phpdoc-return-never delete mode 100644 projects/plugins/boost/changelog/add-remote-connect-rest-endpoint delete mode 100644 projects/plugins/boost/changelog/add-remote-provision-rest-endpoint delete mode 100644 projects/plugins/boost/changelog/add-remote-register-rest-endpoint delete mode 100644 projects/plugins/boost/changelog/add-test-connection-rest-endpoint delete mode 100644 projects/plugins/boost/changelog/fix-phan-yoast-polyfills delete mode 100644 projects/plugins/boost/changelog/prerelease delete mode 100644 projects/plugins/boost/changelog/renovate-wordpress-monorepo delete mode 100644 projects/plugins/boost/changelog/update-activate-license-to-hide-on-atomic delete mode 100644 projects/plugins/boost/changelog/update-activation-upgrade-screens-copy delete mode 100644 projects/plugins/boost/changelog/update-cloud-css-endpoint-to-always-be-available delete mode 100644 projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page delete mode 100644 projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page#2 delete mode 100644 projects/plugins/boost/changelog/update-move-notice-to-my-jetpack delete mode 100644 projects/plugins/boost/changelog/update-query-params delete mode 100644 projects/plugins/boost/changelog/update-redirect-from-interstitial-if-product-active delete mode 100644 projects/plugins/boost/changelog/update-refactor-speed-score-modules delete mode 100644 projects/plugins/boost/changelog/update-sanitize-annotation-text delete mode 100644 projects/plugins/boost/changelog/update-smarter-cloud-css delete mode 100644 projects/plugins/boost/changelog/update-smarter-cloud-css#2 diff --git a/projects/js-packages/components/CHANGELOG.md b/projects/js-packages/components/CHANGELOG.md index 7964eb615a767..19bd3de18cec4 100644 --- a/projects/js-packages/components/CHANGELOG.md +++ b/projects/js-packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ### This is a list detailing changes for the Jetpack RNA Components package releases. +## [0.50.5] - 2024-03-29 +### Changed +- Internal updates. + ## [0.50.4] - 2024-03-27 ### Changed - Updated package dependencies. [#36539, #36585] @@ -991,6 +995,7 @@ ### Changed - Update node version requirement to 14.16.1 +[0.50.5]: https://github.com/Automattic/jetpack-components/compare/0.50.4...0.50.5 [0.50.4]: https://github.com/Automattic/jetpack-components/compare/0.50.3...0.50.4 [0.50.3]: https://github.com/Automattic/jetpack-components/compare/0.50.2...0.50.3 [0.50.2]: https://github.com/Automattic/jetpack-components/compare/0.50.1...0.50.2 diff --git a/projects/js-packages/components/changelog/fix-my-jetpack-logo-spacing b/projects/js-packages/components/changelog/fix-my-jetpack-logo-spacing deleted file mode 100644 index ff3b7025fb2b4..0000000000000 --- a/projects/js-packages/components/changelog/fix-my-jetpack-logo-spacing +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Style bug - - diff --git a/projects/js-packages/components/package.json b/projects/js-packages/components/package.json index 3ad3c9e4e7daa..4b03b57c17d57 100644 --- a/projects/js-packages/components/package.json +++ b/projects/js-packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-components", - "version": "0.50.5-alpha", + "version": "0.50.5", "description": "Jetpack Components Package", "author": "Automattic", "license": "GPL-2.0-or-later", diff --git a/projects/js-packages/image-guide/CHANGELOG.md b/projects/js-packages/image-guide/CHANGELOG.md index 4711f21f81b42..384a5f4d1e69f 100644 --- a/projects/js-packages/image-guide/CHANGELOG.md +++ b/projects/js-packages/image-guide/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.8] - 2024-03-29 +### Changed +- Updated package dependencies. [#30684] + ## [0.5.7] - 2024-03-15 ### Changed - Updated package dependencies. [#36142] @@ -100,6 +104,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Minor package.json change - removing private entry. +[0.5.8]: https://github.com/Automattic/jetpack-image-guide/compare/v0.5.7...v0.5.8 [0.5.7]: https://github.com/Automattic/jetpack-image-guide/compare/v0.5.6...v0.5.7 [0.5.6]: https://github.com/Automattic/jetpack-image-guide/compare/v0.5.5...v0.5.6 [0.5.5]: https://github.com/Automattic/jetpack-image-guide/compare/v0.5.4...v0.5.5 diff --git a/projects/js-packages/image-guide/changelog/renovate-rollup-plugin-commonjs-25.x b/projects/js-packages/image-guide/changelog/renovate-rollup-plugin-commonjs-25.x deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/js-packages/image-guide/changelog/renovate-rollup-plugin-commonjs-25.x +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/js-packages/image-guide/package.json b/projects/js-packages/image-guide/package.json index 3faec7aeac313..bf46de26c26e5 100644 --- a/projects/js-packages/image-guide/package.json +++ b/projects/js-packages/image-guide/package.json @@ -1,6 +1,6 @@ { "name": "@automattic/jetpack-image-guide", - "version": "0.5.8-alpha", + "version": "0.5.8", "description": "Go through the dom to analyze image size on screen vs actual file size.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/image-guide/#readme", "type": "module", diff --git a/projects/plugins/boost/changelog/renovate-major-storybook-monorepo b/projects/packages/backup/changelog/force-a-release similarity index 53% rename from projects/plugins/boost/changelog/renovate-major-storybook-monorepo rename to projects/packages/backup/changelog/force-a-release index c47cb18e82997..d4ad6c7cc3379 100644 --- a/projects/plugins/boost/changelog/renovate-major-storybook-monorepo +++ b/projects/packages/backup/changelog/force-a-release @@ -1,4 +1,4 @@ Significance: patch Type: changed -Updated package dependencies. +Update dependencies. diff --git a/projects/packages/backup/src/class-package-version.php b/projects/packages/backup/src/class-package-version.php index deaf3414846a2..7405fe929da8c 100644 --- a/projects/packages/backup/src/class-package-version.php +++ b/projects/packages/backup/src/class-package-version.php @@ -16,7 +16,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '3.3.4'; + const PACKAGE_VERSION = '3.3.5-alpha'; const PACKAGE_SLUG = 'backup'; diff --git a/projects/packages/identity-crisis/CHANGELOG.md b/projects/packages/identity-crisis/CHANGELOG.md index 8340192caf2a8..91c8d97c4f5e6 100644 --- a/projects/packages/identity-crisis/CHANGELOG.md +++ b/projects/packages/identity-crisis/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.18.0] - 2024-03-29 +### Added +- Packages: added version tracking for identity-crisis. [#36635] +- REST: added endpoint for IDC validation. [#36537] + ## [0.17.6] - 2024-03-27 ### Changed - Updated package dependencies. [#36585] @@ -515,6 +520,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Use Connection/Urls for home_url and site_url functions migrated from Sync. +[0.18.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.6...v0.18.0 [0.17.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.5...v0.17.6 [0.17.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.4...v0.17.5 [0.17.4]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.3...v0.17.4 diff --git a/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking b/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking deleted file mode 100644 index fa71d5bb57ff5..0000000000000 --- a/projects/packages/identity-crisis/changelog/add-idc-package-version-tracking +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Packages: added version tracking for identity-crisis. diff --git a/projects/packages/identity-crisis/changelog/add-jetpack.idcUrlValidation_to_rest b/projects/packages/identity-crisis/changelog/add-jetpack.idcUrlValidation_to_rest deleted file mode 100644 index bc21dd3fcf376..0000000000000 --- a/projects/packages/identity-crisis/changelog/add-jetpack.idcUrlValidation_to_rest +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -REST: added endpoint for IDC validation. diff --git a/projects/packages/identity-crisis/package.json b/projects/packages/identity-crisis/package.json index c8f4bf1c831cc..9da2a3208afd8 100644 --- a/projects/packages/identity-crisis/package.json +++ b/projects/packages/identity-crisis/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-identity-crisis", - "version": "0.18.0-alpha", + "version": "0.18.0", "description": "Jetpack Identity Crisis", "main": "_inc/admin.jsx", "repository": { diff --git a/projects/packages/identity-crisis/src/class-identity-crisis.php b/projects/packages/identity-crisis/src/class-identity-crisis.php index 64e4bc8ee573c..8cbf524bc54ea 100644 --- a/projects/packages/identity-crisis/src/class-identity-crisis.php +++ b/projects/packages/identity-crisis/src/class-identity-crisis.php @@ -26,7 +26,7 @@ class Identity_Crisis { /** * Package Version */ - const PACKAGE_VERSION = '0.18.0-alpha'; + const PACKAGE_VERSION = '0.18.0'; /** * Package Slug diff --git a/projects/packages/identity-crisis/src/class-rest-endpoints.php b/projects/packages/identity-crisis/src/class-rest-endpoints.php index 1d9df0d0cb87b..ea2d05b8cbac2 100644 --- a/projects/packages/identity-crisis/src/class-rest-endpoints.php +++ b/projects/packages/identity-crisis/src/class-rest-endpoints.php @@ -229,7 +229,7 @@ public static function identity_crisis_mitigation_permission_check() { /** * Endpoint for URL validation and creating a secret. * - * @since $$next-version$$ + * @since 0.18.0 * * @return array */ diff --git a/projects/packages/my-jetpack/CHANGELOG.md b/projects/packages/my-jetpack/CHANGELOG.md index c33d927b9ec19..b0ad1983c882a 100644 --- a/projects/packages/my-jetpack/CHANGELOG.md +++ b/projects/packages/my-jetpack/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.20.0] - 2024-03-29 +### Added +- Track active red bubble slugs on My Jetpack page view [#36611] + +### Fixed +- Better handling on product interstitial pages if the site already has a paid product [#36570] +- Shows Jetpack CRM card as active on My Jetpack if the plugin is installed and active [#36594] + ## [4.19.0] - 2024-03-27 ### Added - Add red bubble to notices tied to red bubble notifications [#36543] @@ -1391,6 +1399,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created package +[4.20.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.19.0...4.20.0 [4.19.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.18.0...4.19.0 [4.18.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.17.1...4.18.0 [4.17.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.17.0...4.17.1 diff --git a/projects/packages/my-jetpack/changelog/add-red-bubble-slugs-to-page-view-track b/projects/packages/my-jetpack/changelog/add-red-bubble-slugs-to-page-view-track deleted file mode 100644 index 08c05e416a064..0000000000000 --- a/projects/packages/my-jetpack/changelog/add-red-bubble-slugs-to-page-view-track +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Track active red bubble slugs on My Jetpack page view diff --git a/projects/packages/my-jetpack/changelog/refactor-jetpacl-plugin-connect-screen b/projects/packages/my-jetpack/changelog/refactor-jetpacl-plugin-connect-screen deleted file mode 100644 index 52aa43eb6ff1d..0000000000000 --- a/projects/packages/my-jetpack/changelog/refactor-jetpacl-plugin-connect-screen +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Refactor Connect Screen body - - diff --git a/projects/packages/my-jetpack/changelog/update-redirect-from-interstitial-if-product-active b/projects/packages/my-jetpack/changelog/update-redirect-from-interstitial-if-product-active deleted file mode 100644 index bcdb4540196bb..0000000000000 --- a/projects/packages/my-jetpack/changelog/update-redirect-from-interstitial-if-product-active +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: fixed - -Better handling on product interstitial pages if the site already has a paid product diff --git a/projects/packages/my-jetpack/changelog/update-show-crm-active-on-my-jetpack b/projects/packages/my-jetpack/changelog/update-show-crm-active-on-my-jetpack deleted file mode 100644 index c47f5984627da..0000000000000 --- a/projects/packages/my-jetpack/changelog/update-show-crm-active-on-my-jetpack +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fixed - -Shows Jetpack CRM card as active on My Jetpack if the plugin is installed and active diff --git a/projects/packages/my-jetpack/package.json b/projects/packages/my-jetpack/package.json index d4d470ac96082..8e4f7d278a05c 100644 --- a/projects/packages/my-jetpack/package.json +++ b/projects/packages/my-jetpack/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-my-jetpack", - "version": "4.20.0-alpha", + "version": "4.20.0", "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme", "bugs": { diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 5d2eca5843164..7b93f28d3b822 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -36,7 +36,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '4.20.0-alpha'; + const PACKAGE_VERSION = '4.20.0'; /** * HTML container ID for the IDC screen on My Jetpack page. diff --git a/projects/packages/sync/CHANGELOG.md b/projects/packages/sync/CHANGELOG.md index 61d120c446774..edfd12032e861 100644 --- a/projects/packages/sync/CHANGELOG.md +++ b/projects/packages/sync/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.10.5] - 2024-03-29 +### Changed +- Update dependencies. + ## [2.10.4] - 2024-03-27 ### Fixed - Fix handling of error message when sync wpcom rest api could not be enabled [#36578] @@ -1085,6 +1089,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Packages: Move sync to a classmapped package +[2.10.5]: https://github.com/Automattic/jetpack-sync/compare/v2.10.4...v2.10.5 [2.10.4]: https://github.com/Automattic/jetpack-sync/compare/v2.10.3...v2.10.4 [2.10.3]: https://github.com/Automattic/jetpack-sync/compare/v2.10.2...v2.10.3 [2.10.2]: https://github.com/Automattic/jetpack-sync/compare/v2.10.1...v2.10.2 diff --git a/projects/packages/sync/src/class-package-version.php b/projects/packages/sync/src/class-package-version.php index 821454065af7a..1835261373fb9 100644 --- a/projects/packages/sync/src/class-package-version.php +++ b/projects/packages/sync/src/class-package-version.php @@ -12,7 +12,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '2.10.4'; + const PACKAGE_VERSION = '2.10.5'; const PACKAGE_SLUG = 'sync'; diff --git a/projects/plugins/boost/CHANGELOG.md b/projects/plugins/boost/CHANGELOG.md index 525307d996ce9..c4daee53fb420 100644 --- a/projects/plugins/boost/CHANGELOG.md +++ b/projects/plugins/boost/CHANGELOG.md @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.2.1] - 2024-03-29 +### Added +- Cache: Ensure cache engine is loading every time the Settings page loads. [#36339] +- Cache: Clear cache if Boost module settings are changed [#36452] +- Cache: Show notification in site health if cache system isn't loading. [#36449] +- Compatibility: Improved compatibility with SEO plugins for smoother Cloud CSS generation. [#36556] + +### Changed +- Cloud CSS: Optimize regeneration time. [#36519] +- Cloud CSS: Update REST API endpoint to be available even if the module is turned off. [#36437] +- Performance History: Sanitize graph annotation text. [#36453] +- Speed Score: More accurately detect which modules are active when a speed score is requested. [#36534] +- General: Only show installation errors on plugins page. [#36390] +- General: Updated package dependencies. [#36585] +- General: Update getting started and upgrade copies. [#36475] + ## [3.2.0] - 2024-03-15 ### Fixed - Cache: Verify cache enabled on current site before saving cached data [#36350] @@ -403,6 +419,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First public alpha release +[3.2.1]: https://github.com/Automattic/jetpack-boost-production/compare/3.2.0...3.2.1 [3.2.0]: https://github.com/Automattic/jetpack-boost-production/compare/3.1.1...3.2.0 [3.1.1]: https://github.com/Automattic/jetpack-boost-production/compare/3.0.2...3.1.1 [3.0.2]: https://github.com/Automattic/jetpack-boost-production/compare/3.0.1...3.0.2 diff --git a/projects/plugins/boost/changelog/add-a4a-source-to-jetpack-connect-url b/projects/plugins/boost/changelog/add-a4a-source-to-jetpack-connect-url deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-a4a-source-to-jetpack-connect-url +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-bad-installation-notices-to-my-jetpack b/projects/plugins/boost/changelog/add-bad-installation-notices-to-my-jetpack deleted file mode 100644 index 7a8c5684ef4be..0000000000000 --- a/projects/plugins/boost/changelog/add-bad-installation-notices-to-my-jetpack +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Trigger red bubble notification when bad install is detected diff --git a/projects/plugins/boost/changelog/add-cache-clear-on-settings-change b/projects/plugins/boost/changelog/add-cache-clear-on-settings-change deleted file mode 100644 index 0d10369f8a5bc..0000000000000 --- a/projects/plugins/boost/changelog/add-cache-clear-on-settings-change +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Cache: Clear cache if Boost module settings are changed diff --git a/projects/plugins/boost/changelog/add-check-cache-loaded b/projects/plugins/boost/changelog/add-check-cache-loaded deleted file mode 100644 index 7df46e492040c..0000000000000 --- a/projects/plugins/boost/changelog/add-check-cache-loaded +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Cache: Check cache engine status on Settings page load diff --git a/projects/plugins/boost/changelog/add-get-heartbeat-data-rest-endpoint b/projects/plugins/boost/changelog/add-get-heartbeat-data-rest-endpoint deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-get-heartbeat-data-rest-endpoint +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-idc-package-version-tracking b/projects/plugins/boost/changelog/add-idc-package-version-tracking deleted file mode 100644 index 2801f40a5c5ac..0000000000000 --- a/projects/plugins/boost/changelog/add-idc-package-version-tracking +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 b/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-idc-package-version-tracking#2 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-jetpack.idcUrlValidation_to_rest b/projects/plugins/boost/changelog/add-jetpack.idcUrlValidation_to_rest deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-jetpack.idcUrlValidation_to_rest +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-module-active-status b/projects/plugins/boost/changelog/add-module-active-status deleted file mode 100644 index e5aa8e4db7867..0000000000000 --- a/projects/plugins/boost/changelog/add-module-active-status +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Speed Score: More accurately detect which modules are active when a speed score is requested. diff --git a/projects/plugins/boost/changelog/add-my-jetpack-ai-detail-table b/projects/plugins/boost/changelog/add-my-jetpack-ai-detail-table deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-my-jetpack-ai-detail-table +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-phan-more-constant-stubs b/projects/plugins/boost/changelog/add-phan-more-constant-stubs deleted file mode 100644 index 40c026ae51a49..0000000000000 --- a/projects/plugins/boost/changelog/add-phan-more-constant-stubs +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Update phan baseline for config changes. No change to functionality. - - diff --git a/projects/plugins/boost/changelog/add-phan-wp-constant-stubs b/projects/plugins/boost/changelog/add-phan-wp-constant-stubs deleted file mode 100644 index 94a5f73d3ea02..0000000000000 --- a/projects/plugins/boost/changelog/add-phan-wp-constant-stubs +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Update Phan baseline for config change. No change to functionality. - - diff --git a/projects/plugins/boost/changelog/add-phpdoc-return-never b/projects/plugins/boost/changelog/add-phpdoc-return-never deleted file mode 100644 index 19cf68dd8fb88..0000000000000 --- a/projects/plugins/boost/changelog/add-phpdoc-return-never +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated php docs to use `@return never` where appropriate. No change to functionality. - - diff --git a/projects/plugins/boost/changelog/add-remote-connect-rest-endpoint b/projects/plugins/boost/changelog/add-remote-connect-rest-endpoint deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-remote-connect-rest-endpoint +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-remote-provision-rest-endpoint b/projects/plugins/boost/changelog/add-remote-provision-rest-endpoint deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-remote-provision-rest-endpoint +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-remote-register-rest-endpoint b/projects/plugins/boost/changelog/add-remote-register-rest-endpoint deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-remote-register-rest-endpoint +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/add-test-connection-rest-endpoint b/projects/plugins/boost/changelog/add-test-connection-rest-endpoint deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/add-test-connection-rest-endpoint +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/fix-phan-yoast-polyfills b/projects/plugins/boost/changelog/fix-phan-yoast-polyfills deleted file mode 100644 index ad5a4f15631c6..0000000000000 --- a/projects/plugins/boost/changelog/fix-phan-yoast-polyfills +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Update phan baseline for base config change. No change to functionality. - - diff --git a/projects/plugins/boost/changelog/prerelease b/projects/plugins/boost/changelog/prerelease deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/prerelease +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/renovate-wordpress-monorepo b/projects/plugins/boost/changelog/renovate-wordpress-monorepo deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/plugins/boost/changelog/renovate-wordpress-monorepo +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/plugins/boost/changelog/update-activate-license-to-hide-on-atomic b/projects/plugins/boost/changelog/update-activate-license-to-hide-on-atomic deleted file mode 100644 index 066d684be89a0..0000000000000 --- a/projects/plugins/boost/changelog/update-activate-license-to-hide-on-atomic +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Update Activate License to be hidden on Atomic sites. - - diff --git a/projects/plugins/boost/changelog/update-activation-upgrade-screens-copy b/projects/plugins/boost/changelog/update-activation-upgrade-screens-copy deleted file mode 100644 index 91bb809ad14c7..0000000000000 --- a/projects/plugins/boost/changelog/update-activation-upgrade-screens-copy +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Update getting started and upgrade copies. diff --git a/projects/plugins/boost/changelog/update-cloud-css-endpoint-to-always-be-available b/projects/plugins/boost/changelog/update-cloud-css-endpoint-to-always-be-available deleted file mode 100644 index cb54f301ee2ad..0000000000000 --- a/projects/plugins/boost/changelog/update-cloud-css-endpoint-to-always-be-available +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Cloud CSS: Update REST API endpoint to be available even if the module is turned off. diff --git a/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page b/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page deleted file mode 100644 index 7f125b899fd84..0000000000000 --- a/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Only show installation errors on plugins page diff --git a/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page#2 b/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page#2 deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/update-installation-error-to-only-show-on-plugins-page#2 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/update-move-notice-to-my-jetpack b/projects/plugins/boost/changelog/update-move-notice-to-my-jetpack deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/update-move-notice-to-my-jetpack +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/update-query-params b/projects/plugins/boost/changelog/update-query-params deleted file mode 100644 index 08104d23c8afa..0000000000000 --- a/projects/plugins/boost/changelog/update-query-params +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Compatibility: Improved compatibility with SEO plugins for smoother Cloud CSS generation diff --git a/projects/plugins/boost/changelog/update-redirect-from-interstitial-if-product-active b/projects/plugins/boost/changelog/update-redirect-from-interstitial-if-product-active deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/update-redirect-from-interstitial-if-product-active +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/changelog/update-refactor-speed-score-modules b/projects/plugins/boost/changelog/update-refactor-speed-score-modules deleted file mode 100644 index e5841f4148330..0000000000000 --- a/projects/plugins/boost/changelog/update-refactor-speed-score-modules +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Update Speed Score modules to be an array while keeping things backward compatible. - - diff --git a/projects/plugins/boost/changelog/update-sanitize-annotation-text b/projects/plugins/boost/changelog/update-sanitize-annotation-text deleted file mode 100644 index 86548c6f0c1d3..0000000000000 --- a/projects/plugins/boost/changelog/update-sanitize-annotation-text +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Performance History: Sanitize graph annotation text diff --git a/projects/plugins/boost/changelog/update-smarter-cloud-css b/projects/plugins/boost/changelog/update-smarter-cloud-css deleted file mode 100644 index 6bda8c0252a5d..0000000000000 --- a/projects/plugins/boost/changelog/update-smarter-cloud-css +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Cloud CSS: Optimize regeneration time. diff --git a/projects/plugins/boost/changelog/update-smarter-cloud-css#2 b/projects/plugins/boost/changelog/update-smarter-cloud-css#2 deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/boost/changelog/update-smarter-cloud-css#2 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/boost/composer.json b/projects/plugins/boost/composer.json index 34d3fdc3fdc17..55f5786bc9ad4 100644 --- a/projects/plugins/boost/composer.json +++ b/projects/plugins/boost/composer.json @@ -3,7 +3,7 @@ "description": "Boost your WordPress site's performance, from the creators of Jetpack", "type": "library", "license": "GPL-2.0-or-later", - "version": "3.3.0-alpha", + "version": "3.2.1", "authors": [ { "name": "Automattic, Inc.", @@ -73,7 +73,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_3_0_alpha", + "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_1", "allow-plugins": { "roots/wordpress-core-installer": true, "automattic/jetpack-autoloader": true, diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 72cc6a6e8159e..1cf6be3ed2516 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/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": "d68c8e5185ebb50f76013c84fdcf115e", + "content-hash": "5660ce4110b6eb8d5a301b0d63544f5b", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", diff --git a/projects/plugins/boost/jetpack-boost.php b/projects/plugins/boost/jetpack-boost.php index 43b27e8d728b1..e59b6192d05af 100644 --- a/projects/plugins/boost/jetpack-boost.php +++ b/projects/plugins/boost/jetpack-boost.php @@ -9,7 +9,7 @@ * Plugin Name: Jetpack Boost * Plugin URI: https://jetpack.com/boost * Description: Boost your WordPress site's performance, from the creators of Jetpack - * Version: 3.3.0-alpha + * Version: 3.2.1 * Author: Automattic - Jetpack Site Speed team * Author URI: https://jetpack.com/boost/ * License: GPL-2.0+ @@ -29,7 +29,7 @@ die; } -define( 'JETPACK_BOOST_VERSION', '3.3.0-alpha' ); +define( 'JETPACK_BOOST_VERSION', '3.2.1' ); define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' ); if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) { diff --git a/projects/plugins/boost/package.json b/projects/plugins/boost/package.json index 84beb141f3bf6..ef6c82922066d 100644 --- a/projects/plugins/boost/package.json +++ b/projects/plugins/boost/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-boost", - "version": "3.3.0-alpha", + "version": "3.2.1", "description": "Boost your WordPress site's performance, from the creators of Jetpack", "directories": { "test": "tests" diff --git a/projects/plugins/boost/readme.txt b/projects/plugins/boost/readme.txt index bb78b4784b003..66121a25ffa81 100644 --- a/projects/plugins/boost/readme.txt +++ b/projects/plugins/boost/readme.txt @@ -183,11 +183,21 @@ If you run into compatibility issues, please do let us know. You can drop us a l 2. Jetpack Boost Speed Improvement == Changelog == -### 3.2.0 - 2024-03-15 -#### Fixed -- Cache: Verify cache enabled on current site before saving cached data -- General: Added filter documentation -- General: Removed duplicate uninstall hook, fixing unnecessary database writes +### 3.2.1 - 2024-03-29 +#### Added +- Cache: Ensure cache engine is loading every time the Settings page loads. +- Cache: Clear cache if Boost module settings are changed +- Cache: Show notification in site health if cache system isn't loading. +- Compatibility: Improved compatibility with SEO plugins for smoother Cloud CSS generation. + +#### Changed +- Cloud CSS: Optimize regeneration time. +- Cloud CSS: Update REST API endpoint to be available even if the module is turned off. +- Performance History: Sanitize graph annotation text. +- Speed Score: More accurately detect which modules are active when a speed score is requested. +- General: Only show installation errors on plugins page. +- General: Updated package dependencies. +- General: Update getting started and upgrade copies. -------- From bffe56d073ae1612c39aa3d1e0055a8855d2f9d8 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 1 Apr 2024 10:10:30 -0400 Subject: [PATCH 25/37] CI: Disable 8.4 PHPCompatibility rule in dev run (#36673) We run PHPCompatibility's develop branch against our stuff, because they haven't done a release since 2019 because (as far as I know) they're still waiting on getting PHP 8.0 support completely finished before they release 10.0.0. It seems they've now added a rule for PHP 8.4's deprecation of declaring parameters as nullable like `ClassName $param = null`. The ideal solution would be to change those to `?ClassName $param = null`, but until we can drop PHP 7.0 support we can't do that. So for now let's disable that sniff. Hopefully by the time we start looking at PHP 8.4 support https://core.trac.wordpress.org/ticket/58719 will have happened so we can do the right thing instead of having to change those to be like `$param = null` instead. --- .github/files/phpcompatibility-dev-phpcs.xml | 3 +++ .../identity-crisis/changelog/fix-phpcompatibility-dev-phpcs | 5 +++++ projects/packages/identity-crisis/package.json | 2 +- .../packages/identity-crisis/src/class-identity-crisis.php | 2 +- .../my-jetpack/changelog/fix-phpcompatibility-dev-phpcs | 5 +++++ projects/packages/my-jetpack/package.json | 2 +- projects/packages/my-jetpack/src/class-initializer.php | 2 +- .../plugins/boost/changelog/fix-phpcompatibility-dev-phpcs | 5 +++++ projects/plugins/boost/composer.json | 4 ++-- projects/plugins/boost/composer.lock | 2 +- projects/plugins/boost/jetpack-boost.php | 4 ++-- projects/plugins/boost/package.json | 2 +- 12 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs create mode 100644 projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs create mode 100644 projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs diff --git a/.github/files/phpcompatibility-dev-phpcs.xml b/.github/files/phpcompatibility-dev-phpcs.xml index 59c6bab7d92c8..300dc543d04cb 100644 --- a/.github/files/phpcompatibility-dev-phpcs.xml +++ b/.github/files/phpcompatibility-dev-phpcs.xml @@ -8,5 +8,8 @@ + + + diff --git a/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs b/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs new file mode 100644 index 0000000000000..435799df4ad8d --- /dev/null +++ b/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 + + diff --git a/projects/packages/identity-crisis/package.json b/projects/packages/identity-crisis/package.json index 9da2a3208afd8..03f43f8a84d79 100644 --- a/projects/packages/identity-crisis/package.json +++ b/projects/packages/identity-crisis/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-identity-crisis", - "version": "0.18.0", + "version": "0.18.1-alpha", "description": "Jetpack Identity Crisis", "main": "_inc/admin.jsx", "repository": { diff --git a/projects/packages/identity-crisis/src/class-identity-crisis.php b/projects/packages/identity-crisis/src/class-identity-crisis.php index 8cbf524bc54ea..31abaef6e7a10 100644 --- a/projects/packages/identity-crisis/src/class-identity-crisis.php +++ b/projects/packages/identity-crisis/src/class-identity-crisis.php @@ -26,7 +26,7 @@ class Identity_Crisis { /** * Package Version */ - const PACKAGE_VERSION = '0.18.0'; + const PACKAGE_VERSION = '0.18.1-alpha'; /** * Package Slug diff --git a/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs b/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs new file mode 100644 index 0000000000000..435799df4ad8d --- /dev/null +++ b/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 + + diff --git a/projects/packages/my-jetpack/package.json b/projects/packages/my-jetpack/package.json index 8e4f7d278a05c..0dc79bafa0c5b 100644 --- a/projects/packages/my-jetpack/package.json +++ b/projects/packages/my-jetpack/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-my-jetpack", - "version": "4.20.0", + "version": "4.20.1-alpha", "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme", "bugs": { diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 7b93f28d3b822..181bbdeb98ab9 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -36,7 +36,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '4.20.0'; + const PACKAGE_VERSION = '4.20.1-alpha'; /** * HTML container ID for the IDC screen on My Jetpack page. diff --git a/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs b/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs new file mode 100644 index 0000000000000..435799df4ad8d --- /dev/null +++ b/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 + + diff --git a/projects/plugins/boost/composer.json b/projects/plugins/boost/composer.json index 55f5786bc9ad4..8552434b79778 100644 --- a/projects/plugins/boost/composer.json +++ b/projects/plugins/boost/composer.json @@ -3,7 +3,7 @@ "description": "Boost your WordPress site's performance, from the creators of Jetpack", "type": "library", "license": "GPL-2.0-or-later", - "version": "3.2.1", + "version": "3.2.2-alpha", "authors": [ { "name": "Automattic, Inc.", @@ -73,7 +73,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_1", + "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_2_alpha", "allow-plugins": { "roots/wordpress-core-installer": true, "automattic/jetpack-autoloader": true, diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 1cf6be3ed2516..a5fb2d3cb3bd3 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/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": "5660ce4110b6eb8d5a301b0d63544f5b", + "content-hash": "eee808f5a3df537d4ca2fc636f2a820a", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", diff --git a/projects/plugins/boost/jetpack-boost.php b/projects/plugins/boost/jetpack-boost.php index e59b6192d05af..fb64fcf7d30bb 100644 --- a/projects/plugins/boost/jetpack-boost.php +++ b/projects/plugins/boost/jetpack-boost.php @@ -9,7 +9,7 @@ * Plugin Name: Jetpack Boost * Plugin URI: https://jetpack.com/boost * Description: Boost your WordPress site's performance, from the creators of Jetpack - * Version: 3.2.1 + * Version: 3.2.2-alpha * Author: Automattic - Jetpack Site Speed team * Author URI: https://jetpack.com/boost/ * License: GPL-2.0+ @@ -29,7 +29,7 @@ die; } -define( 'JETPACK_BOOST_VERSION', '3.2.1' ); +define( 'JETPACK_BOOST_VERSION', '3.2.2-alpha' ); define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' ); if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) { diff --git a/projects/plugins/boost/package.json b/projects/plugins/boost/package.json index ef6c82922066d..6f42ed8b0a80e 100644 --- a/projects/plugins/boost/package.json +++ b/projects/plugins/boost/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-boost", - "version": "3.2.1", + "version": "3.2.2-alpha", "description": "Boost your WordPress site's performance, from the creators of Jetpack", "directories": { "test": "tests" From 7d23bd6d4393f3bb691d822239eb3ccbec308bdc Mon Sep 17 00:00:00 2001 From: Igor Zinovyev Date: Mon, 1 Apr 2024 17:46:15 +0300 Subject: [PATCH 26/37] Backport mu-wpcom-plugin 2.1.11, jetpack 13.3-beta Changes (#36672) * Changelog and readme.txt edits. * Amend readme.txt * Init new cycle * Version bumps * Fixed up project versions. --- projects/js-packages/ai-client/CHANGELOG.md | 10 +++++++ .../changelog/add-format-response-image-hook | 4 --- .../changelog/fix-ai-client-change-handler | 4 --- .../update-ai-client-image-generation-prompt | 4 --- ...ate-feature-image-connect-image-generation | 4 --- projects/js-packages/ai-client/package.json | 2 +- projects/packages/backup/CHANGELOG.md | 5 ++++ .../packages/backup/changelog/force-a-release | 4 --- .../backup/src/class-package-version.php | 2 +- projects/packages/blaze/CHANGELOG.md | 5 ++++ .../add-phan-stub-wordpress-functions | 4 --- projects/packages/blaze/package.json | 2 +- .../packages/blaze/src/class-dashboard.php | 2 +- .../packages/identity-crisis/CHANGELOG.md | 5 ++++ .../changelog/fix-idc-tests-cleanup | 4 --- .../packages/identity-crisis/package.json | 2 +- .../src/class-identity-crisis.php | 2 +- .../packages/jetpack-mu-wpcom/CHANGELOG.md | 10 +++++++ .../add-phan-stub-wordpress-functions | 4 --- .../add-use-dotcom-wp-block-patterns | 4 --- .../changelog/add-wpcom-simple-odyssey-stats | 4 --- .../changelog/update-seo-settings | 4 --- .../packages/jetpack-mu-wpcom/package.json | 2 +- .../src/class-jetpack-mu-wpcom.php | 2 +- projects/packages/my-jetpack/CHANGELOG.md | 5 ++++ .../add-phan-stub-wordpress-functions | 4 --- projects/packages/my-jetpack/package.json | 2 +- .../my-jetpack/src/class-initializer.php | 2 +- .../packages/scheduled-updates/CHANGELOG.md | 5 ++++ .../changelog/update-seo-settings | 4 --- .../src/class-scheduled-updates.php | 2 +- projects/packages/stats-admin/CHANGELOG.md | 8 +++++ .../add-phan-stub-wordpress-functions | 4 --- .../update-commercial-classification-endpoint | 4 --- .../changelog/update-odyssey-stats-config | 4 --- projects/packages/stats-admin/package.json | 2 +- .../packages/stats-admin/src/class-main.php | 2 +- projects/packages/stats/CHANGELOG.md | 6 ++++ .../changelog/add-rest-endpoint-get-blog | 4 --- .../changelog/add-version-constant-composer | 4 --- .../stats/src/class-package-version.php | 2 +- .../stats/src/class-rest-provider.php | 4 +-- projects/plugins/jetpack/CHANGELOG.md | 28 ++++++++++++++++++ .../add-disable-ai-featured-image-button | 4 --- .../changelog/add-featured-image-modal | 4 --- .../add-idc-package-version-tracking | 4 --- .../add-idc-package-version-tracking#2 | 5 ---- .../add-jetpack.idcUrlValidation_to_rest | 5 ---- .../add-phan-stub-wordpress-functions | 4 --- ...add-re-identification-commercial-endpoints | 5 ---- .../changelog/add-rest-endpoint-get-blog | 5 ---- .../jetpack/changelog/add-set-featured-image | 4 --- .../changelog/add-version-constant-composer | 5 ---- .../jetpack/changelog/fix-blog-stats-version | 3 -- .../changelog/fix-carousel-lightbox-disable | 4 --- ...-google-embed-blocks-not-translatable-text | 4 --- .../fix-jetpack-my-jetpack-version-ref | 5 ---- .../jetpack/changelog/fix-mapkit-accuracy | 5 ---- .../fix-recipe-block-not-translatable-text | 4 --- .../changelog/fix-subscription-manage-label | 4 --- .../jetpack/changelog/init-release-cycle | 2 +- .../refactor-jetpacl-plugin-connect-screen | 5 ---- .../remove-ai-assistant-hook-dead-code | 4 --- .../changelog/untangling-nav-reunification | 4 --- .../changelog/update-add-stats-utm-endpoints | 5 ---- ...ate-feature-image-connect-image-generation | 4 --- .../update-featured-image-add-event-tracking | 4 --- .../update-jetpack-ai-remove-unused-code | 4 --- .../update-login-block-no-manage-link | 4 --- ...direct-from-interstitial-if-product-active | 5 ---- .../jetpack/changelog/update-seo-settings | 4 --- .../changelog/update-set-ai-featured-image-ux | 4 --- .../jetpack/changelog/update-sso-no-jquery | 4 --- .../update-subscribe-block-invalid-content | 4 --- ...pdate-subscriber-popup-invalid-content-fix | 4 --- .../update-subscription-site-login-navigation | 4 --- projects/plugins/jetpack/composer.json | 2 +- projects/plugins/jetpack/jetpack.php | 4 +-- .../modules/carousel/jetpack-carousel.php | 2 +- projects/plugins/jetpack/package.json | 2 +- projects/plugins/jetpack/readme.txt | 29 ++++++++++++++++++- projects/plugins/mu-wpcom-plugin/CHANGELOG.md | 4 +++ .../changelog/add-wpcom-simple-odyssey-stats | 5 ---- .../changelog/fix-use-dotcom-pattern-library | 5 ---- .../plugins/mu-wpcom-plugin/composer.json | 2 +- .../mu-wpcom-plugin/mu-wpcom-plugin.php | 2 +- projects/plugins/mu-wpcom-plugin/package.json | 2 +- 87 files changed, 144 insertions(+), 245 deletions(-) delete mode 100644 projects/js-packages/ai-client/changelog/add-format-response-image-hook delete mode 100644 projects/js-packages/ai-client/changelog/fix-ai-client-change-handler delete mode 100644 projects/js-packages/ai-client/changelog/update-ai-client-image-generation-prompt delete mode 100644 projects/js-packages/ai-client/changelog/update-feature-image-connect-image-generation delete mode 100644 projects/packages/backup/changelog/force-a-release delete mode 100644 projects/packages/blaze/changelog/add-phan-stub-wordpress-functions delete mode 100644 projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup delete mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions delete mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns delete mode 100644 projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats delete mode 100644 projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings delete mode 100644 projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions delete mode 100644 projects/packages/scheduled-updates/changelog/update-seo-settings delete mode 100644 projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions delete mode 100644 projects/packages/stats-admin/changelog/update-commercial-classification-endpoint delete mode 100644 projects/packages/stats-admin/changelog/update-odyssey-stats-config delete mode 100644 projects/packages/stats/changelog/add-rest-endpoint-get-blog delete mode 100644 projects/packages/stats/changelog/add-version-constant-composer delete mode 100644 projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button delete mode 100644 projects/plugins/jetpack/changelog/add-featured-image-modal delete mode 100644 projects/plugins/jetpack/changelog/add-idc-package-version-tracking delete mode 100644 projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 delete mode 100644 projects/plugins/jetpack/changelog/add-jetpack.idcUrlValidation_to_rest delete mode 100644 projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions delete mode 100644 projects/plugins/jetpack/changelog/add-re-identification-commercial-endpoints delete mode 100644 projects/plugins/jetpack/changelog/add-rest-endpoint-get-blog delete mode 100644 projects/plugins/jetpack/changelog/add-set-featured-image delete mode 100644 projects/plugins/jetpack/changelog/add-version-constant-composer delete mode 100644 projects/plugins/jetpack/changelog/fix-blog-stats-version delete mode 100644 projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable delete mode 100644 projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text delete mode 100644 projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref delete mode 100644 projects/plugins/jetpack/changelog/fix-mapkit-accuracy delete mode 100644 projects/plugins/jetpack/changelog/fix-recipe-block-not-translatable-text delete mode 100644 projects/plugins/jetpack/changelog/fix-subscription-manage-label delete mode 100644 projects/plugins/jetpack/changelog/refactor-jetpacl-plugin-connect-screen delete mode 100644 projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code delete mode 100644 projects/plugins/jetpack/changelog/untangling-nav-reunification delete mode 100644 projects/plugins/jetpack/changelog/update-add-stats-utm-endpoints delete mode 100644 projects/plugins/jetpack/changelog/update-feature-image-connect-image-generation delete mode 100644 projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking delete mode 100644 projects/plugins/jetpack/changelog/update-jetpack-ai-remove-unused-code delete mode 100644 projects/plugins/jetpack/changelog/update-login-block-no-manage-link delete mode 100644 projects/plugins/jetpack/changelog/update-redirect-from-interstitial-if-product-active delete mode 100644 projects/plugins/jetpack/changelog/update-seo-settings delete mode 100644 projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux delete mode 100644 projects/plugins/jetpack/changelog/update-sso-no-jquery delete mode 100644 projects/plugins/jetpack/changelog/update-subscribe-block-invalid-content delete mode 100644 projects/plugins/jetpack/changelog/update-subscriber-popup-invalid-content-fix delete mode 100644 projects/plugins/jetpack/changelog/update-subscription-site-login-navigation delete mode 100644 projects/plugins/mu-wpcom-plugin/changelog/add-wpcom-simple-odyssey-stats delete mode 100644 projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library diff --git a/projects/js-packages/ai-client/CHANGELOG.md b/projects/js-packages/ai-client/CHANGELOG.md index d350f850bbe83..0a12cbf9f3792 100644 --- a/projects/js-packages/ai-client/CHANGELOG.md +++ b/projects/js-packages/ai-client/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.11.0] - 2024-04-01 +### Added +- AI Client: include prompt to generate featured image based on post content. [#36591] +- Support different responses in image hook [#36626] + +### Fixed +- AI Client: fix a bug where quick prompts would not work after getting suggested content [#36651] +- AI Client: set request content type as JSON on image generation hook and use rectangular images instead of square images. [#36620] + ## [0.10.1] - 2024-03-27 ### Changed - Updated package dependencies. [#36539, #36585] @@ -263,6 +272,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. [#31659] - Updated package dependencies. [#31785] +[0.11.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.10.1...v0.11.0 [0.10.1]: https://github.com/Automattic/jetpack-ai-client/compare/v0.10.0...v0.10.1 [0.10.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.9.0...v0.10.0 [0.9.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.8.2...v0.9.0 diff --git a/projects/js-packages/ai-client/changelog/add-format-response-image-hook b/projects/js-packages/ai-client/changelog/add-format-response-image-hook deleted file mode 100644 index 1e6e018d93d38..0000000000000 --- a/projects/js-packages/ai-client/changelog/add-format-response-image-hook +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Support different responses in image hook diff --git a/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler b/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler deleted file mode 100644 index e221a91b4e394..0000000000000 --- a/projects/js-packages/ai-client/changelog/fix-ai-client-change-handler +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fixed - -AI Client: fix a bug where quick prompts would not work after getting suggested content diff --git a/projects/js-packages/ai-client/changelog/update-ai-client-image-generation-prompt b/projects/js-packages/ai-client/changelog/update-ai-client-image-generation-prompt deleted file mode 100644 index 0f4170444bfe0..0000000000000 --- a/projects/js-packages/ai-client/changelog/update-ai-client-image-generation-prompt +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -AI Client: include prompt to generate featured image based on post content. diff --git a/projects/js-packages/ai-client/changelog/update-feature-image-connect-image-generation b/projects/js-packages/ai-client/changelog/update-feature-image-connect-image-generation deleted file mode 100644 index 60c1444bce2c3..0000000000000 --- a/projects/js-packages/ai-client/changelog/update-feature-image-connect-image-generation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fixed - -AI Client: set request content type as JSON on image generation hook and use rectangular images instead of square images. diff --git a/projects/js-packages/ai-client/package.json b/projects/js-packages/ai-client/package.json index 1cd6883510045..cce61fedadde1 100644 --- a/projects/js-packages/ai-client/package.json +++ b/projects/js-packages/ai-client/package.json @@ -1,7 +1,7 @@ { "private": false, "name": "@automattic/jetpack-ai-client", - "version": "0.11.0-alpha", + "version": "0.11.0", "description": "A JS client for consuming Jetpack AI services", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme", "bugs": { diff --git a/projects/packages/backup/CHANGELOG.md b/projects/packages/backup/CHANGELOG.md index bc173c976ad48..81c981d2b9cd2 100644 --- a/projects/packages/backup/CHANGELOG.md +++ b/projects/packages/backup/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.3.5] - 2024-04-01 +### Changed +- Update dependencies. [#36655] + ## [3.3.4] - 2024-03-27 ### Changed - Updated package dependencies. [#36585] @@ -593,6 +597,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add API endpoints and Jetpack Backup package for managing Help… +[3.3.5]: https://github.com/Automattic/jetpack-backup/compare/v3.3.4...v3.3.5 [3.3.4]: https://github.com/Automattic/jetpack-backup/compare/v3.3.3...v3.3.4 [3.3.3]: https://github.com/Automattic/jetpack-backup/compare/v3.3.2...v3.3.3 [3.3.2]: https://github.com/Automattic/jetpack-backup/compare/v3.3.1...v3.3.2 diff --git a/projects/packages/backup/changelog/force-a-release b/projects/packages/backup/changelog/force-a-release deleted file mode 100644 index d4ad6c7cc3379..0000000000000 --- a/projects/packages/backup/changelog/force-a-release +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Update dependencies. diff --git a/projects/packages/backup/src/class-package-version.php b/projects/packages/backup/src/class-package-version.php index 7405fe929da8c..c78bf3e047b52 100644 --- a/projects/packages/backup/src/class-package-version.php +++ b/projects/packages/backup/src/class-package-version.php @@ -16,7 +16,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '3.3.5-alpha'; + const PACKAGE_VERSION = '3.3.5'; const PACKAGE_SLUG = 'backup'; diff --git a/projects/packages/blaze/CHANGELOG.md b/projects/packages/blaze/CHANGELOG.md index 86d01f7c1ad02..3787e56c4304a 100644 --- a/projects/packages/blaze/CHANGELOG.md +++ b/projects/packages/blaze/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.20.1] - 2024-04-01 +### Added +- Change Phan baselines. [#36627] + ## [0.20.0] - 2024-03-27 ### Added - Adds the atomic flag to the Jetpack Blaze base site's configuration [#36562] @@ -334,6 +338,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated package dependencies. [#27906] +[0.20.1]: https://github.com/automattic/jetpack-blaze/compare/v0.20.0...v0.20.1 [0.20.0]: https://github.com/automattic/jetpack-blaze/compare/v0.19.3...v0.20.0 [0.19.3]: https://github.com/automattic/jetpack-blaze/compare/v0.19.2...v0.19.3 [0.19.2]: https://github.com/automattic/jetpack-blaze/compare/v0.19.1...v0.19.2 diff --git a/projects/packages/blaze/changelog/add-phan-stub-wordpress-functions b/projects/packages/blaze/changelog/add-phan-stub-wordpress-functions deleted file mode 100644 index 6ba42305f6abc..0000000000000 --- a/projects/packages/blaze/changelog/add-phan-stub-wordpress-functions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Change Phan baselines. diff --git a/projects/packages/blaze/package.json b/projects/packages/blaze/package.json index c091e9b4ed5eb..ab615d7d2c43f 100644 --- a/projects/packages/blaze/package.json +++ b/projects/packages/blaze/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-blaze", - "version": "0.20.1-alpha", + "version": "0.20.1", "description": "Attract high-quality traffic to your site using Blaze. Using this service, you can advertise a post or page on some of the millions of pages across WordPress.com and Tumblr from just $5 per day.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/blaze/#readme", "bugs": { diff --git a/projects/packages/blaze/src/class-dashboard.php b/projects/packages/blaze/src/class-dashboard.php index 88b04286aa1f5..1b17f179704bd 100644 --- a/projects/packages/blaze/src/class-dashboard.php +++ b/projects/packages/blaze/src/class-dashboard.php @@ -21,7 +21,7 @@ class Dashboard { * * @var string */ - const PACKAGE_VERSION = '0.20.1-alpha'; + const PACKAGE_VERSION = '0.20.1'; /** * List of dependencies needed to render the dashboard in wp-admin. diff --git a/projects/packages/identity-crisis/CHANGELOG.md b/projects/packages/identity-crisis/CHANGELOG.md index 91c8d97c4f5e6..7a7d100163c61 100644 --- a/projects/packages/identity-crisis/CHANGELOG.md +++ b/projects/packages/identity-crisis/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.18.1] - 2024-04-01 +### Changed +- Tests: moved tests from a separate files to the main tests file. [#36656] + ## [0.18.0] - 2024-03-29 ### Added - Packages: added version tracking for identity-crisis. [#36635] @@ -520,6 +524,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Use Connection/Urls for home_url and site_url functions migrated from Sync. +[0.18.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.18.0...v0.18.1 [0.18.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.6...v0.18.0 [0.17.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.5...v0.17.6 [0.17.5]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.4...v0.17.5 diff --git a/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup b/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup deleted file mode 100644 index 0b425be575f6a..0000000000000 --- a/projects/packages/identity-crisis/changelog/fix-idc-tests-cleanup +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Tests: moved tests from a separate files to the main tests file. diff --git a/projects/packages/identity-crisis/package.json b/projects/packages/identity-crisis/package.json index 03f43f8a84d79..c0c6a80db0bd4 100644 --- a/projects/packages/identity-crisis/package.json +++ b/projects/packages/identity-crisis/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-identity-crisis", - "version": "0.18.1-alpha", + "version": "0.18.2-alpha", "description": "Jetpack Identity Crisis", "main": "_inc/admin.jsx", "repository": { diff --git a/projects/packages/identity-crisis/src/class-identity-crisis.php b/projects/packages/identity-crisis/src/class-identity-crisis.php index 31abaef6e7a10..eae05042219f0 100644 --- a/projects/packages/identity-crisis/src/class-identity-crisis.php +++ b/projects/packages/identity-crisis/src/class-identity-crisis.php @@ -26,7 +26,7 @@ class Identity_Crisis { /** * Package Version */ - const PACKAGE_VERSION = '0.18.1-alpha'; + const PACKAGE_VERSION = '0.18.2-alpha'; /** * Package Slug diff --git a/projects/packages/jetpack-mu-wpcom/CHANGELOG.md b/projects/packages/jetpack-mu-wpcom/CHANGELOG.md index d702f1f873687..1fbe378529a82 100644 --- a/projects/packages/jetpack-mu-wpcom/CHANGELOG.md +++ b/projects/packages/jetpack-mu-wpcom/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [5.22.0] - 2024-04-01 +### Added +- Add Odyssey Stats to wpcom Simple Site [#36628] +- Change Phan baselines. [#36627] + +### Changed +- Dotcom patterns: use wp_block post type patterns in editor with all themes and hide core and Jetpack form patterns [#36588] +- General: update Phan configuration. [#36528] + ## [5.21.0] - 2024-03-27 ### Changed - Updated package dependencies. [#36585] @@ -687,6 +696,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Testing initial package release. +[5.22.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.21.0...v5.22.0 [5.21.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.20.0...v5.21.0 [5.20.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.19.0...v5.20.0 [5.19.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.18.0...v5.19.0 diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions b/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions deleted file mode 100644 index 6ba42305f6abc..0000000000000 --- a/projects/packages/jetpack-mu-wpcom/changelog/add-phan-stub-wordpress-functions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Change Phan baselines. diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns b/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns deleted file mode 100644 index aa21e7849790f..0000000000000 --- a/projects/packages/jetpack-mu-wpcom/changelog/add-use-dotcom-wp-block-patterns +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: changed - -Dotcom patterns: use wp_block post type patterns in editor with all themes and hide core and Jetpack form patterns diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats b/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats deleted file mode 100644 index a7be0df23cfb5..0000000000000 --- a/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-simple-odyssey-stats +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Add Odyssey Stats to wpcom Simple Site diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings b/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings deleted file mode 100644 index 8b2fa2c9a494a..0000000000000 --- a/projects/packages/jetpack-mu-wpcom/changelog/update-seo-settings +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -General: update Phan configuration. diff --git a/projects/packages/jetpack-mu-wpcom/package.json b/projects/packages/jetpack-mu-wpcom/package.json index 22c85edff1efb..a69dbbcab24e1 100644 --- a/projects/packages/jetpack-mu-wpcom/package.json +++ b/projects/packages/jetpack-mu-wpcom/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom", - "version": "5.22.0-alpha", + "version": "5.22.0", "description": "Enhances your site with features powered by WordPress.com", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme", "bugs": { diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 4df3757a742ba..b56952836c2c2 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -13,7 +13,7 @@ * Jetpack_Mu_Wpcom main class. */ class Jetpack_Mu_Wpcom { - const PACKAGE_VERSION = '5.22.0-alpha'; + const PACKAGE_VERSION = '5.22.0'; const PKG_DIR = __DIR__ . '/../'; const BASE_DIR = __DIR__ . '/'; const BASE_FILE = __FILE__; diff --git a/projects/packages/my-jetpack/CHANGELOG.md b/projects/packages/my-jetpack/CHANGELOG.md index b0ad1983c882a..4641fcfa252c3 100644 --- a/projects/packages/my-jetpack/CHANGELOG.md +++ b/projects/packages/my-jetpack/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.20.1] - 2024-04-01 +### Added +- Change Phan baselines. [#36627] + ## [4.20.0] - 2024-03-29 ### Added - Track active red bubble slugs on My Jetpack page view [#36611] @@ -1399,6 +1403,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created package +[4.20.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.20.0...4.20.1 [4.20.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.19.0...4.20.0 [4.19.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.18.0...4.19.0 [4.18.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.17.1...4.18.0 diff --git a/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions b/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions deleted file mode 100644 index 6ba42305f6abc..0000000000000 --- a/projects/packages/my-jetpack/changelog/add-phan-stub-wordpress-functions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Change Phan baselines. diff --git a/projects/packages/my-jetpack/package.json b/projects/packages/my-jetpack/package.json index 0dc79bafa0c5b..85b414560defd 100644 --- a/projects/packages/my-jetpack/package.json +++ b/projects/packages/my-jetpack/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-my-jetpack", - "version": "4.20.1-alpha", + "version": "4.20.2-alpha", "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme", "bugs": { diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 181bbdeb98ab9..50b8aa224edcf 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -36,7 +36,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '4.20.1-alpha'; + const PACKAGE_VERSION = '4.20.2-alpha'; /** * HTML container ID for the IDC screen on My Jetpack page. diff --git a/projects/packages/scheduled-updates/CHANGELOG.md b/projects/packages/scheduled-updates/CHANGELOG.md index 920660e90f9d3..79e0814b78429 100644 --- a/projects/packages/scheduled-updates/CHANGELOG.md +++ b/projects/packages/scheduled-updates/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.3] - 2024-04-01 +### Changed +- General: update Phan configuration. [#36528] + ## [0.5.2] - 2024-03-27 ### Changed - Internal updates. @@ -90,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Generate initial package for Scheduled Updates [#35796] +[0.5.3]: https://github.com/Automattic/scheduled-updates/compare/v0.5.2...v0.5.3 [0.5.2]: https://github.com/Automattic/scheduled-updates/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/Automattic/scheduled-updates/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/Automattic/scheduled-updates/compare/v0.4.1...v0.5.0 diff --git a/projects/packages/scheduled-updates/changelog/update-seo-settings b/projects/packages/scheduled-updates/changelog/update-seo-settings deleted file mode 100644 index 8b2fa2c9a494a..0000000000000 --- a/projects/packages/scheduled-updates/changelog/update-seo-settings +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -General: update Phan configuration. diff --git a/projects/packages/scheduled-updates/src/class-scheduled-updates.php b/projects/packages/scheduled-updates/src/class-scheduled-updates.php index 3fb6417ee5a1b..2b56ab200b033 100644 --- a/projects/packages/scheduled-updates/src/class-scheduled-updates.php +++ b/projects/packages/scheduled-updates/src/class-scheduled-updates.php @@ -20,7 +20,7 @@ class Scheduled_Updates { * * @var string */ - const PACKAGE_VERSION = '0.5.3-alpha'; + const PACKAGE_VERSION = '0.5.3'; /** * The cron event hook for the scheduled plugins update. * diff --git a/projects/packages/stats-admin/CHANGELOG.md b/projects/packages/stats-admin/CHANGELOG.md index a5084495c5270..1257173d5fadb 100644 --- a/projects/packages/stats-admin/CHANGELOG.md +++ b/projects/packages/stats-admin/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.18.0 - 2024-04-01 +### Added +- Change Phan baselines. [#36627] +- Stats: Add commercial classification endpoint [#36597] + +### Changed +- Add config fields for odyssey stats to be loaded in Simple Site Classic. [#36633] + ## 0.17.1 - 2024-03-25 ### Changed - Internal updates. diff --git a/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions b/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions deleted file mode 100644 index 6ba42305f6abc..0000000000000 --- a/projects/packages/stats-admin/changelog/add-phan-stub-wordpress-functions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Change Phan baselines. diff --git a/projects/packages/stats-admin/changelog/update-commercial-classification-endpoint b/projects/packages/stats-admin/changelog/update-commercial-classification-endpoint deleted file mode 100644 index db987ee32457c..0000000000000 --- a/projects/packages/stats-admin/changelog/update-commercial-classification-endpoint +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Stats: Add commercial classification endpoint diff --git a/projects/packages/stats-admin/changelog/update-odyssey-stats-config b/projects/packages/stats-admin/changelog/update-odyssey-stats-config deleted file mode 100644 index 84ef80e032af8..0000000000000 --- a/projects/packages/stats-admin/changelog/update-odyssey-stats-config +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Add config fields for odyssey stats to be loaded in Simple Site Classic. diff --git a/projects/packages/stats-admin/package.json b/projects/packages/stats-admin/package.json index f74eb678d0ca9..cdd58afee0b60 100644 --- a/projects/packages/stats-admin/package.json +++ b/projects/packages/stats-admin/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-stats-admin", - "version": "0.18.0-alpha", + "version": "0.18.0", "description": "Stats Dashboard", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/stats-admin/#readme", "bugs": { diff --git a/projects/packages/stats-admin/src/class-main.php b/projects/packages/stats-admin/src/class-main.php index 093e92b59bebe..4589b8236c4d9 100644 --- a/projects/packages/stats-admin/src/class-main.php +++ b/projects/packages/stats-admin/src/class-main.php @@ -22,7 +22,7 @@ class Main { /** * Stats version. */ - const VERSION = '0.18.0-alpha'; + const VERSION = '0.18.0'; /** * Singleton Main instance. diff --git a/projects/packages/stats/CHANGELOG.md b/projects/packages/stats/CHANGELOG.md index f673929ae6dec..4cdb339a5a6df 100644 --- a/projects/packages/stats/CHANGELOG.md +++ b/projects/packages/stats/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.12.0] - 2024-04-01 +### Added +- Add the 'stats/blog' REST endpoint. [#36571] +- Composer: added version constant for ststs package. [#36657] + ## [0.11.2] - 2024-03-25 ### Changed - Internal updates. @@ -145,6 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixing static method which was called without self reference. [#26640] +[0.12.0]: https://github.com/Automattic/jetpack-stats/compare/v0.11.2...v0.12.0 [0.11.2]: https://github.com/Automattic/jetpack-stats/compare/v0.11.1...v0.11.2 [0.11.1]: https://github.com/Automattic/jetpack-stats/compare/v0.11.0...v0.11.1 [0.11.0]: https://github.com/Automattic/jetpack-stats/compare/v0.10.1...v0.11.0 diff --git a/projects/packages/stats/changelog/add-rest-endpoint-get-blog b/projects/packages/stats/changelog/add-rest-endpoint-get-blog deleted file mode 100644 index 777c946ef9685..0000000000000 --- a/projects/packages/stats/changelog/add-rest-endpoint-get-blog +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: added - -Add the 'stats/blog' REST endpoint. diff --git a/projects/packages/stats/changelog/add-version-constant-composer b/projects/packages/stats/changelog/add-version-constant-composer deleted file mode 100644 index b75a4925c121f..0000000000000 --- a/projects/packages/stats/changelog/add-version-constant-composer +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: added - -Composer: added version constant for ststs package. diff --git a/projects/packages/stats/src/class-package-version.php b/projects/packages/stats/src/class-package-version.php index 4b11eb0b0c610..68d1d5601c7bd 100644 --- a/projects/packages/stats/src/class-package-version.php +++ b/projects/packages/stats/src/class-package-version.php @@ -12,7 +12,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '0.12.0-alpha'; + const PACKAGE_VERSION = '0.12.0'; const PACKAGE_SLUG = 'stats'; diff --git a/projects/packages/stats/src/class-rest-provider.php b/projects/packages/stats/src/class-rest-provider.php index 02cf21c29cb6e..22b3f02584256 100644 --- a/projects/packages/stats/src/class-rest-provider.php +++ b/projects/packages/stats/src/class-rest-provider.php @@ -15,7 +15,7 @@ /** * The REST API provider class. * - * @since $$next-version$$ + * @since 0.12.0 */ class REST_Provider { /** @@ -69,7 +69,7 @@ public function initialize_rest_api() { /** * Get the stats blog data. * - * @since $$next-version$$ + * @since 0.12.0 * * @return array */ diff --git a/projects/plugins/jetpack/CHANGELOG.md b/projects/plugins/jetpack/CHANGELOG.md index 385694690e7f4..1b3819209a4c7 100644 --- a/projects/plugins/jetpack/CHANGELOG.md +++ b/projects/plugins/jetpack/CHANGELOG.md @@ -2,6 +2,34 @@ ### This is a list detailing changes for all Jetpack releases. +## 13.3-beta - 2024-04-01 +### Enhancements +- Member login block: add ability to hide manage subscription -link. [#36602] + +### Improved compatibility +- Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. [#36565] +- SEO Tools: make the feature available on non-connected sites. [#36528] + +### Other changes +- Add Phan stub for wordpress functions. [#36627] +- AI Assistant: remove dead code from the suggestions hook [#36625] +- AI Assistant: Remove unused code [#36621] +- AI Featured Image: connect the image generation hook to the UI. [#36620] +- AI Featured Image: track events for generating, regenerating and using images [#36638] +- AI Plugin: Add modal and featured image usage [#36613] +- Disable AI Featured Image button if requires upgrade or no post content [#36653] +- Google Embed blocks: make proportion values translatable [#36641] +- Improve UX when setting AI Featured Image [#36643] +- Packages: add version tracking for identity-crisis package. [#36635] +- Recipe Block: make default texts translatable [#36624] +- Save generated AI image to library and set as featured image [#36626] +- SSO: remove jQuery dependency for improved performance. [#36605] +- Subscription login block: switch to singular "manage subscription" [#36603] +- Subscriptions: Add missing padding param to the Subscriber popup markup [#36619] +- Subscriptions: Fix Subscribe block invalid content [#36617] +- Subscription Site: Hook Subscriber Login block into the navigation [#36487] +- Untangling: return untangled admin menu from wpcom/v2/admin-menu endpoint for early classic view [#36601] + ## 13.3-a.9 - 2024-03-27 ### Bug fixes - Paid Content Block: Fix subscriber view content not rendering in WordPress.com reader. [#36512] diff --git a/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button b/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button deleted file mode 100644 index f21938dfb36e9..0000000000000 --- a/projects/plugins/jetpack/changelog/add-disable-ai-featured-image-button +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Disable AI Featured Image button if requires upgrade or no post content diff --git a/projects/plugins/jetpack/changelog/add-featured-image-modal b/projects/plugins/jetpack/changelog/add-featured-image-modal deleted file mode 100644 index 76ed754f862a7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-featured-image-modal +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -AI Plugin: Add modal and featured image usage diff --git a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking deleted file mode 100644 index 9c0f65a3721e9..0000000000000 --- a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Packages: add version tracking for identity-crisis package. diff --git a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 b/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-idc-package-version-tracking#2 +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/add-jetpack.idcUrlValidation_to_rest b/projects/plugins/jetpack/changelog/add-jetpack.idcUrlValidation_to_rest deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-jetpack.idcUrlValidation_to_rest +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions b/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions deleted file mode 100644 index c671a72e7351c..0000000000000 --- a/projects/plugins/jetpack/changelog/add-phan-stub-wordpress-functions +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Add Phan stub for wordpress functions. diff --git a/projects/plugins/jetpack/changelog/add-re-identification-commercial-endpoints b/projects/plugins/jetpack/changelog/add-re-identification-commercial-endpoints deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-re-identification-commercial-endpoints +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/add-rest-endpoint-get-blog b/projects/plugins/jetpack/changelog/add-rest-endpoint-get-blog deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-rest-endpoint-get-blog +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/add-set-featured-image b/projects/plugins/jetpack/changelog/add-set-featured-image deleted file mode 100644 index 9e5b9c35a14a6..0000000000000 --- a/projects/plugins/jetpack/changelog/add-set-featured-image +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Save generated AI image to library and set as featured image diff --git a/projects/plugins/jetpack/changelog/add-version-constant-composer b/projects/plugins/jetpack/changelog/add-version-constant-composer deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/add-version-constant-composer +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/fix-blog-stats-version b/projects/plugins/jetpack/changelog/fix-blog-stats-version deleted file mode 100644 index a37db205d4ad7..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-blog-stats-version +++ /dev/null @@ -1,3 +0,0 @@ -Significance: patch -Type: other -Comment: fix release version number listed in the Blog Stats block. diff --git a/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable b/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable deleted file mode 100644 index c874fe587656a..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-carousel-lightbox-disable +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: compat - -Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. diff --git a/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text b/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text deleted file mode 100644 index 7c1ebf3a129d8..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-google-embed-blocks-not-translatable-text +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Google Embed blocks: make proportion values translatable diff --git a/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref b/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref deleted file mode 100644 index a4496b1b619f2..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-jetpack-my-jetpack-version-ref +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Fixed a pnpm version reference for internal dependency - - diff --git a/projects/plugins/jetpack/changelog/fix-mapkit-accuracy b/projects/plugins/jetpack/changelog/fix-mapkit-accuracy deleted file mode 100644 index 4fb28779c697c..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-mapkit-accuracy +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Minor bugfix - - diff --git a/projects/plugins/jetpack/changelog/fix-recipe-block-not-translatable-text b/projects/plugins/jetpack/changelog/fix-recipe-block-not-translatable-text deleted file mode 100644 index b7774e77ad259..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-recipe-block-not-translatable-text +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Recipe Block: make default texts translatable diff --git a/projects/plugins/jetpack/changelog/fix-subscription-manage-label b/projects/plugins/jetpack/changelog/fix-subscription-manage-label deleted file mode 100644 index f513df762e12a..0000000000000 --- a/projects/plugins/jetpack/changelog/fix-subscription-manage-label +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Subscription login block: switch to singular "manage subscription" diff --git a/projects/plugins/jetpack/changelog/init-release-cycle b/projects/plugins/jetpack/changelog/init-release-cycle index 3dde3f5b557d0..34f3a4609a4b9 100644 --- a/projects/plugins/jetpack/changelog/init-release-cycle +++ b/projects/plugins/jetpack/changelog/init-release-cycle @@ -1,5 +1,5 @@ Significance: patch Type: other -Comment: Init 13.3-a.10 +Comment: Init 13.4-a.0 diff --git a/projects/plugins/jetpack/changelog/refactor-jetpacl-plugin-connect-screen b/projects/plugins/jetpack/changelog/refactor-jetpacl-plugin-connect-screen deleted file mode 100644 index 1f79de4e6555c..0000000000000 --- a/projects/plugins/jetpack/changelog/refactor-jetpacl-plugin-connect-screen +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Refactor the Jetpack plugin connect screen - - diff --git a/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code b/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code deleted file mode 100644 index 0c67209624ae9..0000000000000 --- a/projects/plugins/jetpack/changelog/remove-ai-assistant-hook-dead-code +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -AI Assistant: remove dead code from the suggestions hook diff --git a/projects/plugins/jetpack/changelog/untangling-nav-reunification b/projects/plugins/jetpack/changelog/untangling-nav-reunification deleted file mode 100644 index a5a9c0ca2d3ba..0000000000000 --- a/projects/plugins/jetpack/changelog/untangling-nav-reunification +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Untangling: return untangled admin menu from wpcom/v2/admin-menu endpoint for early classic view diff --git a/projects/plugins/jetpack/changelog/update-add-stats-utm-endpoints b/projects/plugins/jetpack/changelog/update-add-stats-utm-endpoints deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/update-add-stats-utm-endpoints +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/update-feature-image-connect-image-generation b/projects/plugins/jetpack/changelog/update-feature-image-connect-image-generation deleted file mode 100644 index 2472782c63f10..0000000000000 --- a/projects/plugins/jetpack/changelog/update-feature-image-connect-image-generation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -AI Featured Image: connect the image generation hook to the UI. diff --git a/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking b/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking deleted file mode 100644 index f64938c4543c1..0000000000000 --- a/projects/plugins/jetpack/changelog/update-featured-image-add-event-tracking +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -AI Featured Image: track events for generating, regenerating and using images diff --git a/projects/plugins/jetpack/changelog/update-jetpack-ai-remove-unused-code b/projects/plugins/jetpack/changelog/update-jetpack-ai-remove-unused-code deleted file mode 100644 index cac39bc36dcc2..0000000000000 --- a/projects/plugins/jetpack/changelog/update-jetpack-ai-remove-unused-code +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -AI Assistant: Remove unused code diff --git a/projects/plugins/jetpack/changelog/update-login-block-no-manage-link b/projects/plugins/jetpack/changelog/update-login-block-no-manage-link deleted file mode 100644 index 211c548e22b37..0000000000000 --- a/projects/plugins/jetpack/changelog/update-login-block-no-manage-link +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: enhancement - -Member login block: add ability to hide manage subscription -link. diff --git a/projects/plugins/jetpack/changelog/update-redirect-from-interstitial-if-product-active b/projects/plugins/jetpack/changelog/update-redirect-from-interstitial-if-product-active deleted file mode 100644 index a1c1831fa1ef7..0000000000000 --- a/projects/plugins/jetpack/changelog/update-redirect-from-interstitial-if-product-active +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: other -Comment: Updated composer.lock. - - diff --git a/projects/plugins/jetpack/changelog/update-seo-settings b/projects/plugins/jetpack/changelog/update-seo-settings deleted file mode 100644 index ba005bc7ad289..0000000000000 --- a/projects/plugins/jetpack/changelog/update-seo-settings +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: compat - -SEO Tools: make the feature available on non-connected sites. diff --git a/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux b/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux deleted file mode 100644 index a136382cea055..0000000000000 --- a/projects/plugins/jetpack/changelog/update-set-ai-featured-image-ux +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Improve UX when setting AI Featured Image diff --git a/projects/plugins/jetpack/changelog/update-sso-no-jquery b/projects/plugins/jetpack/changelog/update-sso-no-jquery deleted file mode 100644 index e9b4efaf77b82..0000000000000 --- a/projects/plugins/jetpack/changelog/update-sso-no-jquery +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -SSO: remove jQuery dependency for improved performance. diff --git a/projects/plugins/jetpack/changelog/update-subscribe-block-invalid-content b/projects/plugins/jetpack/changelog/update-subscribe-block-invalid-content deleted file mode 100644 index 5943d534f8ee6..0000000000000 --- a/projects/plugins/jetpack/changelog/update-subscribe-block-invalid-content +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Subscriptions: Fix Subscribe block invalid content diff --git a/projects/plugins/jetpack/changelog/update-subscriber-popup-invalid-content-fix b/projects/plugins/jetpack/changelog/update-subscriber-popup-invalid-content-fix deleted file mode 100644 index 9d6a450c98d1f..0000000000000 --- a/projects/plugins/jetpack/changelog/update-subscriber-popup-invalid-content-fix +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: other - -Subscriptions: Add missing padding param to the Subscriber popup markup diff --git a/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation b/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation deleted file mode 100644 index 9e71355559483..0000000000000 --- a/projects/plugins/jetpack/changelog/update-subscription-site-login-navigation +++ /dev/null @@ -1,4 +0,0 @@ -Significance: minor -Type: other - -Subscription Site: Hook Subscriber Login block into the navigation diff --git a/projects/plugins/jetpack/composer.json b/projects/plugins/jetpack/composer.json index a1c7abcbc374e..2f936d478bdc4 100644 --- a/projects/plugins/jetpack/composer.json +++ b/projects/plugins/jetpack/composer.json @@ -102,7 +102,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_3_a_10", + "autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_4_a_0", "allow-plugins": { "automattic/jetpack-autoloader": true, "automattic/jetpack-composer-plugin": true diff --git a/projects/plugins/jetpack/jetpack.php b/projects/plugins/jetpack/jetpack.php index 4a86651234a19..27cdc6aa6a112 100644 --- a/projects/plugins/jetpack/jetpack.php +++ b/projects/plugins/jetpack/jetpack.php @@ -4,7 +4,7 @@ * Plugin URI: https://jetpack.com * Description: Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things. * Author: Automattic - * Version: 13.3-a.10 + * Version: 13.4-a.0 * Author URI: https://jetpack.com * License: GPL2+ * Text Domain: jetpack @@ -34,7 +34,7 @@ define( 'JETPACK__MINIMUM_WP_VERSION', '6.3' ); define( 'JETPACK__MINIMUM_PHP_VERSION', '7.0' ); -define( 'JETPACK__VERSION', '13.3-a.10' ); +define( 'JETPACK__VERSION', '13.4-a.0' ); /** * Constant used to fetch the connection owner token diff --git a/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php b/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php index cac86b3a6d466..e085f661c0ff7 100644 --- a/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php +++ b/projects/plugins/jetpack/modules/carousel/jetpack-carousel.php @@ -213,7 +213,7 @@ public function maybe_enable_jp_carousel_single_images_media_file() { * Disable the "Lightbox" option offered in WordPress core * whenever Jetpack's Carousel feature is enabled. * - * @since $$next-version$$ + * @since 13.3 * * @param WP_Theme_JSON_Data $theme_json Class to access and update theme.json data. */ diff --git a/projects/plugins/jetpack/package.json b/projects/plugins/jetpack/package.json index b9a4311c6f2cc..2f46c9536479a 100644 --- a/projects/plugins/jetpack/package.json +++ b/projects/plugins/jetpack/package.json @@ -1,6 +1,6 @@ { "name": "Jetpack", - "version": "13.3.0-a.10", + "version": "13.4.0-a.0", "private": true, "description": "[Jetpack](https://jetpack.com/) is a WordPress plugin that supercharges your self-hosted WordPress site with the awesome cloud power of [WordPress.com](https://wordpress.com).", "homepage": "https://jetpack.com", diff --git a/projects/plugins/jetpack/readme.txt b/projects/plugins/jetpack/readme.txt index 5810a815206b2..dda4bb5e5b446 100644 --- a/projects/plugins/jetpack/readme.txt +++ b/projects/plugins/jetpack/readme.txt @@ -325,9 +325,36 @@ Jetpack Backup can do a full website migration to a new host, migrate theme file == Changelog == -### 13.3-a.9 - 2024-03-27 +### 13.3-beta - 2024-04-01 +#### Enhancements +- AI Assistant: Provide per-block quick actions to make them more relevant. +- Blocks: "Earn" category renamed to "Monetize". +- General: Only show installation errors on Plugins page. +- Jetpack AI: When the response includes a title and post title is empty, use provided title as post title. +- Member login block: add ability to hide manage subscription -link. +- My Jetpack: Trigger red bubble notification when a broken installation is detected. +- Newsletters: Display Email settings on Newsletter settings page. +- Newsletters: Ensure blog stats and top posts blocks do not render in email newsletters. +- Newsletters: Reorder settings cards to improve hierarchy. +- Newsletters: Use radio buttons instead of toggles on Email Settings. +- Sharing: Add a Bluesky sharing button. +- Sharing: add a Threads sharing button and a Threads sharing button block. +- Sharing: Add Native (Web Share) button to Sharing Buttons block. +- Sharing: Remove Like button from master bar. +- Social: Add support for an SMS button. + +#### Improved compatibility +- Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. +- General: Remove methods that were deprecated before the release of Jetpack 10.0, in 2021. +- SEO Tools: make the feature available on non-connected sites. +- Subscriptions: Remove subscription settings from reading options page. + #### Bug fixes +- Dashboard: Update the sharing button settings to clarify the available options (block or legacy sharing buttons). +- Enhanced Distribution: begin deprecation process as the Firehose is winding down. - Paid Content Block: Fix subscriber view content not rendering in WordPress.com reader. +- Sharing: avoid PHP warnings when using custom post types. +- Sharing: fix the display of the sharing block in some classic themes. - SSO: Disable WordPress.com invitation functionality for non-connected users. -------- diff --git a/projects/plugins/mu-wpcom-plugin/CHANGELOG.md b/projects/plugins/mu-wpcom-plugin/CHANGELOG.md index 561455bd61a4e..4ff2098149da5 100644 --- a/projects/plugins/mu-wpcom-plugin/CHANGELOG.md +++ b/projects/plugins/mu-wpcom-plugin/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.1.11 - 2024-04-01 +### Changed +- Internal updates. + ## 2.1.10 - 2024-03-27 ### Changed - Internal updates. diff --git a/projects/plugins/mu-wpcom-plugin/changelog/add-wpcom-simple-odyssey-stats b/projects/plugins/mu-wpcom-plugin/changelog/add-wpcom-simple-odyssey-stats deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/mu-wpcom-plugin/changelog/add-wpcom-simple-odyssey-stats +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library b/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library deleted file mode 100644 index 9aa70e3ec1f75..0000000000000 --- a/projects/plugins/mu-wpcom-plugin/changelog/fix-use-dotcom-pattern-library +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: changed -Comment: Updated composer.lock. - - diff --git a/projects/plugins/mu-wpcom-plugin/composer.json b/projects/plugins/mu-wpcom-plugin/composer.json index 56c3ffe394edf..7e19cbcb8bd7e 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.json +++ b/projects/plugins/mu-wpcom-plugin/composer.json @@ -46,6 +46,6 @@ ] }, "config": { - "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_1_11_alpha" + "autoloader-suffix": "d9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_pluginⓥ2_1_11" } } diff --git a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php index 440efcd9bf6cb..7defba629a528 100644 --- a/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php +++ b/projects/plugins/mu-wpcom-plugin/mu-wpcom-plugin.php @@ -3,7 +3,7 @@ * * Plugin Name: WordPress.com Features * Description: Test plugin for the jetpack-mu-wpcom package - * Version: 2.1.11-alpha + * Version: 2.1.11 * Author: Automattic * License: GPLv2 or later * Text Domain: jetpack-mu-wpcom-plugin diff --git a/projects/plugins/mu-wpcom-plugin/package.json b/projects/plugins/mu-wpcom-plugin/package.json index 1ba776776ed9e..3be65551811cb 100644 --- a/projects/plugins/mu-wpcom-plugin/package.json +++ b/projects/plugins/mu-wpcom-plugin/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-mu-wpcom-plugin", - "version": "2.1.11-alpha", + "version": "2.1.11", "description": "Test plugin for the jetpack-mu-wpcom package", "homepage": "https://jetpack.com", "bugs": { From 94874a143f33f86ccfb492f98120972ef8096f27 Mon Sep 17 00:00:00 2001 From: Igor Zinovyev Date: Mon, 1 Apr 2024 18:34:57 +0300 Subject: [PATCH 27/37] Update changelog and readme for 13.3-beta. (#36677) * Edited Jetpack changelogs. * Squashed the changelogs. * Updated readme.txt. --- projects/plugins/jetpack/CHANGELOG.md | 184 +++++++++++--------------- projects/plugins/jetpack/readme.txt | 4 +- 2 files changed, 81 insertions(+), 107 deletions(-) diff --git a/projects/plugins/jetpack/CHANGELOG.md b/projects/plugins/jetpack/CHANGELOG.md index 1b3819209a4c7..f7c555af68598 100644 --- a/projects/plugins/jetpack/CHANGELOG.md +++ b/projects/plugins/jetpack/CHANGELOG.md @@ -4,165 +4,139 @@ ## 13.3-beta - 2024-04-01 ### Enhancements -- Member login block: add ability to hide manage subscription -link. [#36602] - -### Improved compatibility -- Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. [#36565] -- SEO Tools: make the feature available on non-connected sites. [#36528] - -### Other changes -- Add Phan stub for wordpress functions. [#36627] -- AI Assistant: remove dead code from the suggestions hook [#36625] -- AI Assistant: Remove unused code [#36621] -- AI Featured Image: connect the image generation hook to the UI. [#36620] -- AI Featured Image: track events for generating, regenerating and using images [#36638] -- AI Plugin: Add modal and featured image usage [#36613] -- Disable AI Featured Image button if requires upgrade or no post content [#36653] -- Google Embed blocks: make proportion values translatable [#36641] -- Improve UX when setting AI Featured Image [#36643] -- Packages: add version tracking for identity-crisis package. [#36635] -- Recipe Block: make default texts translatable [#36624] -- Save generated AI image to library and set as featured image [#36626] -- SSO: remove jQuery dependency for improved performance. [#36605] -- Subscription login block: switch to singular "manage subscription" [#36603] -- Subscriptions: Add missing padding param to the Subscriber popup markup [#36619] -- Subscriptions: Fix Subscribe block invalid content [#36617] -- Subscription Site: Hook Subscriber Login block into the navigation [#36487] -- Untangling: return untangled admin menu from wpcom/v2/admin-menu endpoint for early classic view [#36601] - -## 13.3-a.9 - 2024-03-27 -### Bug fixes -- Paid Content Block: Fix subscriber view content not rendering in WordPress.com reader. [#36512] -- SSO: Disable WordPress.com invitation functionality for non-connected users. [#36572] - -### Other changes -- Add a function to clear the static cache for Jetpack_Memberships. [#36545] -- Add instructions to test the new AI interstitial and product page. [#36566] -- Add Verbum options to site settings endpoint. [#36505] -- AI Assistant: remove "Experimental" label on block name. [#36535] -- AI Assistant: store function typo fix Aync -> Async. [#36544] -- AI Proofread: improve upgrade prompt format and translation according to current tier. [#36542] -- Fixed Jetpack Creator going to the wrong screen when the free version is selected. [#36547] -- Map Block: Fix styling in Row and Stack layout. [#36447] -- SSO: add filter allowing one to disable the WordPress.com invite interface. [#36572] -- SSO: fix PHP notices and remove unnecessary PHPCS ignores. [#36589] -- Updated package dependencies. [#36585] - -## 13.3-a.7 - 2024-03-25 -### Enhancements +- AI Assistant: Provide per-block quick actions to make them more relevant. [#36393] - Blocks: "Earn" category renamed to "Monetize". [#36480] +- General: Only show installation errors on Plugins page. [#36390] - Jetpack AI: When the response includes a title and post title is empty, use provided title as post title. [#36500] +- Member login block: Add ability to hide manage subscription link. [#36602] - My Jetpack: Trigger red bubble notification when a broken installation is detected. [#36449] +- Newsletters: Display Email settings on Newsletter settings page. [#36290] +- Newsletters: Ensure blog stats and top posts blocks do not render in email newsletters. [#36372] - Newsletters: Reorder settings cards to improve hierarchy. [#36465] - Newsletters: Use radio buttons instead of toggles on Email Settings. [#36532] +- Sharing: Add a Bluesky sharing button. [#36181] +- Sharing: add a Threads sharing button and a Threads sharing button block. [#36220] +- Sharing: Add Native (Web Share) button to Sharing Buttons block. [#35967] - Sharing: Remove Like button from master bar. [#36456] +- Social: Add support for an SMS button. [#36176] ### Improved compatibility +- Carousel: disable WordPress' lightbox option when Jetpack's Carousel feature is activated. [#36565] - General: Remove methods that were deprecated before the release of Jetpack 10.0, in 2021. [#36157] +- SEO Tools: make the feature available on non-connected sites. [#36528] +- Subscriptions: Remove subscription settings from reading options page. [#36314] ### Bug fixes - Dashboard: Update the sharing button settings to clarify the available options (block or legacy sharing buttons). [#36473] - Enhanced Distribution: begin deprecation process as the Firehose is winding down. [#36168] +- Paid Content Block: Fix subscriber view content not rendering in WordPress.com reader. [#36512] +- Sharing: avoid PHP warnings when using custom post types. [#36315] +- Sharing: fix the display of the sharing block in some classic themes. [#36283] +- SSO: Disable WordPress.com invitation functionality for non-connected users. [#36572] ### Other changes +- Add a function to clear the static cache for Jetpack_Memberships. [#36545] - Added the possibility of stating if a new invited user is a contractor. [#36479] - Add function exists check for wp_admin_notice [#36511] +- Add instructions to test the new AI interstitial and product page. [#36566] +- Add metadata to the post to better diagnose need for Reader and Firehose. [#36254] - Add my home menu to atomic sites in classic view using nav unification. [#36431] +- Add Phan stub for wordpress functions. [#36627] - Add share debug data toggle on WAF settings [#36377] +- Add site migration endpoint. [#36253] - Add sso survey modal for users that disable the module [#36387] -- Backup: change some error messages to not trigger security scanners [#36496] -- Contact Form: refactor field to use forms package [#36138] -- Contact Form: refactor form to use forms package [#36137] -- Display Subscribers menu on wp-admin and update links to Jetpack Manage [#36510] -- GitHub Deployments: remove feature flag [#36469] -- minor change the the menu for selecting images [#36293] -- Paywall: Switching accounts URL fix [#36337] -- Register Sharing settings menu page in offline mode or when Classic wp-admin is enabled. [#36490] -- SSO: only enable WordPress.com invite emails by default on the WordPress.com platform. [#36558] -- SSO: simplify the logic when inviting new users to WordPress.com. [#36498] -- Subscriptions: Apply the subscriber logout function globally [#36441] -- Subscription Site: Release the Subscribe block after the post placement toggle [#36368] -- Update notification icon in top bar [#36297] -- Use correct links in Settings -> Traffic -> GA when admin interface is wp-admin [#36493] -- WPCOM API: avoid PHP warnings when variables are not set. [#36455] -- WPCOM_JSON_API_List_Comments_Endpoint: Do not prefetch comment meta for large hierarchical threads [#36460] - -## 13.3-a.3 - 2024-03-18 -### Enhancements -- AI Assistant: Provide per-block quick actions to make them more relevant. [#36393] -- General: Only show installation errors on Plugins page. [#36390] -- Newsletters: Ensure blog stats and top posts blocks do not render in email newsletters. [#36372] -- Sharing: Add a Bluesky sharing button. [#36181] -- Sharing: Add Native (Web Share) button to Sharing Buttons block. [#35967] - -### Improved compatibility -- Subscriptions: Remove subscription settings from reading options page. [#36314] - -### Other changes - Add tracking to Jetpack review link on plugins page [#36348] +- Add Verbum options to site settings endpoint. [#36505] - AI Assistant: Register ai-assistant-form-support beta flag to control the form extension we are working on. [#36413] +- AI Assistant: remove "Experimental" label on block name. [#36535] +- AI Assistant: Remove dead code from the suggestions hook. [#36625] +- AI Assistant: Remove unused code [#36621] +- AI Assistant: store function typo fix Aync -> Async. [#36544] - AI Featured Image: Add sidebar entry [#36414] -- Contact Form: refactor admin to use forms package [#36224] -- Contact Form: refactor plugin to use forms package [#36092] -- Contact Form: refactor shortcode to use forms package [#36135] -- Fix minor UI issues in premium-content block editor [#36398] -- Jetpack_Portfolio: Prevent a division by 0 fatal when a user uses the shortcode with columns=0 [#36433] -- Publicize: prevent panel from jumping after activation [#36362] -- Sharing Block: Remove extra margin previously added to the first button. [#36386] -- SSO: Add error log on SSO invite. [#36416] -- SSO: Update copy when inviting users. [#36385] -- Subscriptions: Add Subscribe block post end placement setting to Sync [#36381] -- Subscriptions: Fix the Subscribe block insertion toggle label [#36384] -- Subscription Site: Polishing stuff before the release [#36240] -- Untangle: explicitly use Core admin bar color in Calypso color schemes [#36341] -- Updated package dependencies. [#36401] -- WPCOM_JSON_API_List_Comments_Endpoint: Remove update_comment_cache() that is no longer needed [#36363] - -## 13.3-a.1 - 2024-03-12 -### Enhancements -- Newsletters: Display Email settings on Newsletter settings page. [#36290] -- Sharing: add a Threads sharing button and a Threads sharing button block. [#36220] -- Social: Add support for an SMS button. [#36176] - -### Bug fixes -- Sharing: avoid PHP warnings when using custom post types. [#36315] -- Sharing: fix the display of the sharing block in some classic themes. [#36283] - -### Other changes -- Add metadata to the post to better diagnose need for Reader and Firehose. [#36254] -- Add site migration endpoint. [#36253] +- AI Featured Image: Connect the image generation hook to the UI. [#36620] +- AI Featured Image: Disable if requires upgrade or no post content. [#36653] +- AI Featured Image: Improve UX. [#36643] +- AI Featured Image: Save image to library and set as featured. [#36626] +- AI Featured Image: Track events for generating, regenerating and using images. [#36638] +- AI Plugin: Add modal and featured image usage. [#36613] +- AI Proofread: improve upgrade prompt format and translation according to current tier. [#36542] +- Backup: change some error messages to not trigger security scanners [#36496] - Compile TypeScript extensions in Jetpack. [#35904] - Contact Form: Add deprecation warnings to Contact Form module codebase. [#36040] +- Contact Form: refactor admin to use forms package [#36224] - Contact Form: Refactor editor to use Forms package. [#36089] - Contact Form: Refactor endpoints to use Forms package. [#36087] +- Contact Form: refactor field to use forms package [#36138] +- Contact Form: refactor form to use forms package [#36137] +- Contact Form: refactor plugin to use forms package [#36092] +- Contact Form: refactor shortcode to use forms package [#36135] +- Display Subscribers menu on wp-admin and update links to Jetpack Manage [#36510] - Editor: Update to the most recent version of the @automattic/calypso-color-schemes package. [#36227] +- Fixed Jetpack Creator going to the wrong screen when the free version is selected. [#36547] +- Fix minor UI issues in premium-content block editor [#36398] - General: Update to the most recent version of @automattic/calypso-color-schemes. [#36187] +- GitHub Deployments: remove feature flag [#36469] +- Google Embed blocks: Make proportion values translatable. [#36641] +- Jetpack_Portfolio: Prevent a division by 0 fatal when a user uses the shortcode with columns=0 [#36433] - Login block: Link to subscription management page with site URL as search query. +- Map Block: Fix styling in Row and Stack layout. [#36447] - Member login block: link to individual subscription management page. [#36200] +- minor change the the menu for selecting images [#36293] - Newsletter settings: update section title to "subscriptions" [#36343] -- Paywall: Use Subscriber Login block for the login link. [#36308] +- Packages: Add version tracking for identity-crisis package. [#36635] - Pass API parameter to indicate when deleting a memberships product should cancel subscriptions. [#35735] +- Paywall: Switching accounts URL fix [#36337] +- Paywall: Use Subscriber Login block for the login link. [#36308] - Pinterest Block: deprecate in favor of the Core Pinterest embed block. [#36075] +- Publicize: prevent panel from jumping after activation [#36362] +- Recipe Block: Make default texts translatable. [#36624] - Refactor user_is_paid_subscriber to compare against tiers. [#35587] +- Register Sharing settings menu page in offline mode or when Classic wp-admin is enabled. [#36490] - Removed the feature flag for newsletter categories settings. [#36073] - RNMobile: Remove code associated with Story block for the mobile native version. [#36151] +- Sharing Block: Remove extra margin previously added to the first button. [#36386] - Show Browse sites when wp-admin interface is selected and using nav unification. [#36198] +- SSO: Add error log on SSO invite. [#36416] +- SSO: add filter allowing one to disable the WordPress.com invite interface. [#36572] +- SSO: fix PHP notices and remove unnecessary PHPCS ignores. [#36589] +- SSO: only enable WordPress.com invite emails by default on the WordPress.com platform. [#36558] +- SSO: Remove jQuery dependency for improved performance. [#36605] +- SSO: simplify the logic when inviting new users to WordPress.com. [#36498] +- SSO: Update copy when inviting users. [#36385] - SSO: Updated user invitation logic if WooCommerce plugin is activated. [#36140] - Subscriber Login: Prevent the HTTP 301 redirection for Atomic sites. [#36311] - Subscriber Login: Remove the premium content cookie specified for the blog on logging out. [#35441] +- Subscription login block: Switch to singular "manage subscription". [#36603] +- Subscriptions: Add missing padding param to the Subscriber popup markup. [#36619] +- Subscriptions: Add Subscribe block post end placement setting to Sync [#36381] +- Subscriptions: Apply the subscriber logout function globally [#36441] - Subscriptions: Fix empty email for pending confirm paywall on .com. [#36321] +- Subscriptions: Fix Subscribe block invalid content. [#36617] +- Subscriptions: Fix the Subscribe block insertion toggle label [#36384] - Subscriptions: Track newsletter category creation. [#36326] - Subscriptions: update the settings screen URL. [#36323] +- Subscription Site: Hook Subscriber Login block into the navigation. [#36487] - Subscription Site: Polishing Newsletter settings. [#36218] +- Subscription Site: Polishing stuff before the release [#36240] - Subscription Site: Polishing the Subscribe block toggle. [#36177] +- Subscription Site: Release the Subscribe block after the post placement toggle [#36368] - Subscription Site: Update Subscribe block after the post nudge. [#36107] +- Untangle: explicitly use Core admin bar color in Calypso color schemes [#36341] +- Untangling: return untangled admin menu from wpcom/v2/admin-menu endpoint for early classic view. [#36601] - Update code references in docs and comments. [#36234] - Updated package dependencies. [#36309, #36325] +- Updated package dependencies. [#36401] +- Updated package dependencies. [#36585] - Update lockfiles. [#36195] +- Update notification icon in top bar [#36297] +- Use correct links in Settings -> Traffic -> GA when admin interface is wp-admin [#36493] - Use JS and CSS tooltips instead of HTML title. [#36222] - Voice to Content: Fix file upload file type selection for iOS devices, listing all the extensions allowed. [#36165] - Voice to Content: restrict block to internal P2 sites and open it to non-proxied connections. [#36163] - WooCommerce Anlytics: require package instead of using the classes that ship with the Jetpack plugin. [#35758] +- WPCOM API: avoid PHP warnings when variables are not set. [#36455] +- WPCOM_JSON_API_List_Comments_Endpoint: Do not prefetch comment meta for large hierarchical threads [#36460] +- WPCOM_JSON_API_List_Comments_Endpoint: Remove update_comment_cache() that is no longer needed [#36363] - WPCOM_JSON_API_Upload_Media_v1_1_Endpoint: Fix errors on invalid post data. [#36291] ## 13.2.1 - 2024-03-12 diff --git a/projects/plugins/jetpack/readme.txt b/projects/plugins/jetpack/readme.txt index dda4bb5e5b446..79e97a8b4fdf3 100644 --- a/projects/plugins/jetpack/readme.txt +++ b/projects/plugins/jetpack/readme.txt @@ -1,7 +1,7 @@ === Jetpack - WP Security, Backup, Speed, & Growth === Contributors: automattic, adamkheckler, adrianmoldovanwp, aduth, akirk, allendav, alternatekev, andy, annamcphee, annezazu, apeatling, arcangelini, azaozz, barry, batmoo, beaulebens, bindlegirl, biskobe, bjorsch, blobaugh, brbrr, cainm, cena, cfinke, cgastrell, chaselivingston, chellycat, clickysteve, csonnek, danielbachhuber, daniloercoli, davoraltman, delawski, designsimply, dllh, drawmyface, dsmart, dzver, ebinnion, egregor, eliorivero, enej, eoigal, erania-pinnera, ethitter, fgiannar, gcorne, georgestephanis, gibrown, goldsounds, hew, hugobaeta, hypertextranch, iammattthomas, iandunn, joen, jblz, jeffgolenski, jeherve, jenhooks, jenia, jessefriedman, jgs, jkudish, jmdodd, joanrho, johnjamesjacoby, jshreve, kbrownkd, keoshi, koke, kraftbj, lancewillett, leogermani, lhkowalski, lschuyler, macmanx, martinremy, matt, mattwiebe, matveb, maverick3x6, mcsf, mdawaffe, mdbitz, MichaelArestad, migueluy, mikeyarce, mkaz, nancythanki, nickmomrik, nunyvega, obenland, oskosk, pento, professor44, rachelsquirrel, rdcoll, renatoagds, retrofox, richardmtl, richardmuscat, robertbpugh, roccotripaldi, ryancowles, samhotchkiss, samiff, scarstocea, scottsweb, sdixon194, sdquirk, sermitr, simison, stephdau, thehenridev, tmoorewp, tyxla, Viper007Bond, westi, williamvianas, wpkaren, yoavf, zinigor Tags: Security, backup, Woo, malware, scan, performance -Stable tag: 13.2.1 +Stable tag: 13.2.2 Requires at least: 6.3 Requires PHP: 7.0 Tested up to: 6.5 @@ -331,7 +331,7 @@ Jetpack Backup can do a full website migration to a new host, migrate theme file - Blocks: "Earn" category renamed to "Monetize". - General: Only show installation errors on Plugins page. - Jetpack AI: When the response includes a title and post title is empty, use provided title as post title. -- Member login block: add ability to hide manage subscription -link. +- Member login block: Add ability to hide manage subscription link. - My Jetpack: Trigger red bubble notification when a broken installation is detected. - Newsletters: Display Email settings on Newsletter settings page. - Newsletters: Ensure blog stats and top posts blocks do not render in email newsletters. From ebb88d10edd726bbd6b2d5c7bfa464b9b85e00c7 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 1 Apr 2024 11:38:07 -0400 Subject: [PATCH 28/37] crm, inspect: Set minimum PHP version in composer.json (#36675) Now that renovate and phan are looking in composer.json for the minimum PHP version too, let's handle the `@todo` in `tools/parallel-lint.sh` and set it there for the CRM and Inspect plugins. --- projects/plugins/crm/.phan/baseline.php | 138 ++++++------------ ...rsion-in-composer.json-for-crm-and-inspect | 5 + projects/plugins/crm/composer.json | 1 + projects/plugins/crm/composer.lock | 6 +- ...rsion-in-composer.json-for-crm-and-inspect | 5 + projects/plugins/inspect/composer.json | 1 + projects/plugins/inspect/composer.lock | 6 +- tools/parallel-lint.sh | 7 - 8 files changed, 62 insertions(+), 107 deletions(-) create mode 100644 projects/plugins/crm/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect create mode 100644 projects/plugins/inspect/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect diff --git a/projects/plugins/crm/.phan/baseline.php b/projects/plugins/crm/.phan/baseline.php index e7cac4222332c..616ced7da58dc 100644 --- a/projects/plugins/crm/.phan/baseline.php +++ b/projects/plugins/crm/.phan/baseline.php @@ -22,9 +22,7 @@ // PhanTypePossiblyInvalidDimOffset : 150+ occurrences // PhanPossiblyUndeclaredVariable : 130+ occurrences // PhanTypeMismatchReturnProbablyReal : 130+ occurrences - // PhanCompatibleNullableTypePHP70 : 120+ occurrences // PhanTypeMismatchDefault : 110+ occurrences - // PhanCompatibleVoidTypePHP70 : 100+ occurrences // PhanPluginMixedKeyNoKey : 95+ occurrences // PhanTypeMismatchArgumentProbablyReal : 95+ occurrences // PhanSuspiciousValueComparison : 85+ occurrences @@ -52,7 +50,6 @@ // PhanUndeclaredVariableDim : 30+ occurrences // PhanCommentParamWithoutRealParam : 25+ occurrences // PhanParamSignatureMismatch : 25+ occurrences - // PhanParamSignaturePHPDocMismatchHasNoParamType : 25+ occurrences // PhanRedundantConditionInGlobalScope : 25+ occurrences // PhanUndeclaredClassProperty : 25+ occurrences // PhanUndeclaredTypeReturnType : 25+ occurrences @@ -81,14 +78,12 @@ // PhanTypeInvalidDimOffset : 6 occurrences // PhanTypeInvalidLeftOperandOfNumericOp : 6 occurrences // PhanTypeMismatchDeclaredReturn : 6 occurrences - // PhanParamSignatureRealMismatchReturnType : 5 occurrences // PhanTypeConversionFromArray : 5 occurrences // PhanUndeclaredClassReference : 5 occurrences // PhanUndeclaredConstant : 5 occurrences // PhanImpossibleTypeComparisonInGlobalScope : 4 occurrences // PhanIncompatibleRealPropertyType : 4 occurrences // PhanMisspelledAnnotation : 4 occurrences - // PhanParamSignatureRealMismatchHasNoParamType : 4 occurrences // PhanPluginDuplicateExpressionBinaryOp : 4 occurrences // PhanPluginNeverReturnMethod : 4 occurrences // PhanTypeMissingReturn : 4 occurrences @@ -302,117 +297,68 @@ 'modules/woo-sync/includes/segment-conditions/class-segment-condition-woo-customer.php' => ['PhanTypeArraySuspiciousNullable'], 'modules/woo-sync/includes/segment-conditions/class-segment-condition-woo-order-count.php' => ['PhanTypeArraySuspiciousNullable'], 'modules/woo-sync/jpcrm-woo-sync-init.php' => ['PhanUndeclaredClassMethod'], - 'src/automation/class-attribute-definition.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/class-automation-bootstrap.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/class-automation-engine.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanTypeMismatchReturnSuperType'], - 'src/automation/class-automation-logger.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchProperty'], - 'src/automation/class-automation-workflow.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/class-base-condition.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/class-base-step.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/class-base-trigger.php' => ['PhanAbstractStaticMethodCallInStatic', 'PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/actions/contacts/class-add-contact-log.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/contacts/class-add-remove-contact-tag.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/contacts/class-delete-contact.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/contacts/class-new-contact.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/automation/commons/actions/contacts/class-update-contact-status.php' => ['PhanCompatibleNullableTypePHP70', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/contacts/class-update-contact.php' => ['PhanCompatibleNullableTypePHP70', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/email/class-send-contact-email.php' => ['PhanParamSignatureRealMismatchHasNoParamType', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/invoice/class-set-invoice-status.php' => ['PhanCompatibleNullableTypePHP70', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/actions/transactions/class-set-transaction-status.php' => ['PhanCompatibleNullableTypePHP70', 'PhanUnreferencedUseNormal'], - 'src/automation/commons/conditions/contacts/class-contact-field-changed.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], + 'src/automation/class-automation-engine.php' => ['PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanTypeMismatchReturnSuperType'], + 'src/automation/class-automation-logger.php' => ['PhanTypeMismatchProperty'], + 'src/automation/class-base-trigger.php' => ['PhanAbstractStaticMethodCallInStatic'], + 'src/automation/commons/actions/contacts/class-add-contact-log.php' => ['PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/contacts/class-add-remove-contact-tag.php' => ['PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/contacts/class-delete-contact.php' => ['PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/contacts/class-update-contact-status.php' => ['PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/contacts/class-update-contact.php' => ['PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/email/class-send-contact-email.php' => ['PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/invoice/class-set-invoice-status.php' => ['PhanUnreferencedUseNormal'], + 'src/automation/commons/actions/transactions/class-set-transaction-status.php' => ['PhanUnreferencedUseNormal'], + 'src/automation/commons/conditions/contacts/class-contact-field-changed.php' => ['PhanTypeMismatchDeclaredReturnNullable', 'PhanUnreferencedUseNormal'], 'src/automation/commons/conditions/contacts/class-contact-transitional-status.php' => ['PhanUnreferencedUseNormal'], 'src/automation/commons/conditions/invoices/class-invoice-field-contains.php' => ['PhanUnreferencedUseNormal'], 'src/automation/commons/conditions/quotes/class-quote-status-changed.php' => ['PhanUnreferencedUseNormal'], 'src/automation/commons/conditions/transactions/class-transaction-field.php' => ['PhanUnreferencedUseNormal'], - 'src/automation/commons/triggers/companies/class-company-created.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/companies/class-company-deleted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/companies/class-company-status-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/companies/class-company-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDeclaredReturnNullable'], - 'src/automation/commons/triggers/contacts/class-contact-before-deleted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/contacts/class-contact-created.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/contacts/class-contact-deleted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/contacts/class-contact-email-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/contacts/class-contact-status-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/contacts/class-contact-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/invoices/class-invoice-created.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/invoices/class-invoice-deleted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/invoices/class-invoice-status-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/invoices/class-invoice-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/quotes/class-quote-accepted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/quotes/class-quote-created.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/quotes/class-quote-deleted.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/quotes/class-quote-status-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/quotes/class-quote-updated.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/tasks/class-task-created.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/tasks/class-task-deleted.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/tasks/class-task-updated.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/transactions/class-transaction-created.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/transactions/class-transaction-updated.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/automation/commons/triggers/wordpress/class-wp-user-created.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturn'], + 'src/automation/commons/triggers/companies/class-company-updated.php' => ['PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDeclaredReturnNullable'], + 'src/automation/commons/triggers/wordpress/class-wp-user-created.php' => ['PhanTypeMismatchDeclaredReturn'], 'src/automation/data-transformers/class-data-transformer-entity-to-tag-list.php' => ['PhanUndeclaredMethod'], 'src/automation/data-transformers/class-data-transformer-invoice-to-contact.php' => ['PhanUndeclaredMethod'], 'src/automation/data-types/class-invoice-data.php' => ['PhanPluginMixedKeyNoKey'], 'src/automation/data-types/class-quote-data.php' => ['PhanPluginMixedKeyNoKey'], 'src/automation/data-types/class-task-data.php' => ['PhanPluginMixedKeyNoKey'], 'src/automation/data-types/class-transaction-data.php' => ['PhanPluginMixedKeyNoKey'], - 'src/automation/interface-step.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDeclaredReturnNullable'], - 'src/automation/interface-trigger.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/automation/workflow/class-workflow-repository.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeArraySuspiciousNullable'], - 'src/entities/factories/class-company-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/entities/factories/class-contact-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/entities/factories/class-entity-factory.php' => ['PhanAbstractStaticMethodCallInStatic', 'PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchArgumentNullableInternal'], - 'src/entities/factories/class-invoice-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/entities/factories/class-quote-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/entities/factories/class-task-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/entities/factories/class-transaction-factory.php' => ['PhanCompatibleNullableTypePHP70'], - 'src/event-manager/managers/class-contact-event.php' => ['PhanCompatibleVoidTypePHP70'], - 'src/event-manager/managers/class-invoice-event.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'src/event-manager/managers/class-transaction-event.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], + 'src/automation/interface-step.php' => ['PhanTypeMismatchDeclaredReturn', 'PhanTypeMismatchDeclaredReturnNullable'], + 'src/automation/workflow/class-workflow-repository.php' => ['PhanTypeArraySuspiciousNullable'], + 'src/entities/factories/class-entity-factory.php' => ['PhanAbstractStaticMethodCallInStatic', 'PhanTypeMismatchArgumentNullableInternal'], + 'src/event-manager/managers/class-invoice-event.php' => ['PhanUnreferencedUseNormal'], + 'src/event-manager/managers/class-transaction-event.php' => ['PhanUnreferencedUseNormal'], 'src/rest-api/v4/class-rest-automation-workflows-controller.php' => ['PhanParamSignatureMismatch', 'PhanPluginMixedKeyNoKey'], - 'src/rest-api/v4/class-rest-base-controller.php' => ['PhanCompatibleNullableTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable'], + 'src/rest-api/v4/class-rest-base-controller.php' => ['PhanTypeMismatchDeclaredReturnNullable'], 'src/rest-api/v4/class-rest-contacts-controller.php' => ['PhanPluginMixedKeyNoKey', 'PhanTypeComparisonFromArray', 'PhanUndeclaredProperty'], - 'tests/codeception/_support/AcceptanceTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchHasNoParamType', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], - 'tests/codeception/_support/FunctionalTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchHasNoParamType', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], + 'tests/codeception/_support/AcceptanceTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], + 'tests/codeception/_support/FunctionalTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], 'tests/codeception/_support/Helper/JPCRM_Acceptance.php' => ['PhanUndeclaredProperty'], 'tests/codeception/_support/Helper/RunProcess.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredClassCatch'], - 'tests/codeception/_support/Module/WPBrowser.php' => ['PhanCompatibleVoidTypePHP70', 'PhanParamSignatureRealMismatchHasNoParamType'], 'tests/codeception/_support/Module/WPBrowserMethods.php' => ['PhanTraitParentReference', 'PhanUndeclaredFunction', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'tests/codeception/_support/Module/WPWebDriver.php' => ['PhanIncompatibleRealPropertyType', 'PhanParamSignatureRealMismatchReturnType', 'PhanUndeclaredFunction', 'PhanUndeclaredMethod', 'PhanUndeclaredTrait'], - 'tests/codeception/_support/Module/WordPress.php' => ['PhanIncompatibleRealPropertyType', 'PhanParamSignatureMismatch', 'PhanParamSignatureRealMismatchHasNoParamType', 'PhanParamSignatureRealMismatchReturnType', 'PhanTypeMismatchDeclaredParamNullable', 'PhanUndeclaredClassInstanceof', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction', 'PhanUndeclaredMethod', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeProperty', 'PhanUndeclaredTypeReturnType'], - 'tests/codeception/_support/UnitTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchHasNoParamType', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], - 'tests/php/automation/class-automation-engine-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanPluginDuplicateAdjacentStatement', 'PhanRedundantCondition'], - 'tests/php/automation/class-automation-workflow-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/companies/class-company-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/contacts/actions/class-add-contact-log-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/contacts/actions/class-add-remove-contact-tag-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/contacts/actions/class-delete-contact-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/contacts/actions/class-update-contact-status-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/contacts/actions/class-update-contact-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/contacts/class-contact-condition-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/contacts/class-contact-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/invoices/actions/class-set-invoice-status-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/invoices/class-invoice-condition-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/invoices/class-invoice-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/mocks/mock-class-contact-condition.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/mocks/mock-class-contact-created-trigger.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable'], - 'tests/php/automation/mocks/mock-class-dummy-step.php' => ['PhanCompatibleNullableTypePHP70'], - 'tests/php/automation/mocks/mock-class-trigger-empty-slug.php' => ['PhanCompatibleNullableTypePHP70', 'PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchDeclaredReturnNullable'], - 'tests/php/automation/quotes/class-quote-condition-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchProperty', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/quotes/class-quote-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/tags/class-tag-condition-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/tasks/class-task-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUnreferencedUseNormal'], + 'tests/codeception/_support/Module/WPWebDriver.php' => ['PhanIncompatibleRealPropertyType', 'PhanUndeclaredFunction', 'PhanUndeclaredMethod', 'PhanUndeclaredTrait'], + 'tests/codeception/_support/Module/WordPress.php' => ['PhanIncompatibleRealPropertyType', 'PhanParamSignatureMismatch', 'PhanTypeMismatchDeclaredParamNullable', 'PhanUndeclaredClassInstanceof', 'PhanUndeclaredClassMethod', 'PhanUndeclaredFunction', 'PhanUndeclaredMethod', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeProperty', 'PhanUndeclaredTypeReturnType'], + 'tests/codeception/_support/UnitTester.php' => ['PhanParamSignatureMismatch', 'PhanParamSignaturePHPDocMismatchReturnType', 'PhanParamSignaturePHPDocMismatchTooFewParameters', 'PhanUndeclaredTrait'], + 'tests/php/automation/class-automation-engine-test.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanRedundantCondition'], + 'tests/php/automation/class-automation-workflow-test.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/companies/class-company-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/contacts/actions/class-delete-contact-test.php' => ['PhanUnreferencedUseNormal'], + 'tests/php/automation/contacts/class-contact-condition-test.php' => ['PhanUnreferencedUseNormal'], + 'tests/php/automation/contacts/class-contact-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/invoices/class-invoice-condition-test.php' => ['PhanUnreferencedUseNormal'], + 'tests/php/automation/invoices/class-invoice-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/mocks/mock-class-contact-condition.php' => ['PhanUnreferencedUseNormal'], + 'tests/php/automation/mocks/mock-class-contact-created-trigger.php' => ['PhanTypeMismatchDeclaredReturnNullable'], + 'tests/php/automation/mocks/mock-class-trigger-empty-slug.php' => ['PhanTypeMismatchDeclaredReturnNullable'], + 'tests/php/automation/quotes/class-quote-condition-test.php' => ['PhanTypeMismatchProperty', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/quotes/class-quote-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/tasks/class-task-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUnreferencedUseNormal'], 'tests/php/automation/tools/class-automation-faker.php' => ['PhanPluginMixedKeyNoKey'], - 'tests/php/automation/transactions/actions/class-set-transaction-status-test.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/automation/transactions/class-transaction-condition-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/transactions/class-transaction-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], - 'tests/php/automation/wordpress/class-wp-user-trigger-test.php' => ['PhanCompatibleVoidTypePHP70', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'], + 'tests/php/automation/transactions/class-transaction-condition-test.php' => ['PhanUnreferencedUseNormal'], + 'tests/php/automation/transactions/class-transaction-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUnreferencedUseNormal'], + 'tests/php/automation/wordpress/class-wp-user-trigger-test.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'], 'tests/php/bootstrap.php' => ['PhanUndeclaredConstant'], - 'tests/php/class-jpcrm-base-integration-test-case.php' => ['PhanCompatibleVoidTypePHP70'], - 'tests/php/class-jpcrm-base-test-case.php' => ['PhanCompatibleVoidTypePHP70'], 'tests/php/event-manager/class-event-manager-faker.php' => ['PhanCommentParamOnEmptyParamList', 'PhanUndeclaredTypeReturnType'], 'tests/php/event-manager/class-event-manager-test.php' => ['PhanCommentVarInsteadOfParam', 'PhanParamTooMany'], 'tests/php/rest-api/v4/class-rest-authentication-test.php' => ['PhanTypeMismatchReturn'], - 'tests/php/rest-api/v4/class-rest-automation-workflows-controller-test.php' => ['PhanCompatibleVoidTypePHP70'], 'tests/php/rest-api/v4/class-rest-contacts-controller-test.php' => ['PhanPluginNeverReturnFunction'], ], // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. diff --git a/projects/plugins/crm/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect b/projects/plugins/crm/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect new file mode 100644 index 0000000000000..fc5e8b9326a75 --- /dev/null +++ b/projects/plugins/crm/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Specify minimum PHP version in composer.json. Should be no change to functionality. + + diff --git a/projects/plugins/crm/composer.json b/projects/plugins/crm/composer.json index fdd28cbd35d8c..b163e9351b13c 100644 --- a/projects/plugins/crm/composer.json +++ b/projects/plugins/crm/composer.json @@ -50,6 +50,7 @@ } }, "require": { + "php": ">=7.4", "automattic/jetpack-assets": "@dev", "automattic/jetpack-autoloader": "@dev", "automattic/jetpack-composer-plugin": "@dev", diff --git a/projects/plugins/crm/composer.lock b/projects/plugins/crm/composer.lock index 58d1229d5594e..6af9886f0f5e0 100644 --- a/projects/plugins/crm/composer.lock +++ b/projects/plugins/crm/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": "87a6ff75df5bc0edb428f4035f72e0c3", + "content-hash": "cba34c1515c5ee7bb85745e4210580a1", "packages": [ { "name": "automattic/jetpack-assets", @@ -5240,7 +5240,9 @@ }, "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">=7.4" + }, "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/projects/plugins/inspect/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect b/projects/plugins/inspect/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect new file mode 100644 index 0000000000000..fc5e8b9326a75 --- /dev/null +++ b/projects/plugins/inspect/changelog/fix-specify-php-version-in-composer.json-for-crm-and-inspect @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Specify minimum PHP version in composer.json. Should be no change to functionality. + + diff --git a/projects/plugins/inspect/composer.json b/projects/plugins/inspect/composer.json index e27cb8928a51e..3f37f7fa5bb34 100644 --- a/projects/plugins/inspect/composer.json +++ b/projects/plugins/inspect/composer.json @@ -16,6 +16,7 @@ } }, "require": { + "php": ">=7.4", "automattic/jetpack-assets": "@dev", "automattic/jetpack-autoloader": "@dev", "automattic/jetpack-composer-plugin": "@dev", diff --git a/projects/plugins/inspect/composer.lock b/projects/plugins/inspect/composer.lock index 0fd05e6f34f8b..323150b3cb03c 100644 --- a/projects/plugins/inspect/composer.lock +++ b/projects/plugins/inspect/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": "10cd1e51529883698573fd0e4a4677e5", + "content-hash": "5488cdd18711b9b96901a4a1ce424c1e", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -3280,7 +3280,9 @@ }, "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">=7.4" + }, "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/tools/parallel-lint.sh b/tools/parallel-lint.sh index 086403f7cf7dc..ad82c8212337b 100755 --- a/tools/parallel-lint.sh +++ b/tools/parallel-lint.sh @@ -44,13 +44,6 @@ if $ALL; then fi done < <( jq -r '.require.php // "" | capture( "^(?>=)(?[0-9][0-9.]*)$" ) | [ input_filename, .op, .ver ] | @tsv' ./projects/*/*/composer.json ) - # Plugins requirng PHP 7.4 or later. - # @todo Add `.require.php` in their composer.json and remove this. - if php -r 'exit( PHP_VERSION_ID < 70400 ? 0 : 1 );'; then - SKIPS+=( -o -path ./projects/plugins/inspect ) - SKIPS+=( -o -path ./projects/plugins/crm ) - fi - find . \( \ -name .git \ -o -name vendor \ From 901675a04ec41d1bf4b886dcd70cae21f90654b6 Mon Sep 17 00:00:00 2001 From: Dylan Munson <65001528+CodeyGuyDylan@users.noreply.github.com> Date: Mon, 1 Apr 2024 11:59:19 -0600 Subject: [PATCH 29/37] Fix/sync between boost scores (#36679) * Sync URL parameter sent to Boost with My Jetpack to sync cache * changelog --- .../my-jetpack/changelog/fix-sync-between-boost-scores | 4 ++++ projects/packages/my-jetpack/src/class-initializer.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores diff --git a/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores b/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores new file mode 100644 index 0000000000000..fe9c2803e5ca8 --- /dev/null +++ b/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix Boost score inconsistency diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 50b8aa224edcf..9c6b25f7a9632 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -198,7 +198,7 @@ public static function enqueue_scripts() { ); $modules = new Modules(); $connection = new Connection_Manager(); - $speed_score_history = new Speed_Score_History( wp_parse_url( get_site_url(), PHP_URL_HOST ) ); + $speed_score_history = new Speed_Score_History( get_site_url() ); wp_localize_script( 'my_jetpack_main_app', 'myJetpackInitialState', From 6a6b3392bfbcef4e2bd6ef712c56ac1f3add2ea6 Mon Sep 17 00:00:00 2001 From: Calypso Bot Date: Mon, 1 Apr 2024 21:10:28 +0300 Subject: [PATCH 30/37] Update dependency @preact/signals to v1.2.3 (#36666) Co-authored-by: Renovate Bot --- pnpm-lock.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1691e30c07cb3..f4fcb34a67535 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1955,7 +1955,7 @@ importers: version: 1.0.0 '@preact/signals': specifier: ^1.2.2 - version: 1.2.2(preact@10.19.6) + version: 1.2.3(preact@10.19.6) '@sentry/browser': specifier: 7.80.1 version: 7.80.1 @@ -7222,15 +7222,15 @@ packages: playwright: 1.39.0 dev: true - /@preact/signals-core@1.5.1: - resolution: {integrity: sha512-dE6f+WCX5ZUDwXzUIWNMhhglmuLpqJhuy3X3xHrhZYI0Hm2LyQwOu0l9mdPiWrVNsE+Q7txOnJPgtIqHCYoBVA==} + /@preact/signals-core@1.6.0: + resolution: {integrity: sha512-O/XGxwP85h1F7+ouqTMOIZ3+V1whfaV9ToIVcuyGriD4JkSD00cQo54BKdqjvBJxbenvp7ynfqRHEwI6e+NIhw==} - /@preact/signals@1.2.2(preact@10.19.6): - resolution: {integrity: sha512-ColCqdo4cRP18bAuIR4Oik5rDpiyFtPIJIygaYPMEAwTnl4buWkBOflGBSzhYyPyJfKpkwlekrvK+1pzQ2ldWw==} + /@preact/signals@1.2.3(preact@10.19.6): + resolution: {integrity: sha512-M2DXse3Wi8HwjI1d2vQWOLJ3lHogvqTsJYvl4ofXRXgMFQzJ7kmlZvlt5i8x5S5VwgZu0ghru4HkLqOoFfU2JQ==} peerDependencies: preact: 10.x dependencies: - '@preact/signals-core': 1.5.1 + '@preact/signals-core': 1.6.0 preact: 10.19.6 /@radix-ui/primitive@1.0.0: @@ -11595,8 +11595,8 @@ packages: resolution: {integrity: sha512-oShVIJR2uNfgr3nSMwj/tNNomWSf5p29sUvR0CIrDwRd4QjvRuLTUprdqMekKDdCg7PymMqjg39FaXxrMuNjjg==} engines: {node: '>=12'} dependencies: - '@preact/signals': 1.2.2(preact@10.19.6) - deepsignal: 1.5.0(@preact/signals@1.2.2)(preact@10.19.6) + '@preact/signals': 1.2.3(preact@10.19.6) + deepsignal: 1.5.0(@preact/signals@1.2.3)(preact@10.19.6) preact: 10.19.6 transitivePeerDependencies: - '@preact/signals-core' @@ -14267,7 +14267,7 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} - /deepsignal@1.5.0(@preact/signals@1.2.2)(preact@10.19.6): + /deepsignal@1.5.0(@preact/signals@1.2.3)(preact@10.19.6): resolution: {integrity: sha512-bFywDpBUUWMs576H2dgLFLLFuQ/UWXbzHfKD98MZTfGsl7+twIzvz4ihCNrRrZ/Emz3kqJaNIAp5eBWUEWhnAw==} peerDependencies: '@preact/signals': ^1.1.4 @@ -14284,7 +14284,7 @@ packages: preact: optional: true dependencies: - '@preact/signals': 1.2.2(preact@10.19.6) + '@preact/signals': 1.2.3(preact@10.19.6) preact: 10.19.6 /default-browser-id@3.0.0: From 3e1e7553964af19d24ec51033dd4afe6f700c9d2 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Mon, 1 Apr 2024 16:33:43 -0300 Subject: [PATCH 31/37] AI Assistant: PoC scroll on suggestion stream (#36569) * add suggestion partial callback as optional handler for the AI hook * PoC: scroll to bottom/latest suggestion chunk on AI stream * try enabling/disabling the scroll listener * temp commit, adds pre/post suggestion chunk trying to signal the listener to skip process * move use-auto-scroll out of the main file into its own hook file * use auto-scroll hook inside the ai suggestion hook * add import sections Co-authored-by: Douglas Henri * remove debug line --------- Co-authored-by: Douglas --- .../changelog/poc-ai-assistant-follow-scroll | 4 + .../extensions/blocks/ai-assistant/edit.js | 8 +- .../hooks/use-auto-scroll/index.ts | 126 ++++++++++++++++++ .../use-suggestions-from-openai/index.js | 21 +++ 4 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/poc-ai-assistant-follow-scroll create mode 100644 projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-auto-scroll/index.ts diff --git a/projects/plugins/jetpack/changelog/poc-ai-assistant-follow-scroll b/projects/plugins/jetpack/changelog/poc-ai-assistant-follow-scroll new file mode 100644 index 0000000000000..913e2809fc80b --- /dev/null +++ b/projects/plugins/jetpack/changelog/poc-ai-assistant-follow-scroll @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +AI Assistant: scroll to bottom of current block as suggestions keep coming diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js index 6c38aefd1a0bb..f7f2c7f5795ca 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/edit.js @@ -109,6 +109,8 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, const isMobileViewport = useViewportMatch( 'medium', '<' ); + const contentRef = useRef( null ); + const { isLoadingCategories, isLoadingCompletion, @@ -139,6 +141,8 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, userPrompt: attributes.userPrompt, requireUpgrade, requestingState: attributes.requestingState, + contentRef, + blockRef, } ); const connected = isUserConnected(); @@ -499,13 +503,14 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, >
{ contentIsLoaded && ! useGutenbergSyntax && ( -
+
{ markdownConverter.render( attributes.content ) }
) } { contentIsLoaded && useGutenbergSyntax && (
@@ -589,7 +594,6 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId, retryRequest={ retryRequest } handleAcceptContent={ handleAcceptContent } handleAcceptTitle={ handleAcceptTitle } - handleGetSuggestion={ handleGetSuggestion } handleImageRequest={ handleImageRequest } handleTryAgain={ null } showRetry={ showRetry } diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-auto-scroll/index.ts b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-auto-scroll/index.ts new file mode 100644 index 0000000000000..0b424b58e9ec1 --- /dev/null +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-auto-scroll/index.ts @@ -0,0 +1,126 @@ +/** + * External dependencies + */ +import { useCallback, useRef } from '@wordpress/element'; +import debugFactory from 'debug'; + +const debug = debugFactory( 'jetpack-ai-assistant:use-auto-scroll' ); +const useAutoScroll = ( + blockRef: React.MutableRefObject< HTMLDivElement >, + contentRef: React.MutableRefObject< HTMLDivElement > +) => { + const scrollElementRef = useRef( null ); + const autoScrollEnabled = useRef( false ); + const ignoreScroll = useRef( false ); + + const getScrollParent = useCallback( element => { + // if we have it on ref already, don't scavenge the dom, just return it + if ( scrollElementRef.current ) { + return scrollElementRef.current; + } + + if ( element == null ) { + return null; + } + + let parent = element.parentElement; + while ( parent ) { + const { overflow } = window.getComputedStyle( parent ); + if ( overflow.split( ' ' ).every( o => o === 'auto' || o === 'scroll' ) ) { + return parent; + } + parent = parent.parentElement; + } + + return document.documentElement; + }, [] ); + + const userScrollHandler = useCallback( () => { + if ( ignoreScroll.current ) { + debug( 'scroll event skipped' ); + return; + } + debug( 'user scrolled, disabling auto' ); + // as the user scrolls, disable auto scroll + // Note: need to dupe disableAutoScroll as both callbacks cannot depend on each other + autoScrollEnabled.current = false; + ignoreScroll.current = false; + scrollElementRef.current?.removeEventListener( 'scroll', userScrollHandler ); + scrollElementRef.current = null; + }, [] ); + + const enableAutoScroll = useCallback( () => { + autoScrollEnabled.current = true; + ignoreScroll.current = true; + scrollElementRef.current = getScrollParent( blockRef.current ); + scrollElementRef.current?.addEventListener( 'scroll', userScrollHandler ); + debug( 'enabling auto scroll' ); + debug( scrollElementRef.current ); + debug( contentRef.current ); + }, [ getScrollParent, blockRef, userScrollHandler, contentRef ] ); + + const disableAutoScroll = useCallback( () => { + autoScrollEnabled.current = false; + ignoreScroll.current = false; + scrollElementRef.current?.removeEventListener( 'scroll', userScrollHandler ); + scrollElementRef.current = null; + debug( 'disabling auto scroll' ); + }, [ userScrollHandler ] ); + + const preSuggestionPartialHandler = useCallback( () => { + // bail early if we're not in auto scroll mode + if ( ! autoScrollEnabled.current ) { + return; + } + + ignoreScroll.current = true; + }, [] ); + + const snapToBottom = useCallback( + ( extraOffset = 0 ) => { + const bounds = contentRef.current?.getBoundingClientRect(); + const offset = + ( blockRef?.current?.lastChild instanceof HTMLElement + ? blockRef.current.lastChild.clientHeight + : 80 ) + 40; + + if ( bounds?.bottom > window.innerHeight - offset || bounds?.top < 0 ) { + scrollElementRef.current?.scrollBy( + 0, + contentRef.current?.getBoundingClientRect().bottom - + window.innerHeight + + offset + + extraOffset + ); + } + }, + [ blockRef, contentRef ] + ); + + const postSuggestionPartialHandler = useCallback( () => { + // bail early if we're not in auto scroll mode + if ( ! autoScrollEnabled.current ) { + return; + } + + // do the auto scroll + snapToBottom(); + + // this setTimeout here because setting the flag to skip the user scroll event + // would get into a race condition with the event handler + setTimeout( () => { + ignoreScroll.current = false; + }, 100 ); + }, [ snapToBottom ] ); + + return { + autoScrollEnabled, + snapToBottom, + enableAutoScroll, + disableAutoScroll, + preSuggestionPartialHandler, + postSuggestionPartialHandler, + }; +}; + +export default useAutoScroll; diff --git a/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js index 5d6b5b9e84ef1..2ab141bbb9fbc 100644 --- a/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js +++ b/projects/plugins/jetpack/extensions/blocks/ai-assistant/hooks/use-suggestions-from-openai/index.js @@ -11,6 +11,7 @@ import debugFactory from 'debug'; * Internal dependencies */ import { DEFAULT_PROMPT_TONE } from '../../components/tone-dropdown-control'; +import useAutoScroll from '../../hooks/use-auto-scroll'; import { buildPromptForBlock, delimiter } from '../../lib/prompt'; import { getContentFromBlocks, @@ -33,6 +34,8 @@ const useSuggestionsFromOpenAI = ( { onModeration, requireUpgrade, requestingState, + blockRef, + contentRef, } ) => { const [ isLoadingCategories, setIsLoadingCategories ] = useState( false ); const [ isLoadingCompletion, setIsLoadingCompletion ] = useState( false ); @@ -45,6 +48,15 @@ const useSuggestionsFromOpenAI = ( { const [ requestState, setRequestState ] = useState( requestingState || 'init' ); const source = useRef(); + const { + preSuggestionPartialHandler, + postSuggestionPartialHandler, + snapToBottom, + enableAutoScroll, + disableAutoScroll, + autoScrollEnabled, + } = useAutoScroll( blockRef, contentRef ); + // Let's grab post data so that we can do something smart. const currentPostTitle = useSelect( select => select( 'core/editor' ).getEditedPostAttribute( 'title' ) @@ -152,6 +164,7 @@ const useSuggestionsFromOpenAI = ( { } try { + enableAutoScroll(); setIsLoadingCompletion( true ); setWasCompletionJustRequested( true ); // debug all prompt items, one by one @@ -185,6 +198,7 @@ const useSuggestionsFromOpenAI = ( { setShowRetry( true ); setIsLoadingCompletion( false ); setWasCompletionJustRequested( false ); + disableAutoScroll(); } const onFunctionDone = async e => { @@ -275,6 +289,11 @@ const useSuggestionsFromOpenAI = ( { messages: updatedMessages, } ); + if ( autoScrollEnabled.current ) { + snapToBottom( 10 ); + } + disableAutoScroll(); + if ( ! useGutenbergSyntax ) { return; } @@ -433,7 +452,9 @@ const useSuggestionsFromOpenAI = ( { // replaceInnerBlocks( clientId, validBlocks ); // Remove the delimiter from the suggestion and update the block. + preSuggestionPartialHandler?.( clientId, e?.detail ); updateBlockAttributes( clientId, { content: e?.detail?.replaceAll( delimiter, '' ) } ); + postSuggestionPartialHandler?.( clientId, e?.detail ); }; source?.current?.addEventListener( 'function_done', onFunctionDone ); From c1d86af4ed93ed68de91eb24c5aff2fef2d93c9f Mon Sep 17 00:00:00 2001 From: Calypso Bot Date: Mon, 1 Apr 2024 22:42:55 +0300 Subject: [PATCH 32/37] Update dependency dompdf/dompdf to v2.0.4 [SECURITY] (#36678) * Update dependency dompdf/dompdf to v2.0.4 [SECURITY] * Fix composer.lock * Update renovate config to avoid this problem in the future --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch --- .github/renovate-config.js | 3 ++ ...vate-packagist-dompdf-dompdf-vulnerability | 4 +++ projects/plugins/crm/composer.json | 2 +- projects/plugins/crm/composer.lock | 28 +++++++++---------- 4 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 projects/plugins/crm/changelog/renovate-packagist-dompdf-dompdf-vulnerability diff --git a/.github/renovate-config.js b/.github/renovate-config.js index e72fceaf2c59f..e06875736d209 100644 --- a/.github/renovate-config.js +++ b/.github/renovate-config.js @@ -90,6 +90,9 @@ module.exports = { constraints: { php: `~${ versions.MIN_PHP_VERSION }.0`, }, + // Need to have renovate tell composer to ignore `.require.php` since dev deps aren't constrained by this + // but renovate insists on using the above to choose the PHP version to run with. Sigh. + composerIgnorePlatformReqs: [ 'ext-*', 'lib-*', 'php' ], }, ...( () => { const ret = {}; diff --git a/projects/plugins/crm/changelog/renovate-packagist-dompdf-dompdf-vulnerability b/projects/plugins/crm/changelog/renovate-packagist-dompdf-dompdf-vulnerability new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/plugins/crm/changelog/renovate-packagist-dompdf-dompdf-vulnerability @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/plugins/crm/composer.json b/projects/plugins/crm/composer.json index b163e9351b13c..50061cb21d14e 100644 --- a/projects/plugins/crm/composer.json +++ b/projects/plugins/crm/composer.json @@ -55,7 +55,7 @@ "automattic/jetpack-autoloader": "@dev", "automattic/jetpack-composer-plugin": "@dev", "automattic/woocommerce": "^3.0", - "dompdf/dompdf": "2.0.3" + "dompdf/dompdf": "2.0.4" }, "repositories": [ { diff --git a/projects/plugins/crm/composer.lock b/projects/plugins/crm/composer.lock index 6af9886f0f5e0..ee025fb570d1a 100644 --- a/projects/plugins/crm/composer.lock +++ b/projects/plugins/crm/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": "cba34c1515c5ee7bb85745e4210580a1", + "content-hash": "865135122fc93afe20ff360fce38e054", "packages": [ { "name": "automattic/jetpack-assets", @@ -298,16 +298,16 @@ }, { "name": "dompdf/dompdf", - "version": "v2.0.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85" + "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/e8d2d5e37e8b0b30f0732a011295ab80680d7e85", - "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/093f2d9739cec57428e39ddadedfd4f3ae862c0f", + "reference": "093f2d9739cec57428e39ddadedfd4f3ae862c0f", "shasum": "" }, "require": { @@ -354,9 +354,9 @@ "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v2.0.3" + "source": "https://github.com/dompdf/dompdf/tree/v2.0.4" }, - "time": "2023-02-07T12:51:48+00:00" + "time": "2023-12-12T20:19:39+00:00" }, { "name": "masterminds/html5", @@ -471,16 +471,16 @@ }, { "name": "phenx/php-svg-lib", - "version": "0.5.2", + "version": "0.5.3", "source": { "type": "git", "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "732faa9fb4309221e2bd9b2fda5de44f947133aa" + "reference": "0e46722c154726a5f9ac218197ccc28adba16fcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/732faa9fb4309221e2bd9b2fda5de44f947133aa", - "reference": "732faa9fb4309221e2bd9b2fda5de44f947133aa", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/0e46722c154726a5f9ac218197ccc28adba16fcf", + "reference": "0e46722c154726a5f9ac218197ccc28adba16fcf", "shasum": "" }, "require": { @@ -499,7 +499,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "LGPL-3.0-or-later" ], "authors": [ { @@ -511,9 +511,9 @@ "homepage": "https://github.com/PhenX/php-svg-lib", "support": { "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.2" + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.3" }, - "time": "2024-02-07T12:49:40+00:00" + "time": "2024-02-23T20:39:24+00:00" }, { "name": "sabberworm/php-css-parser", From 28167f8668828f0e98e7ce298243879f3e387899 Mon Sep 17 00:00:00 2001 From: Griffith Chen Date: Tue, 2 Apr 2024 03:48:21 +0800 Subject: [PATCH 33/37] WPCOM Simple Site: Remove add license link in the Search upsell page (#36667) * Remove the add license link for simple sites * changelog * Version bump --------- Co-authored-by: Allison Levine --- ...emove-wpcom-simple-site-search-add-license | 4 +++ projects/packages/search/composer.json | 2 +- projects/packages/search/package.json | 2 +- .../packages/search/src/class-package.php | 2 +- .../components/pages/upsell-page/header.jsx | 26 +++++++++++-------- ...emove-wpcom-simple-site-search-add-license | 5 ++++ projects/plugins/jetpack/composer.lock | 4 +-- ...emove-wpcom-simple-site-search-add-license | 5 ++++ projects/plugins/search/composer.lock | 4 +-- 9 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 projects/packages/search/changelog/remove-wpcom-simple-site-search-add-license create mode 100644 projects/plugins/jetpack/changelog/remove-wpcom-simple-site-search-add-license create mode 100644 projects/plugins/search/changelog/remove-wpcom-simple-site-search-add-license diff --git a/projects/packages/search/changelog/remove-wpcom-simple-site-search-add-license b/projects/packages/search/changelog/remove-wpcom-simple-site-search-add-license new file mode 100644 index 0000000000000..376f26440081b --- /dev/null +++ b/projects/packages/search/changelog/remove-wpcom-simple-site-search-add-license @@ -0,0 +1,4 @@ +Significance: minor +Type: removed + +Removed add Search license link for simple sites due to My Jetpack inavailability. diff --git a/projects/packages/search/composer.json b/projects/packages/search/composer.json index b4e6946bf26ed..1343e64077229 100644 --- a/projects/packages/search/composer.json +++ b/projects/packages/search/composer.json @@ -71,7 +71,7 @@ "link-template": "https://github.com/Automattic/jetpack-search/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "0.43.x-dev" + "dev-trunk": "0.44.x-dev" }, "version-constants": { "::VERSION": "src/class-package.php" diff --git a/projects/packages/search/package.json b/projects/packages/search/package.json index 992f50e935a08..783d591aafc64 100644 --- a/projects/packages/search/package.json +++ b/projects/packages/search/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-search", - "version": "0.43.8", + "version": "0.44.0-alpha", "description": "Package for Jetpack Search products", "main": "main.js", "directories": { diff --git a/projects/packages/search/src/class-package.php b/projects/packages/search/src/class-package.php index 0bdebc5bcb767..fd12e350785e9 100644 --- a/projects/packages/search/src/class-package.php +++ b/projects/packages/search/src/class-package.php @@ -11,7 +11,7 @@ * Search package general information */ class Package { - const VERSION = '0.43.8'; + const VERSION = '0.44.0-alpha'; const SLUG = 'search'; /** diff --git a/projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx b/projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx index 3e2a6c9b340d5..320d5422dc576 100644 --- a/projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx +++ b/projects/packages/search/src/dashboard/components/pages/upsell-page/header.jsx @@ -10,22 +10,26 @@ const Header = () => { select => `${ select( STORE_ID ).getSiteAdminUrl() }admin.php?page=my-jetpack#/add-license` ); + const isWpcom = useSelect( select => select( STORE_ID ).isWpcom(), [] ); + return (
-

- { createInterpolateElement( - __( - 'Already have an existing plan or license key? Click here to get started', - 'jetpack-search-pkg' - ), - { - a: , - } - ) } -

+ { ! isWpcom && ( +

+ { createInterpolateElement( + __( + 'Already have an existing plan or license key? Click here to get started', + 'jetpack-search-pkg' + ), + { + a: , + } + ) } +

+ ) }
); }; diff --git a/projects/plugins/jetpack/changelog/remove-wpcom-simple-site-search-add-license b/projects/plugins/jetpack/changelog/remove-wpcom-simple-site-search-add-license new file mode 100644 index 0000000000000..a1c1831fa1ef7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/remove-wpcom-simple-site-search-add-license @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Updated composer.lock. + + diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 3b2aafcbaa7f6..b93ec22c35ba4 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -2181,7 +2181,7 @@ "dist": { "type": "path", "url": "../../packages/search", - "reference": "b21497d346a5032e99bf9786ed70469543cf1e73" + "reference": "2add27c03851b950a0baf0569bbee4869d31ad76" }, "require": { "automattic/jetpack-assets": "@dev", @@ -2209,7 +2209,7 @@ "link-template": "https://github.com/Automattic/jetpack-search/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "0.43.x-dev" + "dev-trunk": "0.44.x-dev" }, "version-constants": { "::VERSION": "src/class-package.php" diff --git a/projects/plugins/search/changelog/remove-wpcom-simple-site-search-add-license b/projects/plugins/search/changelog/remove-wpcom-simple-site-search-add-license new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/search/changelog/remove-wpcom-simple-site-search-add-license @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index 34b40103da769..6ac85adb2f0e2 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -1347,7 +1347,7 @@ "dist": { "type": "path", "url": "../../packages/search", - "reference": "b21497d346a5032e99bf9786ed70469543cf1e73" + "reference": "2add27c03851b950a0baf0569bbee4869d31ad76" }, "require": { "automattic/jetpack-assets": "@dev", @@ -1375,7 +1375,7 @@ "link-template": "https://github.com/Automattic/jetpack-search/compare/v${old}...v${new}" }, "branch-alias": { - "dev-trunk": "0.43.x-dev" + "dev-trunk": "0.44.x-dev" }, "version-constants": { "::VERSION": "src/class-package.php" From 89b08ef910363240071f1fb5d7144ad357aee2ef Mon Sep 17 00:00:00 2001 From: Calypso Bot Date: Mon, 1 Apr 2024 23:13:27 +0300 Subject: [PATCH 34/37] Update dependency @automattic/calypso-color-schemes to v3.1.3 (#36665) * Update dependency @automattic/calypso-color-schemes to v3.1.3 * Fix weird error renovate was running into --------- Co-authored-by: Renovate Bot Co-authored-by: Brad Jorsch --- .github/files/renovate-post-upgrade.sh | 3 +++ pnpm-lock.yaml | 8 ++------ .../renovate-automattic-calypso-color-schemes-3.x | 4 ++++ projects/packages/videopress/package.json | 4 ++-- .../packages/videopress/src/class-package-version.php | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x diff --git a/.github/files/renovate-post-upgrade.sh b/.github/files/renovate-post-upgrade.sh index e74ffffbdd65f..2e15d16f93d7b 100755 --- a/.github/files/renovate-post-upgrade.sh +++ b/.github/files/renovate-post-upgrade.sh @@ -2,6 +2,9 @@ set -eo pipefail +# Signal to jetpack CLI that we're part of a CI run, so it doesn't try to prompt for tracking. +export CI=1 + BASE="$PWD" BRANCH="$1" CHANGEFILE="$(sed 's/[<>:"/\\|?*]/-/g' <<<"$BRANCH")" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4fcb34a67535..36205ce1ff45d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2539,8 +2539,8 @@ importers: version: 2.3.0 devDependencies: '@automattic/calypso-color-schemes': - specifier: 3.1.2 - version: 3.1.2 + specifier: 3.1.3 + version: 3.1.3 '@automattic/jetpack-webpack-config': specifier: workspace:* version: link:../../js-packages/webpack-config @@ -4502,10 +4502,6 @@ packages: resolution: {integrity: sha512-dRmLP0Ytf2oDNbUbO8MXLKYnPZfqhtFQ8v1hgDo2Fde1Y0bUz2Ll1UmUOHdyZudnrN/8Zt95cG/fIOJ0dxHi8Q==} dev: false - /@automattic/calypso-color-schemes@3.1.2: - resolution: {integrity: sha512-tp1zRUHqtC+R/sIvUHdVFat7pJPRiMyb0z4/hKlqvby3/McRraSmDkK1GtIJCPYiX7C/whwXQGb49hGJIGeshw==} - dev: true - /@automattic/calypso-color-schemes@3.1.3: resolution: {integrity: sha512-nzs36yfxUOcsD3HvB72IHgdUfIzTRnT7QmF78CBXEREawTEs0uDyELdx/rAOtW/PauxRYRGQ4zeK5c67FWqLxw==} diff --git a/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x b/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x new file mode 100644 index 0000000000000..c47cb18e82997 --- /dev/null +++ b/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated package dependencies. diff --git a/projects/packages/videopress/package.json b/projects/packages/videopress/package.json index 77d6098b22070..088e9cc0bed05 100644 --- a/projects/packages/videopress/package.json +++ b/projects/packages/videopress/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-videopress", - "version": "0.23.12", + "version": "0.23.13-alpha", "description": "VideoPress package", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/videopress/#readme", "bugs": { @@ -23,7 +23,7 @@ "test": "NODE_OPTIONS=--experimental-vm-modules jest" }, "devDependencies": { - "@automattic/calypso-color-schemes": "3.1.2", + "@automattic/calypso-color-schemes": "3.1.3", "@automattic/jetpack-base-styles": "workspace:*", "@automattic/jetpack-webpack-config": "workspace:*", "@babel/core": "7.24.0", diff --git a/projects/packages/videopress/src/class-package-version.php b/projects/packages/videopress/src/class-package-version.php index 4862d553a1ab6..65db3df609722 100644 --- a/projects/packages/videopress/src/class-package-version.php +++ b/projects/packages/videopress/src/class-package-version.php @@ -11,7 +11,7 @@ * The Package_Version class. */ class Package_Version { - const PACKAGE_VERSION = '0.23.12'; + const PACKAGE_VERSION = '0.23.13-alpha'; const PACKAGE_SLUG = 'videopress'; From c0ac03879e8900fae0f0fcd90de19423d3595143 Mon Sep 17 00:00:00 2001 From: Paul Bunkham Date: Tue, 2 Apr 2024 08:09:20 +0100 Subject: [PATCH 35/37] Social: Ensure the panel is rendered during pre/post publish (#36654) The change in #36362 meant that the pre/post publish panels would only be rendered when the sidebar was open. This change ensures they're rendered outside of the JetpackPluginSidebar component. --- .../changelog/fix-social-publish-panel | 4 +++ .../extensions/plugins/publicize/index.js | 25 +++++++++++++++++-- .../extensions/plugins/publicize/settings.js | 25 ------------------- 3 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/fix-social-publish-panel delete mode 100644 projects/plugins/jetpack/extensions/plugins/publicize/settings.js diff --git a/projects/plugins/jetpack/changelog/fix-social-publish-panel b/projects/plugins/jetpack/changelog/fix-social-publish-panel new file mode 100644 index 0000000000000..cf332572b7683 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-social-publish-panel @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Social: Ensure the settings panel is rendered during pre/post publish diff --git a/projects/plugins/jetpack/extensions/plugins/publicize/index.js b/projects/plugins/jetpack/extensions/plugins/publicize/index.js index 8d2963f4c4848..94584b2d1d36c 100644 --- a/projects/plugins/jetpack/extensions/plugins/publicize/index.js +++ b/projects/plugins/jetpack/extensions/plugins/publicize/index.js @@ -7,12 +7,19 @@ * It also hooks into our dedicated Jetpack plugin sidebar and * displays the Publicize UI there. */ +import { + PublicizePanel, + SocialImageGeneratorPanel, + usePublicizeConfig, +} from '@automattic/jetpack-publicize-components'; import { useModuleStatus } from '@automattic/jetpack-shared-extension-utils'; import { PostTypeSupportCheck } from '@wordpress/editor'; import JetpackPluginSidebar from '../../shared/jetpack-plugin-sidebar'; import { PublicizePlaceholder } from './components/placeholder'; import PublicizeSkeletonLoader from './components/skeleton-loader'; -import Settings from './settings'; +import UpsellNotice from './components/upsell'; +import PostPublishPanels from './post-publish'; +import PrePublishPanels from './pre-publish'; import './editor.scss'; @@ -21,8 +28,10 @@ export const name = 'publicize'; const PublicizeSettings = () => { const { isLoadingModules, isChangingStatus, isModuleActive, changeStatus } = useModuleStatus( name ); + const { isSocialImageGeneratorAvailable } = usePublicizeConfig(); let children = null; + let panels = null; if ( isLoadingModules ) { children = ; @@ -35,12 +44,24 @@ const PublicizeSettings = () => { /> ); } else { - children = ; + children = ( + + + + ); + panels = ( + <> + { isSocialImageGeneratorAvailable && } + + + + ); } return ( { children } + { panels } ); }; diff --git a/projects/plugins/jetpack/extensions/plugins/publicize/settings.js b/projects/plugins/jetpack/extensions/plugins/publicize/settings.js deleted file mode 100644 index 8682a2f8ad37a..0000000000000 --- a/projects/plugins/jetpack/extensions/plugins/publicize/settings.js +++ /dev/null @@ -1,25 +0,0 @@ -import { - PublicizePanel, - SocialImageGeneratorPanel, - usePublicizeConfig, -} from '@automattic/jetpack-publicize-components'; -import UpsellNotice from './components/upsell'; -import PostPublishPanels from './post-publish'; -import PrePublishPanels from './pre-publish'; - -const Settings = () => { - const { isSocialImageGeneratorAvailable } = usePublicizeConfig(); - - return ( - <> - - - - { isSocialImageGeneratorAvailable && } - - - - ); -}; - -export default Settings; From 231c92254c04e094d527b7eea670c957bb783889 Mon Sep 17 00:00:00 2001 From: Adnan Haque <3737780+haqadn@users.noreply.github.com> Date: Tue, 2 Apr 2024 15:38:22 +0600 Subject: [PATCH 36/37] Changelog and readme.txt edits. (#36686) --- projects/packages/identity-crisis/CHANGELOG.md | 5 +++++ .../identity-crisis/changelog/fix-phpcompatibility-dev-phpcs | 5 ----- projects/packages/identity-crisis/package.json | 2 +- .../packages/identity-crisis/src/class-identity-crisis.php | 2 +- projects/packages/my-jetpack/CHANGELOG.md | 5 +++++ .../my-jetpack/changelog/fix-phpcompatibility-dev-phpcs | 5 ----- .../my-jetpack/changelog/fix-sync-between-boost-scores | 4 ---- projects/packages/my-jetpack/package.json | 2 +- projects/packages/my-jetpack/src/class-initializer.php | 2 +- projects/packages/videopress/CHANGELOG.md | 5 +++++ .../changelog/renovate-automattic-calypso-color-schemes-3.x | 4 ---- projects/packages/videopress/package.json | 2 +- projects/packages/videopress/src/class-package-version.php | 2 +- projects/plugins/boost/CHANGELOG.md | 4 ++-- projects/plugins/boost/changelog/fix-cache-broken-reference | 5 ----- .../plugins/boost/changelog/fix-phpcompatibility-dev-phpcs | 5 ----- projects/plugins/boost/composer.json | 4 ++-- projects/plugins/boost/composer.lock | 2 +- projects/plugins/boost/jetpack-boost.php | 4 ++-- projects/plugins/boost/package.json | 2 +- projects/plugins/boost/readme.txt | 2 +- 21 files changed, 30 insertions(+), 43 deletions(-) delete mode 100644 projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs delete mode 100644 projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs delete mode 100644 projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores delete mode 100644 projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x delete mode 100644 projects/plugins/boost/changelog/fix-cache-broken-reference delete mode 100644 projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs diff --git a/projects/packages/identity-crisis/CHANGELOG.md b/projects/packages/identity-crisis/CHANGELOG.md index 7a7d100163c61..2c8a4b6202bc4 100644 --- a/projects/packages/identity-crisis/CHANGELOG.md +++ b/projects/packages/identity-crisis/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.18.2] - 2024-04-02 +### Changed +- Internal updates. + ## [0.18.1] - 2024-04-01 ### Changed - Tests: moved tests from a separate files to the main tests file. [#36656] @@ -524,6 +528,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated package dependencies. - Use Connection/Urls for home_url and site_url functions migrated from Sync. +[0.18.2]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.18.1...v0.18.2 [0.18.1]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.18.0...v0.18.1 [0.18.0]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.6...v0.18.0 [0.17.6]: https://github.com/Automattic/jetpack-identity-crisis/compare/v0.17.5...v0.17.6 diff --git a/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs b/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs deleted file mode 100644 index 435799df4ad8d..0000000000000 --- a/projects/packages/identity-crisis/changelog/fix-phpcompatibility-dev-phpcs +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 - - diff --git a/projects/packages/identity-crisis/package.json b/projects/packages/identity-crisis/package.json index c0c6a80db0bd4..688b0e9e69736 100644 --- a/projects/packages/identity-crisis/package.json +++ b/projects/packages/identity-crisis/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-identity-crisis", - "version": "0.18.2-alpha", + "version": "0.18.2", "description": "Jetpack Identity Crisis", "main": "_inc/admin.jsx", "repository": { diff --git a/projects/packages/identity-crisis/src/class-identity-crisis.php b/projects/packages/identity-crisis/src/class-identity-crisis.php index eae05042219f0..5cedd024be3b4 100644 --- a/projects/packages/identity-crisis/src/class-identity-crisis.php +++ b/projects/packages/identity-crisis/src/class-identity-crisis.php @@ -26,7 +26,7 @@ class Identity_Crisis { /** * Package Version */ - const PACKAGE_VERSION = '0.18.2-alpha'; + const PACKAGE_VERSION = '0.18.2'; /** * Package Slug diff --git a/projects/packages/my-jetpack/CHANGELOG.md b/projects/packages/my-jetpack/CHANGELOG.md index 4641fcfa252c3..747c077042fcd 100644 --- a/projects/packages/my-jetpack/CHANGELOG.md +++ b/projects/packages/my-jetpack/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.20.2] - 2024-04-02 +### Fixed +- Fix Boost score inconsistency [#36679] + ## [4.20.1] - 2024-04-01 ### Added - Change Phan baselines. [#36627] @@ -1403,6 +1407,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created package +[4.20.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.20.1...4.20.2 [4.20.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.20.0...4.20.1 [4.20.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.19.0...4.20.0 [4.19.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/4.18.0...4.19.0 diff --git a/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs b/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs deleted file mode 100644 index 435799df4ad8d..0000000000000 --- a/projects/packages/my-jetpack/changelog/fix-phpcompatibility-dev-phpcs +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 - - diff --git a/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores b/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores deleted file mode 100644 index fe9c2803e5ca8..0000000000000 --- a/projects/packages/my-jetpack/changelog/fix-sync-between-boost-scores +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fixed - -Fix Boost score inconsistency diff --git a/projects/packages/my-jetpack/package.json b/projects/packages/my-jetpack/package.json index 85b414560defd..1f1a729c01ed2 100644 --- a/projects/packages/my-jetpack/package.json +++ b/projects/packages/my-jetpack/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-my-jetpack", - "version": "4.20.2-alpha", + "version": "4.20.2", "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme", "bugs": { diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 9c6b25f7a9632..9d23333d6623f 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -36,7 +36,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '4.20.2-alpha'; + const PACKAGE_VERSION = '4.20.2'; /** * HTML container ID for the IDC screen on My Jetpack page. diff --git a/projects/packages/videopress/CHANGELOG.md b/projects/packages/videopress/CHANGELOG.md index 94d0431795172..a0999ddebf8d7 100644 --- a/projects/packages/videopress/CHANGELOG.md +++ b/projects/packages/videopress/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.23.13] - 2024-04-02 +### Changed +- Updated package dependencies. [#36665] + ## [0.23.12] - 2024-03-27 ### Changed - Updated package dependencies. [#36539, #36585] @@ -1302,6 +1306,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Created empty package [#24952] +[0.23.13]: https://github.com/Automattic/jetpack-videopress/compare/v0.23.12...v0.23.13 [0.23.12]: https://github.com/Automattic/jetpack-videopress/compare/v0.23.11...v0.23.12 [0.23.11]: https://github.com/Automattic/jetpack-videopress/compare/v0.23.10...v0.23.11 [0.23.10]: https://github.com/Automattic/jetpack-videopress/compare/v0.23.9...v0.23.10 diff --git a/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x b/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x deleted file mode 100644 index c47cb18e82997..0000000000000 --- a/projects/packages/videopress/changelog/renovate-automattic-calypso-color-schemes-3.x +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: changed - -Updated package dependencies. diff --git a/projects/packages/videopress/package.json b/projects/packages/videopress/package.json index 088e9cc0bed05..0dfa5e6aa8517 100644 --- a/projects/packages/videopress/package.json +++ b/projects/packages/videopress/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-videopress", - "version": "0.23.13-alpha", + "version": "0.23.13", "description": "VideoPress package", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/videopress/#readme", "bugs": { diff --git a/projects/packages/videopress/src/class-package-version.php b/projects/packages/videopress/src/class-package-version.php index 65db3df609722..ccbfcfc2d857a 100644 --- a/projects/packages/videopress/src/class-package-version.php +++ b/projects/packages/videopress/src/class-package-version.php @@ -11,7 +11,7 @@ * The Package_Version class. */ class Package_Version { - const PACKAGE_VERSION = '0.23.13-alpha'; + const PACKAGE_VERSION = '0.23.13'; const PACKAGE_SLUG = 'videopress'; diff --git a/projects/plugins/boost/CHANGELOG.md b/projects/plugins/boost/CHANGELOG.md index c4daee53fb420..05bcac032800a 100644 --- a/projects/plugins/boost/CHANGELOG.md +++ b/projects/plugins/boost/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [3.2.1] - 2024-03-29 +## [3.2.2] - 2024-04-02 ### Added - Cache: Ensure cache engine is loading every time the Settings page loads. [#36339] - Cache: Clear cache if Boost module settings are changed [#36452] @@ -419,7 +419,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First public alpha release -[3.2.1]: https://github.com/Automattic/jetpack-boost-production/compare/3.2.0...3.2.1 +[3.2.2]: https://github.com/Automattic/jetpack-boost-production/compare/3.2.0...3.2.2 [3.2.0]: https://github.com/Automattic/jetpack-boost-production/compare/3.1.1...3.2.0 [3.1.1]: https://github.com/Automattic/jetpack-boost-production/compare/3.0.2...3.1.1 [3.0.2]: https://github.com/Automattic/jetpack-boost-production/compare/3.0.1...3.0.2 diff --git a/projects/plugins/boost/changelog/fix-cache-broken-reference b/projects/plugins/boost/changelog/fix-cache-broken-reference deleted file mode 100644 index be00ab950e8ed..0000000000000 --- a/projects/plugins/boost/changelog/fix-cache-broken-reference +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Fixed a fatal error due to a broken reference - - diff --git a/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs b/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs deleted file mode 100644 index 435799df4ad8d..0000000000000 --- a/projects/plugins/boost/changelog/fix-phpcompatibility-dev-phpcs +++ /dev/null @@ -1,5 +0,0 @@ -Significance: patch -Type: fixed -Comment: Version bump after https://github.com/Automattic/jetpack/pull/36655 - - diff --git a/projects/plugins/boost/composer.json b/projects/plugins/boost/composer.json index 8552434b79778..85af127903c1d 100644 --- a/projects/plugins/boost/composer.json +++ b/projects/plugins/boost/composer.json @@ -3,7 +3,7 @@ "description": "Boost your WordPress site's performance, from the creators of Jetpack", "type": "library", "license": "GPL-2.0-or-later", - "version": "3.2.2-alpha", + "version": "3.2.2", "authors": [ { "name": "Automattic, Inc.", @@ -73,7 +73,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_2_alpha", + "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_2", "allow-plugins": { "roots/wordpress-core-installer": true, "automattic/jetpack-autoloader": true, diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index a5fb2d3cb3bd3..27b9a0020d2e0 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/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": "eee808f5a3df537d4ca2fc636f2a820a", + "content-hash": "6e6278837e57c84bfd839ceffa75748f", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", diff --git a/projects/plugins/boost/jetpack-boost.php b/projects/plugins/boost/jetpack-boost.php index fb64fcf7d30bb..178267ede0299 100644 --- a/projects/plugins/boost/jetpack-boost.php +++ b/projects/plugins/boost/jetpack-boost.php @@ -9,7 +9,7 @@ * Plugin Name: Jetpack Boost * Plugin URI: https://jetpack.com/boost * Description: Boost your WordPress site's performance, from the creators of Jetpack - * Version: 3.2.2-alpha + * Version: 3.2.2 * Author: Automattic - Jetpack Site Speed team * Author URI: https://jetpack.com/boost/ * License: GPL-2.0+ @@ -29,7 +29,7 @@ die; } -define( 'JETPACK_BOOST_VERSION', '3.2.2-alpha' ); +define( 'JETPACK_BOOST_VERSION', '3.2.2' ); define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' ); if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) { diff --git a/projects/plugins/boost/package.json b/projects/plugins/boost/package.json index 6f42ed8b0a80e..b1dc9a895e954 100644 --- a/projects/plugins/boost/package.json +++ b/projects/plugins/boost/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-boost", - "version": "3.2.2-alpha", + "version": "3.2.2", "description": "Boost your WordPress site's performance, from the creators of Jetpack", "directories": { "test": "tests" diff --git a/projects/plugins/boost/readme.txt b/projects/plugins/boost/readme.txt index 66121a25ffa81..00f3f9dd205f0 100644 --- a/projects/plugins/boost/readme.txt +++ b/projects/plugins/boost/readme.txt @@ -183,7 +183,7 @@ If you run into compatibility issues, please do let us know. You can drop us a l 2. Jetpack Boost Speed Improvement == Changelog == -### 3.2.1 - 2024-03-29 +### 3.2.2 - 2024-04-02 #### Added - Cache: Ensure cache engine is loading every time the Settings page loads. - Cache: Clear cache if Boost module settings are changed From 978b29f32f2310a925d0e26a6901a7f3c039fc15 Mon Sep 17 00:00:00 2001 From: Adnan Haque <3737780+haqadn@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:37:33 +0600 Subject: [PATCH 37/37] Boost: Init new plugin cycle (#36691) --- projects/plugins/boost/changelog/init-release-cycle | 5 +++++ projects/plugins/boost/changelog/update-init-plugin-cycle | 5 +++++ projects/plugins/boost/composer.json | 4 ++-- projects/plugins/boost/composer.lock | 2 +- projects/plugins/boost/jetpack-boost.php | 4 ++-- projects/plugins/boost/package.json | 2 +- projects/plugins/boost/readme.txt | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 projects/plugins/boost/changelog/init-release-cycle create mode 100644 projects/plugins/boost/changelog/update-init-plugin-cycle diff --git a/projects/plugins/boost/changelog/init-release-cycle b/projects/plugins/boost/changelog/init-release-cycle new file mode 100644 index 0000000000000..da5e1b03a8238 --- /dev/null +++ b/projects/plugins/boost/changelog/init-release-cycle @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Init 3.2.3-alpha + + diff --git a/projects/plugins/boost/changelog/update-init-plugin-cycle b/projects/plugins/boost/changelog/update-init-plugin-cycle new file mode 100644 index 0000000000000..9aa70e3ec1f75 --- /dev/null +++ b/projects/plugins/boost/changelog/update-init-plugin-cycle @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Updated composer.lock. + + diff --git a/projects/plugins/boost/composer.json b/projects/plugins/boost/composer.json index 85af127903c1d..4c93165649677 100644 --- a/projects/plugins/boost/composer.json +++ b/projects/plugins/boost/composer.json @@ -3,7 +3,7 @@ "description": "Boost your WordPress site's performance, from the creators of Jetpack", "type": "library", "license": "GPL-2.0-or-later", - "version": "3.2.2", + "version": "3.2.3-alpha", "authors": [ { "name": "Automattic, Inc.", @@ -73,7 +73,7 @@ "platform": { "ext-intl": "0.0.0" }, - "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_2", + "autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_2_3_alpha", "allow-plugins": { "roots/wordpress-core-installer": true, "automattic/jetpack-autoloader": true, diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 27b9a0020d2e0..caf74bec3238a 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/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": "6e6278837e57c84bfd839ceffa75748f", + "content-hash": "ea35d215b43d75885759488ee7b3023c", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", diff --git a/projects/plugins/boost/jetpack-boost.php b/projects/plugins/boost/jetpack-boost.php index 178267ede0299..f74e5d44f2f59 100644 --- a/projects/plugins/boost/jetpack-boost.php +++ b/projects/plugins/boost/jetpack-boost.php @@ -9,7 +9,7 @@ * Plugin Name: Jetpack Boost * Plugin URI: https://jetpack.com/boost * Description: Boost your WordPress site's performance, from the creators of Jetpack - * Version: 3.2.2 + * Version: 3.2.3-alpha * Author: Automattic - Jetpack Site Speed team * Author URI: https://jetpack.com/boost/ * License: GPL-2.0+ @@ -29,7 +29,7 @@ die; } -define( 'JETPACK_BOOST_VERSION', '3.2.2' ); +define( 'JETPACK_BOOST_VERSION', '3.2.3-alpha' ); define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' ); if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) { diff --git a/projects/plugins/boost/package.json b/projects/plugins/boost/package.json index b1dc9a895e954..c9bda59289d1c 100644 --- a/projects/plugins/boost/package.json +++ b/projects/plugins/boost/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-boost", - "version": "3.2.2", + "version": "3.2.3-alpha", "description": "Boost your WordPress site's performance, from the creators of Jetpack", "directories": { "test": "tests" diff --git a/projects/plugins/boost/readme.txt b/projects/plugins/boost/readme.txt index 00f3f9dd205f0..20f00495a5c99 100644 --- a/projects/plugins/boost/readme.txt +++ b/projects/plugins/boost/readme.txt @@ -5,7 +5,7 @@ Tags: performance, speed, web vitals, critical css, cache Requires at least: 5.5 Tested up to: 6.5 Requires PHP: 7.0 -Stable tag: 3.1.1 +Stable tag: 3.2.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html