Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
We were using a Modernizr JS library v2.8.3 that was not published on NPM. Meaning we wouldn't be getting security vulnerability warnings if there would be some.
I'm updating the library to latest v 3.12.0 and loading it from NPM in this PR.
I was also going through all the modules we had in our custom Modernizr build and found only 2 that we actually use.
All the Modernizr checks we were loading:
All the Modernizr checks we are using:
Modernizr was a dependency of the Adminre UI that we are using as Mautic administration UI.
The
touch
/no-touch
classes were used but the check was renamed totouchevents
/no-touchevents
in v 3. See https://modernizr.com/news/modernizr-3-new-release-site. So I updated usages for those too.Modernizr must be custom-build so I added a
post-install
command topackage.json
that will build our custom Modernizr build according to themodernizr-config.json
config file. There is no extra step that needs to be taken. The build is done automatically during thenpm install
command and that is being called automatically during thecomposer install
command.Steps to test this PR:
composer install
bin/console mautic:assets:generate
<html>
tag has these classes:It can have more classes but these are the ones that we need.