Problem/Motivation

Modernizr released 3.11.7 several weeks ago.

Proposed resolution

Update to the latest version.

Release notes snippet

Modernizr is updated to v3.11.7

Issue fork drupal-3185165

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

bfurner’s picture

This is an issue in version 8.9.x as well

vipin.mittal18’s picture

Assigned: Unassigned » vipin.mittal18
Status: Active » Needs work
vipin.mittal18’s picture

Status: Needs work » Needs review
StatusFileSize
new9.43 KB

Upgraded to modernizr@3.6.0 to support the browser features details-inputtypes-touchevents-addtest-prefixes-setclasses-teststyles. Refer attached patch for the solution.

catch’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Needs a re-roll.

suresh prabhu parkala’s picture

Status: Needs work » Needs review
StatusFileSize
new11.93 KB

Re-rolled patch.

Status: Needs review » Needs work

The last submitted patch, 6: 3185165-6.patch, failed testing. View results

ravi.shankar’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

#6 is green so it's ready for review.

spokje’s picture

Assigned: vipin.mittal18 » spokje
Status: Needs review » Needs work

Not quite sure what happened but in #4:

Upgraded to modernizr@3.6.0

Whilst the Issue Summary stated:

Modernizr released 3.11.4 earlier today.

Looking at the patch #6 it looks like it is actually downgrading Modernizr from the current 3.8.0 to 3.6.0.

--- a/core/assets/vendor/modernizr/modernizr.min.js
+++ b/core/assets/vendor/modernizr/modernizr.min.js
@@ -1,3 +1,3 @@
-/*! modernizr 3.8.0 (Custom Build) | MIT *
+/*! modernizr 3.6.0 (Custom Build) | MIT *

I also saw that the current latest release of Modernizr is 3.11.6

spokje’s picture

StatusFileSize
new14.33 KB

Hmmm,

Somehow no matter what version your trying to download through the URL https://modernizr.com/download/?-details-inputtypes-addtest-mq-prefixed-prefixes-setclasses-teststyles the header will always show the version number as:

/*! modernizr 3.6.0 (Custom Build) | MIT *

With hesitation I've manually updated the header to the version I've actually downloaded:

/*! modernizr 3.11.6 (Custom Build) | MIT *

Patch attached.
No interdiff, since they're kinda useless on one-line minified scripts.

spokje’s picture

Looking through some old issues on updating Modernizr, I stumbled over this comment:

I first tried to update it via the web tool from the link in the core file http://modernizr.com/download/?-details-inputtypes-touchevents-addtest-p...

This produces a 3.6.0 version for some reason.

Then followed the instructions here https://modernizr.com/docs
and used the same url above but downloaded the "Command Line Config" to build it locallly.

Following the instructions I did

sudo npm install -g npm
npm install -g modernizr
modernizr -c modernizr-config.json // This is the file I downloaded from http://modernizr.com/download

This produced a modernizr.js file that renamed to modernizr.min.js

I followed the above procedure and added a patch with the real 3.11.6

Since the procedure is easy to forget when the time comes for another Modernizr update, I've also added a README.md to core/assets/vendor/modernizr with the above procedure.

spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review
mherchel’s picture

Issue summary: View changes
spokje’s picture

Assigned: Unassigned » spokje
Status: Needs review » Needs work
spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review

Thanks for the heads-up @mherchel, latest MR code opdates modernizer from 3.8.0 => 3.11.7

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mherchel’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

  1. I followed the directions in the readme and verified they were accurate
  2. I compared my modernizr.min.js output with that of the patch (no differences).
  3. I logged in and checked to see that the CSS classes were still being added to the HTML element

RTBC!

spokje’s picture

Version: 9.3.x-dev » 9.2.x-dev

Putting this back to Version 9.2.x because I think a new Minor Release of Core deserves the latest and greatest included.

alexpott’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
Issue tags: +9.2.0 release notes

Committed and pushed 61a07efcc7 to 9.3.x and 6967b53c5d to 9.2.x. Thanks!

  • alexpott committed 61a07ef on 9.3.x
    Issue #3185165 by Spokje, vipin.mittal18, Suresh Prabhu Parkala, lauriii...

  • alexpott committed 6967b53 on 9.2.x
    Issue #3185165 by Spokje, vipin.mittal18, Suresh Prabhu Parkala, lauriii...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.