Skip to content

Commit

Permalink
Updated libraries via composer
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Aug 20, 2022
1 parent 21fb269 commit 3559932
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 26 deletions.
12 changes: 6 additions & 6 deletions system/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion system/vendor/bin/minifycss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
}
}

if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss');
exit(0);
}
Expand Down
2 changes: 1 addition & 1 deletion system/vendor/bin/minifycss.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/minifycss
SET COMPOSER_BIN_DIR=%~dp0
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %*
5 changes: 4 additions & 1 deletion system/vendor/bin/minifyjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ if (PHP_VERSION_ID < 80000) {
}
}

if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs');
exit(0);
}
Expand Down
2 changes: 1 addition & 1 deletion system/vendor/bin/minifyjs.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/minifyjs
SET COMPOSER_BIN_DIR=%~dp0
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %*
14 changes: 7 additions & 7 deletions system/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,17 @@
},
{
"name": "matthiasmullie/minify",
"version": "1.3.68",
"version_normalized": "1.3.68.0",
"version": "1.3.69",
"version_normalized": "1.3.69.0",
"source": {
"type": "git",
"url": "https://github.com/matthiasmullie/minify.git",
"reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297"
"reference": "a61c949cccd086808063611ef9698eabe42ef22f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297",
"reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297",
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a61c949cccd086808063611ef9698eabe42ef22f",
"reference": "a61c949cccd086808063611ef9698eabe42ef22f",
"shasum": ""
},
"require": {
Expand All @@ -346,7 +346,7 @@
"suggest": {
"psr/cache-implementation": "Cache implementation to use with Minify::cache"
},
"time": "2022-04-19T08:28:56+00:00",
"time": "2022-08-01T09:00:18+00:00",
"bin": [
"bin/minifycss",
"bin/minifyjs"
Expand Down Expand Up @@ -381,7 +381,7 @@
],
"support": {
"issues": "https://github.com/matthiasmullie/minify/issues",
"source": "https://github.com/matthiasmullie/minify/tree/1.3.68"
"source": "https://github.com/matthiasmullie/minify/tree/1.3.69"
},
"funding": [
{
Expand Down
10 changes: 5 additions & 5 deletions system/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'e721c1c354af869b8f222a5e04b65e74ee37ab20',
'reference' => '21fb269482f752267b2f22107577a0506e8b0e0b',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'e721c1c354af869b8f222a5e04b65e74ee37ab20',
'reference' => '21fb269482f752267b2f22107577a0506e8b0e0b',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -74,9 +74,9 @@
'dev_requirement' => false,
),
'matthiasmullie/minify' => array(
'pretty_version' => '1.3.68',
'version' => '1.3.68.0',
'reference' => 'c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297',
'pretty_version' => '1.3.69',
'version' => '1.3.69.0',
'reference' => 'a61c949cccd086808063611ef9698eabe42ef22f',
'type' => 'library',
'install_path' => __DIR__ . '/../matthiasmullie/minify',
'aliases' => array(),
Expand Down
5 changes: 3 additions & 2 deletions system/vendor/matthiasmullie/minify/src/CSS.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ protected function extractMath()
// and since we've captured more code than required, we may have some leftover
// calc() in here too - go recursive on the remaining but of code to go figure
// that out and extract what is needed
$rest = str_replace($function.$expr, '', $match[0]);
$rest = $minifier->str_replace_first($function.$expr, '', $match[0]);
$rest = preg_replace_callback($pattern, $callback, $rest);

return $placeholder.$rest;
Expand All @@ -740,7 +740,8 @@ protected function extractCustomProperties()
// PHP only supports $this inside anonymous functions since 5.4
$minifier = $this;
$this->registerPattern(
'/(?<=^|[;}])\s*(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m',

'/(?<=^|[;}{])\s*(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m',
function ($match) use ($minifier) {
$placeholder = '--custom-'. count($minifier->extracted) . ':0';
$minifier->extracted[$placeholder] = $match[1] .':'. trim($match[2]);
Expand Down
4 changes: 2 additions & 2 deletions system/vendor/matthiasmullie/minify/src/JS.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected function extractRegex()
// of the RegExp methods (a `\` followed by a variable or value is
// likely part of a division, not a regex)
$keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return', 'typeof');
$before = '(^|[=:,;\+\-\*\/\}\(\{\[&\|!]|'.implode('|', $keywords).')\s*';
$before = '(^|[=:,;\+\-\*\?\/\}\(\{\[&\|!]|'.implode('|', $keywords).')\s*';
$propertiesAndMethods = array(
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Properties_2
'constructor',
Expand All @@ -284,7 +284,7 @@ protected function extractRegex()
);
$delimiters = array_fill(0, count($propertiesAndMethods), '/');
$propertiesAndMethods = array_map('preg_quote', $propertiesAndMethods, $delimiters);
$after = '(?=\s*([\.,;\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).')))';
$after = '(?=\s*([\.,;:\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).')))';
$this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback);

// regular expressions following a `)` are rather annoying to detect...
Expand Down
8 changes: 8 additions & 0 deletions system/vendor/matthiasmullie/minify/src/Minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,4 +494,12 @@ protected function writeToFile($handler, $content, $path = '')
throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.');
}
}

protected static function str_replace_first($search, $replace, $subject) {
$pos = strpos($subject, $search);
if ($pos !== false) {
return substr_replace($subject, $replace, $pos, strlen($search));
}
return $subject;
}
}

0 comments on commit 3559932

Please sign in to comment.