Skip to content

Commit 3011c63

Browse files
committed
Merge branch 'trunk' of https://github.com/WordPress/performance into remove/transitional-xpath
2 parents 33d060a + 3ce0f45 commit 3011c63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+683
-151
lines changed

bin/plugin/commands/readme.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function updateReadmeChangelog( readmeFile, changelog ) {
5454
const fileContent = fs.readFileSync( readmeFile, 'utf-8' );
5555

5656
const stableTagVersionMatches = fileContent.match(
57-
/^Stable tag:\s*(\d+\.\d+\.\d+)$/m
57+
/^Stable tag:\s*(\d+\.\d+\.\d+(?:-[\w\.]+)?)$/m
5858
);
5959
if ( ! stableTagVersionMatches ) {
6060
throw new Error( `Unable to locate stable tag in ${ readmeFile }` );
@@ -112,7 +112,7 @@ function getStableTag( readmeFilePath ) {
112112
const readmeContents = fs.readFileSync( readmeFilePath, 'utf-8' );
113113

114114
const stableTagVersionMatches = readmeContents.match(
115-
/^Stable tag:\s*(\d+\.\d+\.\d+)$/m
115+
/^Stable tag:\s*(\d+\.\d+\.\d+(?:-[\w\.]+)?)$/m
116116
);
117117
if ( ! stableTagVersionMatches ) {
118118
throw new Error( `Unable to locate stable tag in ${ readmeFilePath }` );

bin/plugin/commands/since.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports.handler = async ( opt ) => {
6161
const readmeFile = path.resolve( pluginDirectory, 'readme.txt' );
6262
const readmeContent = fs.readFileSync( readmeFile, 'utf-8' );
6363
const readmeContentMatches = readmeContent.match(
64-
/^Stable tag:\s+(\d+\.\d+\.\d+)$/m
64+
/^Stable tag:\s+(\d+\.\d+\.\d+(?:-[\w\.]+)?)$/m
6565
);
6666
if ( ! readmeContentMatches ) {
6767
throw new Error(

bin/plugin/commands/versions.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ async function checkPluginDirectory( pluginDirectory ) {
3838
const readmeContents = fs.readFileSync( readmeFilePath, 'utf-8' );
3939

4040
const stableTagVersionMatches = readmeContents.match(
41-
/^Stable tag:\s*(\d+\.\d+\.\d+(?:-\w+)?)$/m
41+
/^Stable tag:\s*(\d+\.\d+\.\d+(?:-[\w\.]+)?)$/m
4242
);
4343
if ( ! stableTagVersionMatches ) {
4444
throw new Error( `Unable to locate stable tag in ${ readmeFilePath }` );
4545
}
4646
const stableTagVersion = stableTagVersionMatches[ 1 ];
4747

4848
const latestChangelogMatches = readmeContents.match(
49-
/^== Changelog ==\n+= (\d+\.\d+\.\d+(?:-\w+)?) =$/m
49+
/^== Changelog ==\n+= (\d+\.\d+\.\d+(?:-[\w\.]+)?) =$/m
5050
);
5151
if ( ! latestChangelogMatches ) {
5252
throw new Error(
53-
'Unable to latest version entry in readme changelog.'
53+
'Unable to locate latest version entry in readme changelog.'
5454
);
5555
}
5656
const latestChangelogVersion = latestChangelogMatches[ 1 ];
@@ -71,7 +71,7 @@ async function checkPluginDirectory( pluginDirectory ) {
7171
}
7272

7373
const headerVersionMatches = phpBootstrapFileContents.match(
74-
/^ \* Version:\s+(\d+\.\d+\.\d+(?:-\w+)?)$/m
74+
/^ \* Version:\s+(\d+\.\d+\.\d+(?:-[\w\.]+)?)$/m
7575
);
7676
if ( ! headerVersionMatches ) {
7777
throw new Error(
@@ -81,7 +81,7 @@ async function checkPluginDirectory( pluginDirectory ) {
8181
const headerVersion = headerVersionMatches[ 1 ];
8282

8383
const phpLiteralVersionMatches = phpBootstrapFileContents.match(
84-
/'(\d+\.\d+\.\d+(?:-\w+)?)'/
84+
/'(\d+\.\d+\.\d+(?:-[\w\.]+)?)'/
8585
);
8686
if ( ! phpLiteralVersionMatches ) {
8787
throw new Error( 'Unable to locate the PHP literal version.' );

composer.lock

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 18 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"fast-glob": "^3.3.3",
2222
"fs-extra": "^11.3.0",
2323
"husky": "^9.1.7",
24-
"lint-staged": "^15.4.1",
24+
"lint-staged": "^15.4.3",
2525
"lodash": "4.17.21",
2626
"micromatch": "^4.0.8",
2727
"npm-run-all": "^4.1.5",

plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private function reduce_layout_shifts( OD_Tag_Visitor_Context $context ): void {
210210
* not end up being the load balanced domain used for the embed. Lastly, these domains are only for the URLs
211211
* for GET requests, as POST requests are not likely to be part of the critical rendering path.
212212
*
213-
* @since n.e.x.t
213+
* @since 0.4.1
214214
*
215215
* @param OD_HTML_Tag_Processor $processor Processor, with the cursor currently at an embed block.
216216
* @return array<non-empty-string> Array of URLs to preconnect to.
@@ -270,7 +270,7 @@ private function get_preconnect_urls( OD_HTML_Tag_Processor $processor ): array
270270
/**
271271
* Adds preconnect links for embed resources.
272272
*
273-
* @since n.e.x.t
273+
* @since 0.4.1
274274
*
275275
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
276276
*/
@@ -299,7 +299,7 @@ private function add_preconnect_links( OD_Tag_Visitor_Context $context ): void {
299299
/**
300300
* Optimizes an embed based on whether it is displayed in any initial viewport.
301301
*
302-
* @since n.e.x.t
302+
* @since 0.4.1
303303
*
304304
* @param OD_Tag_Visitor_Context $context Tag visitor context, with the cursor currently at an embed block.
305305
*/

plugins/embed-optimizer/load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Optimizes the performance of embeds through lazy-loading, preconnecting, and reserving space to reduce layout shifts.
66
* Requires at least: 6.6
77
* Requires PHP: 7.2
8-
* Version: 0.4.0
8+
* Version: 0.4.1
99
* Author: WordPress Performance Team
1010
* Author URI: https://make.wordpress.org/performance/
1111
* License: GPLv2 or later
@@ -71,7 +71,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
7171
}
7272
)(
7373
'embed_optimizer_pending_plugin',
74-
'0.4.0',
74+
'0.4.1',
7575
static function ( string $version ): void {
7676
if ( defined( 'EMBED_OPTIMIZER_VERSION' ) ) {
7777
return;

plugins/embed-optimizer/readme.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Contributors: wordpressdotorg
44
Tested up to: 6.7
5-
Stable tag: 0.4.0
5+
Stable tag: 0.4.1
66
License: GPLv2 or later
77
License URI: https://www.gnu.org/licenses/gpl-2.0.html
88
Tags: performance, embeds
@@ -67,6 +67,12 @@ The [plugin source code](https://github.com/WordPress/performance/tree/trunk/plu
6767

6868
== Changelog ==
6969

70+
= 0.4.1 =
71+
72+
**Bug Fixes**
73+
74+
* Remove requirement for both mobile and desktop URL metrics to be collected for `preconnect` links to be added. ([1764](https://github.com/WordPress/performance/pull/1764))
75+
7076
= 0.4.0 =
7177

7278
**Enhancements**

plugins/image-prioritizer/load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Requires Plugins: optimization-detective
9-
* Version: 0.3.0
9+
* Version: 0.3.1
1010
* Author: WordPress Performance Team
1111
* Author URI: https://make.wordpress.org/performance/
1212
* License: GPLv2 or later
@@ -72,7 +72,7 @@ static function ( string $global_var_name, string $version, Closure $load ): voi
7272
}
7373
)(
7474
'image_prioritizer_pending_plugin',
75-
'0.3.0',
75+
'0.3.1',
7676
static function ( string $version ): void {
7777
if ( defined( 'IMAGE_PRIORITIZER_VERSION' ) ) {
7878
return;

0 commit comments

Comments
 (0)