Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #3539 Combine @import rules into the minified CSS files #3603

Merged
merged 19 commits into from
Feb 26, 2021

Conversation

engahmeds3ed
Copy link
Contributor

@engahmeds3ed engahmeds3ed commented Feb 17, 2021

Description

We added a layer to combine imported CSS files into the main minified/combined recursively.

Fixes #3539

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Is the solution different from the one proposed during the grooming?

I added only a small part to handle rewrite paths and combine imports resursively.

How Has This Been Tested?

  • Added new fixtures to be passed to unit/integration tests.
  • Create page template with CSS file that has multiple imports and one of those imports has another import with some image paths and check if those are imported Also add another import for external file and it shouldn't be imported.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@engahmeds3ed engahmeds3ed self-assigned this Feb 17, 2021
@engahmeds3ed engahmeds3ed added module: file optimization priority: high Issues which should be resolved as quickly as possible severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior labels Feb 17, 2021
@engahmeds3ed engahmeds3ed changed the title Fix/3539 import replace contents Combine @import rules into the minified CSS files Feb 17, 2021
@engahmeds3ed
Copy link
Contributor Author

engahmeds3ed commented Feb 18, 2021

I created new filter here to allow importing external css files and it's disabled be default, you can find it here

/**
* Filter Import external urls.
*
* @since 3.8.6
*
* @param bool Allow status.
* @param string $file File path/URL.
*/
if ( (bool) apply_filters( 'rocket_allow_import_externals', false, $file ) ) {

@engahmeds3ed engahmeds3ed marked this pull request as ready for review February 18, 2021 12:50
@engahmeds3ed engahmeds3ed requested a review from a team February 18, 2021 12:50
@remyperona remyperona added this to the 3.8.6 milestone Feb 18, 2021
@piotrbak
Copy link
Contributor

@GeekPress @Tabrisrp Just a quick confirmation, we're all aligned that this kind of situation might break the layout, right?
@import internal.css
@import external.css

After the minification, internal.css rules will be below the external.css ones.

@GeekPress
Copy link
Contributor

@piotrbak Yes we are aligned on that

@engahmeds3ed
Copy link
Contributor Author

@wp-media/qa Ready for QA

@piotrbak
Copy link
Contributor

@engahmeds3ed @Tabrisrp
For now, the import of the rules worked only for the absolute, internal path (4th point):
@import url('https://rocketlabsqa.ovh/wp-content/rocket-test-data/styles/import-css-fourth.css');

Tested scenarios:

  1. @import url('import-css-third.css');
    Regular relative
  2. @import url('import-css-second.min.css');
    Relative with .min.css
  3. @import url('https://rocketlabsqa.ovh/wp-content/rocket-test-data/styles/import-css-fourth.css');
    Absolute internal
  4. @import url("import-css-fifth.css");
    Inside import-css-fifth.css there's another import inside, used " instead of '
  5. @import url('../../../wp-includes/css/dashicons.min.css');
    Relative path with ../../
  6. @import url("https://www.w3schools.com/w3css/4/w3.css?ver=5.5.3");
    External path, used with the filter
  7. @import url('import-css-eight.css?ver=1.2.3');
    Regular relative with query string
  8. @import url("https://rocketlabsqa.dev/something.css");
    Stylesheet loading text/html instead of text/css
  9. @import "import-css-ninth.css";
    Relative without url
  10. @import url(import-css-tenth.css);
    Relative without " nor '
  11. @import "import-css-eleventh.css" print;
    Relative without url with print
  12. @import "import-css-twelfth.css" screen and (max-width: 10768px);
    Relative without url with media

Do you already know that we shouldn't cover any of the above scenarios? They're going to be tested on various of envs.

@remyperona
Copy link
Contributor

@piotrbak

  1. Yes it's fine, it's still an improvement as it will reduce HTTP requests, and minification will be applied on everything
  2. I'm thinking we can start with a filter, and we'll see if we need to also enable it in the UI if we have requests for that (@engahmeds3ed)

@engahmeds3ed
Copy link
Contributor Author

@Tabrisrp @piotrbak

Ok I will remove now the external filter and try to check the exclusion filter and verify if it's working or not and why.

@engahmeds3ed
Copy link
Contributor Author

@piotrbak I removed external filter and also removed query strings from the css files to get contents properly and it works fine for me (please validate)

for the exclusion:

add_filter( 'rocket_skip_import_replacement', function( $skipped, $match_path ){
   if ( strstr( $match_path, 'file2.css' ) ) {
       return true;
    }
   return $skipped;
}, 10, 2 );

This code is working with me and I think I know why it wasn't working with u

Because this filter applies after moving relative paths to the new structure like
file2.css
is converted to
../../../../../css/file2.css
so we need to search with this path OR use regular expression to detect it.

so tomorrow morning I will adjust this code to accept array of files so support team would be able to use it.

@engahmeds3ed
Copy link
Contributor Author

@wp-media/qa ready for another round of testing.

@piotrbak
Copy link
Contributor

@engahmeds3ed Looks good on the single site, tomorrow I'm going to test on different environments + exclusions.

If I add .js file with @import, we're going to add the content of it to the css file. Shouldn't we make sure that the extension is .css?

@piotrbak
Copy link
Contributor

piotrbak commented Feb 25, 2021

@engahmeds3ed @Tabrisrp I tested on all our environments. The problem we're having now:

  • If we add @charset "UTF-8"; at the very top, the external rules (ones that are not fetched) will be added before the charset, which is not correct.
    image

It seems that the problem is also present on the trunk though:
image

To consider (that's an edge case, of course):

  • Not importing files different than .css. The behaviour I'm experiencing on the not cached page:
  1. This error in the JS console:
    Refused to apply style from '/wp-content/rocket-test-data/scripts/print-helloworld.js' because its MIME type ('application/javascript') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
  2. In the network tab it's canceled with 0 bytes downloaded:
    image

@engahmeds3ed
Copy link
Contributor Author

@piotrbak I think it's based on the content of the file, so in my case I created JS file with css contents inside it and I got this into netwrok tab

image

file1.css which is called into the page
image

file2.js which is imported into the previous file
image

@remyperona
Copy link
Contributor

If it's based on the mime type, we could do a check on that before importing?

Or if it's too complicated, we can just exclude any import that doesn't have the .css extension, as this is really what is expected in that context, and anything different is not normal.

@GeekPress
Copy link
Contributor

@piotrbak Have you ever see someone importing a .js into a CSS file? For which reason, a plugin/theme will do that?

I'm asking the question to know if we aren't trying to fox something which will never happen and/or a very rare case.

@piotrbak
Copy link
Contributor

@GeekPress That's rather an edge case, I'm trying to find as many possible faults as possible before customers will do.

I've brought this up for discussion since it's possible that we'll have different behavior with/without WP Rocket:

  1. Without, the import will fail and we'll not load the JS (based on this screenshot)
  2. With, we'll add the JS to our CSS and we'll load it

@GeekPress
Copy link
Contributor

GeekPress commented Feb 26, 2021

That's rather an edge case, I'm trying to find as many possible faults as possible before customers will do.

@piotrbak I understand. But we shouldn't complexify our code to fix a mistake a user can do.

In this specific case, I can't see why a JS file could be added by a plugin / theme / something else.

@GeekPress
Copy link
Contributor

From the definition of the @import:

The @import rule allows you to import a style sheet into another style sheet.

It clearly indicates that an @import is to import .css into another. How can a JavaScript file be used to import CSS rules?

@piotrbak
Copy link
Contributor

@GeekPress You're totally right about this, and this hypothetical situation would be an obvious mistake of the developer or customer. My only concern is that without WP Rocket, the browser will prevent from downloading this file, with WP Rocket we'll download it.

The other scenarios passed and we'll be ready to merge.

@engahmeds3ed
Copy link
Contributor Author

engahmeds3ed commented Feb 26, 2021

@Tabrisrp @piotrbak

firstly I used this WordPress function wp_check_filetype_and_ext that uses multiple ways to detect the file type and one of them is fileinfo module and when doing some tests I found the following bugs that may be in some servers (I found it also in my machine) which is mime-type not returns text/css and returns other unknown types.

https://forums.aws.amazon.com/thread.jspa?messageID=904363

so I used the WordPress function wp_check_filetype that checks the extension only.

@remyperona
Copy link
Contributor

We can move forward with that, it's enough to validate.

@engahmeds3ed
Copy link
Contributor Author

@piotrbak ready for QA

@piotrbak
Copy link
Contributor

@Tabrisrp We're good there. Ready to merge:
testrail-report-139.pdf

@remyperona remyperona changed the title Combine @import rules into the minified CSS files Closes #3539 Combine @import rules into the minified CSS files Feb 26, 2021
@remyperona remyperona merged commit e31ed4a into develop Feb 26, 2021
@remyperona remyperona deleted the fix/3539-import-replace-contents branch February 26, 2021 20:47
crystinutzaa added a commit that referenced this pull request Mar 4, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this pull request Mar 23, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this pull request Mar 23, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this pull request Mar 26, 2021
* Add Unit test Warmup/APIClient

* Add unit tests for Frontend APIClient

* Update comments with @uses for AbstractAPI coverage

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

* Exclude googleoptimize.com from minify/combine JS (PR #3609)

* Exclude www.idxhome.com from combine/defer JS (#3619)

* Exclude wcpv_registration_local from combine JS (PR #3634)

* Add additional inline JS exclusions from combine JS (PR #3638)

* Closes #2883 UI improvement for Never Cache URL placeholder (PR #3631)

* Bump elliptic from 6.5.3 to 6.5.4 (PR #3650)

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixes #3528 Add AMP query string to cached query strings when activating the plugin (PR #3613)

* Tiered Pricing Table for WooCommerce nonce action exclusion (PR #3652)

* Closes #2812 Add new filter to rewrite srcset to the CDN (PR #3648)

* Fixes #2041 CDN: prevent incorrect URL on srcset with duplicated relative URLS (PR #3615)

* Fixes #3114 Apply font-display:swap to CPCSS (PR #3633)

* Fixes #3073 Remove content from attributes list for WebP conversion (PR #3607)

* Fixes #3394 PHP notice in Update_Subscriber::disable_auto_updates() (PR #3632)

* update version to 3.8.7

* v3.8.6 (#3623)

* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>

* Fixes #3658 Force the PSR Container dependency to v1.0.0 (PR #3660)

* Add new inline JS exclusion from combine JS (PR #3683)

* Ignore Pinterest ads "pp" query string when serving the cache (PR #3682)

* Fix double space in renewal banner copy (PR #3674)

* Exclude reload_attached_coupons from combine JS (PR #3671)

* Exclude arf_footer_cl_logic_call from combine JS (PR #3665)

* Fix rest API tests fixtures (PR #3688)

* add details attribute to error data
* remove details attribute from error data and use assertArraySubset to make sure that needed attributes are there
* adjust the GH workflow to use WP 5.7
* adjust the GH workflow to use latest WP version always for non legacy

* Exclude nonce actions for Discount Rules and Dynamic Pricing for WooCommerce (PR #3679)

* update fixtures after typo fix

* Closes #3230 Add PHP 8 to our CI matrix (PR #3656)

* add PHP 8 to our CI matrix
* update composer configuration
* update phpstan-wp dependency version
* update phpunit package version
* update workflows
* only bailout if the provided structure is not empty
* update return typehint for setUp() and setUpBeforeClass()
* use Mockery for mocks instead of phpunit mocks
* remove separate process

* update version to 3.9-alpha1

* v3.8.6 (#3623)

* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>

* Add integration test for Warmup\APIClient

* Adjust Warmup\APIClient fixture

* Adjust Warmup\APIClient unit test w/new fixture

* Add integration test Frontend\APIClient

* Modify Frontend\APIClient fixture for new test.

* Fix warmup APIClient fixture WPError case

* Add remaining testcases for Frontend APIClient

* Use actual returmed error codes in APIClients

* Refactor check_response()

* Refactor Unit tests for new Fixture

* Clean up fixture

* Refactor Warmup API Unit test for check_response()

* Restore odd removals

* Don’t alias Brain\Monkey\Functions

Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Adame Dahmani <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Scott Hartley <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Presskopp <[email protected]>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
Co-authored-by: Cristina Soponar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: file optimization needs: qa priority: high Issues which should be resolved as quickly as possible severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@import rules aren't combined into the minified CSS files
4 participants