Skip to content

Commit

Permalink
Merge branch 'release/24.3' of github.com:Yoast/wordpress-seo into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
FAMarfuaty committed Jan 8, 2025
2 parents 0c73abc + 14d1986 commit 3557750
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"webpack-bundle-analyzer": "^4.9.1"
},
"yoast": {
"pluginVersion": "24.3-RC1"
"pluginVersion": "24.3-RC2"
},
"version": "0.0.0"
}
13 changes: 13 additions & 0 deletions packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,19 @@ describe( "AnalysisWebWorker", () => {
worker._paper = new Paper( "This is the content.", { keyword: "dogs" } );
expect( worker.shouldReadabilityUpdate( paper ) ).toBe( true );
} );

test( "returns true when the client IDs of the blocks inside attributes changes", () => {
const paper = new Paper( "This is the content.", { wpBlocks: [
{ name: "block1", clientId: "1234" },
{ name: "block2", clientId: "5678" },
] } );

worker._paper = new Paper( "This is the content.", { wpBlocks: [
{ name: "block1", clientId: "6783" },
{ name: "block2", clientId: "0636" },
] } );
expect( worker.shouldReadabilityUpdate( paper ) ).toBe( true );
} );
} );

describe( "shouldSeoUpdate", () => {
Expand Down
8 changes: 7 additions & 1 deletion packages/yoastseo/src/worker/AnalysisWebWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// External dependencies.
import { enableFeatures } from "@yoast/feature-flag";
import { __, setLocaleData, sprintf } from "@wordpress/i18n";
import { forEach, has, includes, isEmpty, isNull, isObject, isString, isUndefined, merge, pickBy } from "lodash";
import { forEach, has, includes, isEmpty, isEqual, isNull, isObject, isString, isUndefined, merge, pickBy } from "lodash";
import { getLogger } from "loglevel";

// Internal dependencies.
Expand Down Expand Up @@ -954,6 +954,12 @@ export default class AnalysisWebWorker {
return true;
}

// Perform deep comparison between the list of Gutenberg blocks as we want to update the readability analysis
// if the client IDs of the blocks inside `wpBlocks` change.
if ( ! isEqual( this._paper._attributes.wpBlocks, paper._attributes.wpBlocks ) ) {
return true;
}

return this._paper.getLocale() !== paper.getLocale();
}

Expand Down
2 changes: 1 addition & 1 deletion wp-seo-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* {@internal Nobody should be able to overrule the real version number as this can cause
* serious issues with the options, so no if ( ! defined() ).}}
*/
define( 'WPSEO_VERSION', '24.3-RC1' );
define( 'WPSEO_VERSION', '24.3-RC2' );


if ( ! defined( 'WPSEO_PATH' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion wp-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @wordpress-plugin
* Plugin Name: Yoast SEO
* Version: 24.3-RC1
* Version: 24.3-RC2
* Plugin URI: https://yoa.st/1uj
* Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
* Author: Team Yoast
Expand Down

0 comments on commit 3557750

Please sign in to comment.