Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4153951
Add string compression using CompressionStream API for URL Metric pay…
b1ink0 Mar 4, 2025
5347657
Add decompression for REST API request body in URL Metrics endpoint
b1ink0 Mar 4, 2025
29fff3c
Fix failing test
b1ink0 Mar 5, 2025
36bc475
Remove redundant comment and improve doc comment
b1ink0 Mar 6, 2025
a4632d1
Keep XPath for matching the required pattern
b1ink0 Mar 6, 2025
14409a6
Remove `isDebug` conditions and improve JSDoc comments for consistency
b1ink0 Mar 6, 2025
2f81ec0
Add REST API request body decompression and related tests
b1ink0 Mar 6, 2025
90aca14
Add test for `rest_pre_dispatch` hook and cover annotations
b1ink0 Mar 6, 2025
eeb066d
Merge branch 'trunk' into add/url-metrics-compression
b1ink0 Mar 6, 2025
8b84ed3
Suppress unused default export error
westonruter Mar 10, 2025
c59c3ed
Add ext-zlib to composer.json
westonruter Mar 10, 2025
130277a
Switch ext-zlip from require to suggest
westonruter Mar 10, 2025
cbfba12
Run composer update
westonruter Mar 10, 2025
0ca808f
Fix misspelling
westonruter Mar 10, 2025
e1d4b1e
Keep timestamps for URL Metrics current in fixture
westonruter Mar 10, 2025
af1d1dc
Compress URL metrics only when `gzdecode` is available
b1ink0 Mar 12, 2025
97c7836
Merge branch 'trunk' into add/url-metrics-compression
b1ink0 Mar 12, 2025
82fe8e9
Always pass `gzdecodeAvailable` to client
b1ink0 Mar 12, 2025
1984db0
Add max URL metrics size constraints
b1ink0 Mar 13, 2025
5f0be29
Add tests for max URL metrics size filter in REST API
b1ink0 Mar 13, 2025
f9d7fe1
Ensure `od_get_max_url_metric_size` returns a valid positive value wi…
b1ink0 Mar 13, 2025
2a11bf5
Improve DOC comment for filter
b1ink0 Mar 13, 2025
ba383c6
Merge branch 'trunk' of https://github.com/WordPress/performance into…
westonruter Mar 14, 2025
746a410
Use maximum instead of max in PHP; add test coverage
westonruter Mar 14, 2025
d41da3c
Move od_get_maximum_url_metric_size to storage/data.php
westonruter Mar 14, 2025
ad6d264
Fix passing filter name to _doing_it_wrong()
westonruter Mar 14, 2025
c0e3291
Rename string to jsonString to avoid potential type confusion
westonruter Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Always pass gzdecodeAvailable to client
Co-authored-by: Weston Ruter <westonruter@google.com>
  • Loading branch information
b1ink0 and westonruter authored Mar 12, 2025
commit 82fe8e92be930b3e4e9c44138ea11ccadb531c7d
2 changes: 1 addition & 1 deletion plugins/optimization-detective/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ async function compress( string ) {
* @param {boolean} args.isDebug - Whether to show debug messages.
* @param {string} args.restApiEndpoint - URL for where to send the detection data.
* @param {string} [args.restApiNonce] - Nonce for the REST API when the user is logged-in.
* @param {boolean} [args.gzdecodeAvailable] - Whether application/gzip can be sent to the REST API.
* @param {boolean} args.gzdecodeAvailable - Whether application/gzip can be sent to the REST API.
* @param {string} args.currentETag - Current ETag.
* @param {string} args.currentUrl - Current URL.
* @param {string} args.urlMetricSlug - Slug for URL Metric.
Expand Down
4 changes: 1 addition & 3 deletions plugins/optimization-detective/detection.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ static function ( OD_URL_Metric_Group $group ): array {
if ( is_user_logged_in() ) {
$detect_args['restApiNonce'] = wp_create_nonce( 'wp_rest' );
}
if ( function_exists( 'gzdecode' ) ) {
$detect_args['gzdecodeAvailable'] = true;
}
$detect_args['gzdecodeAvailable'] = function_exists( 'gzdecode' );
if ( WP_DEBUG ) {
$detect_args['urlMetricGroupCollection'] = $group_collection;
}
Expand Down
Loading