From 01aad2917546bbdae539e6bb9a5d7145ad20afa8 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 08:47:09 +0200 Subject: [PATCH 1/8] Update composer dependencies --- composer.json | 4 +- composer.lock | 26 ++-- .../simpleimage/src/claviska/SimpleImage.php | 127 ++++++++++++------ vendor/composer/autoload_classmap.php | 3 - vendor/composer/autoload_static.php | 3 - vendor/composer/installed.json | 28 ++-- vendor/composer/installed.php | 12 +- .../phpmailer/language/phpmailer.lang-el.php | 41 +++--- vendor/phpmailer/phpmailer/src/PHPMailer.php | 20 ++- vendor/phpmailer/phpmailer/src/POP3.php | 2 +- vendor/phpmailer/phpmailer/src/SMTP.php | 2 +- 11 files changed, 158 insertions(+), 110 deletions(-) diff --git a/composer.json b/composer.json index c662bfcc39..0090ec5ba4 100644 --- a/composer.json +++ b/composer.json @@ -36,12 +36,12 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-openssl": "*", - "claviska/simpleimage": "3.6.5", + "claviska/simpleimage": "3.7.0", "filp/whoops": "2.14.5", "getkirby/composer-installer": "^1.2.1", "laminas/laminas-escaper": "2.10.0", "michelf/php-smartypants": "1.8.1", - "phpmailer/phpmailer": "6.6.3", + "phpmailer/phpmailer": "6.6.4", "symfony/polyfill-intl-idn": "1.26.0", "symfony/polyfill-mbstring": "1.26.0" }, diff --git a/composer.lock b/composer.lock index cbb1d18539..216f25b2db 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6bfdbfb7a38bb3e59ed5ce26db82cbb7", + "content-hash": "3f4901f654f1928d0af12eec7269b647", "packages": [ { "name": "claviska/simpleimage", - "version": "3.6.5", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "00f90662686696b9b7157dbb176183aabe89700f" + "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/00f90662686696b9b7157dbb176183aabe89700f", - "reference": "00f90662686696b9b7157dbb176183aabe89700f", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/abd15ced313c7b8041d7d73d8d2398b4f2510cf1", + "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1", "shasum": "" }, "require": { @@ -45,7 +45,7 @@ "description": "A PHP class that makes working with images as simple as possible.", "support": { "issues": "https://github.com/claviska/SimpleImage/issues", - "source": "https://github.com/claviska/SimpleImage/tree/3.6.5" + "source": "https://github.com/claviska/SimpleImage/tree/3.7.0" }, "funding": [ { @@ -53,7 +53,7 @@ "type": "github" } ], - "time": "2021-12-01T12:42:55+00:00" + "time": "2022-07-05T13:18:44+00:00" }, { "name": "filp/whoops", @@ -349,16 +349,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.6.3", + "version": "v6.6.4", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "9400f305a898f194caff5521f64e5dfa926626f3" + "reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3", - "reference": "9400f305a898f194caff5521f64e5dfa926626f3", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a94fdebaea6bd17f51be0c2373ab80d3d681269b", + "reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b", "shasum": "" }, "require": { @@ -415,7 +415,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.4" }, "funding": [ { @@ -423,7 +423,7 @@ "type": "github" } ], - "time": "2022-06-20T09:21:02+00:00" + "time": "2022-08-22T09:22:00+00:00" }, { "name": "psr/log", diff --git a/vendor/claviska/simpleimage/src/claviska/SimpleImage.php b/vendor/claviska/simpleimage/src/claviska/SimpleImage.php index 2f9ca4a76e..51e567338d 100644 --- a/vendor/claviska/simpleimage/src/claviska/SimpleImage.php +++ b/vendor/claviska/simpleimage/src/claviska/SimpleImage.php @@ -31,7 +31,8 @@ class SimpleImage { ERR_LIB_NOT_LOADED = 8, ERR_UNSUPPORTED_FORMAT = 9, ERR_WEBP_NOT_ENABLED = 10, - ERR_WRITE = 11; + ERR_WRITE = 11, + ERR_INVALID_FLAG = 12; protected $image; @@ -46,9 +47,10 @@ class SimpleImage { * Creates a new SimpleImage object. * * @param string $image An image file or a data URI to load. + * @param array $flags Optional override of default flags. * @throws \Exception Thrown if the GD library is not found; file|URI or image data is invalid. */ - public function __construct($image = '') { + public function __construct($image = '', $flags = []) { // Check for the required GD extension if(extension_loaded('gd')) { // Ignore JPEG warnings that cause imagecreatefromjpeg() to fail @@ -57,6 +59,16 @@ public function __construct($image = '') { throw new \Exception('Required extension GD is not loaded.', self::ERR_GD_NOT_ENABLED); } + // Associative array of flags. + $this->flags = [ + "sslVerify" => true // Skip SSL peer validation + ]; + + // Override default flag values. + foreach($flags as $flag => $value) { + $this->setFlag($flag, $value); + } + // Load an image through the constructor if(preg_match('/^data:(.*?);/', $image)) { $this->fromDataUri($image); @@ -77,6 +89,37 @@ public function __destruct() { } } + ////////////////////////////////////////////////////////////////////////////////////////////////// + // Helper functions + ////////////////////////////////////////////////////////////////////////////////////////////////// + + /** + * Set flag value. + * + * @param string $flag Name of the flag to set. + * @param boolean $value State of the flag. + * @throws \Exception Thrown if flag does not exist (no default value). + */ + public function setFlag($flag, $value) { + // Throw if flag does not exist + if(!in_array($flag, array_keys($this->flags))) { + throw new \Exception('Invalid flag.', self::ERR_INVALID_FLAG); + } + + // Set flag value by name + $this->flags[$flag] = $value; + } + + /** + * Get flag value. + * + * @param string $flag Name of the flag to get. + * @return boolean|null + */ + public function getFlag($flag) { + return in_array($flag, array_keys($this->flags)) ? $this->flags[$flag] : null; + } + ////////////////////////////////////////////////////////////////////////////////////////////////// // Loaders ////////////////////////////////////////////////////////////////////////////////////////////////// @@ -118,70 +161,66 @@ public function fromDataUri($uri) { * Loads an image from a file. * * @param string $file The image file to load. + * @param boolean $sslVerify Set to false to skip SSL validation. * @throws \Exception Thrown if file or image data is invalid. * @return \claviska\SimpleImage */ public function fromFile($file) { - // Check if the file exists and is readable. We're using fopen() instead of file_exists() - // because not all URL wrappers support the latter. - $handle = @fopen($file, 'r'); - if($handle === false) { + // Set fopen options. + $sslVerify = $this->getFlag("sslVerify"); // Don't perform peer validation when true + $opts = [ + "ssl" => [ + "verify_peer" => $sslVerify, + "verify_peer_name" => $sslVerify + ] + ]; + + // Check if the file exists and is readable. + $file = @file_get_contents($file, false, stream_context_create($opts)); + if($file === false) { throw new \Exception("File not found: $file", self::ERR_FILE_NOT_FOUND); } - fclose($handle); + + // Create image object from string + $this->image = imagecreatefromstring($file); // Get image info - $info = @getimagesize($file); + $info = @getimagesizefromstring($file); if($info === false) { throw new \Exception("Invalid image file: $file", self::ERR_INVALID_IMAGE); } $this->mimeType = $info['mime']; - // Create image object from file + if(!$this->image) { + throw new \Exception("Unsupported format: " . $this->mimeType, self::ERR_UNSUPPORTED_FORMAT); + } + switch($this->mimeType) { - case 'image/gif': - // Load the gif - $gif = imagecreatefromgif($file); - if($gif) { + case 'image/gif': // Copy the gif over to a true color image to preserve its transparency. This is a - // workaround to prevent imagepalettetruecolor() from borking transparency. - $width = imagesx($gif); - $height = imagesy($gif); - $this->image = imagecreatetruecolor((int) $width, (int) $height); - $transparentColor = imagecolorallocatealpha($this->image, 0, 0, 0, 127); - imagecolortransparent($this->image, $transparentColor); - imagefill($this->image, 0, 0, $transparentColor); + // workaround to prevent imagepalettetotruecolor() from borking transparency. + $width = imagesx($this->image); + $height = imagesx($this->image); + + $gif = imagecreatetruecolor((int) $width, (int) $height); + $alpha = imagecolorallocatealpha($gif, 0, 0, 0, 127); + imagecolortransparent($gif, $alpha); + imagefill($gif, 0, 0, $alpha); + imagecopy($this->image, $gif, 0, 0, 0, 0, $width, $height); imagedestroy($gif); - } - break; - case 'image/jpeg': - $this->image = imagecreatefromjpeg($file); - break; - case 'image/png': - $this->image = imagecreatefrompng($file); - break; - case 'image/webp': - $this->image = imagecreatefromwebp($file); - break; - case 'image/bmp': - case 'image/x-ms-bmp': - case 'image/x-windows-bmp': - $this->image = imagecreatefrombmp($file); - break; - } - if(!$this->image) { - throw new \Exception("Unsupported format: " . $this->mimeType, self::ERR_UNSUPPORTED_FORMAT); + break; + case 'image/jpeg': + // Load exif data from JPEG images + if(function_exists('exif_read_data')) { + $this->exif = @exif_read_data("data://image/jpeg;base64," . base64_encode($file)); + } + break; } // Convert pallete images to true color images imagepalettetotruecolor($this->image); - // Load exif data from JPEG images - if($this->mimeType === 'image/jpeg' && function_exists('exif_read_data')) { - $this->exif = @exif_read_data($file); - } - return $this; } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a939973d7e..d256b645fc 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -285,9 +285,6 @@ 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', 'Spyc' => $baseDir . '/dependencies/spyc/Spyc.php', 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php', 'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index fddc071b43..e662a2e988 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -377,9 +377,6 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', - 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', 'Spyc' => __DIR__ . '/../..' . '/dependencies/spyc/Spyc.php', 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php', 'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 60e141ee83..153a578246 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "claviska/simpleimage", - "version": "3.6.5", - "version_normalized": "3.6.5.0", + "version": "3.7.0", + "version_normalized": "3.7.0.0", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "00f90662686696b9b7157dbb176183aabe89700f" + "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/00f90662686696b9b7157dbb176183aabe89700f", - "reference": "00f90662686696b9b7157dbb176183aabe89700f", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/abd15ced313c7b8041d7d73d8d2398b4f2510cf1", + "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1", "shasum": "" }, "require": { @@ -20,7 +20,7 @@ "league/color-extractor": "0.3.*", "php": ">=5.6.0" }, - "time": "2021-12-01T12:42:55+00:00", + "time": "2022-07-05T13:18:44+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -42,7 +42,7 @@ "description": "A PHP class that makes working with images as simple as possible.", "support": { "issues": "https://github.com/claviska/SimpleImage/issues", - "source": "https://github.com/claviska/SimpleImage/tree/3.6.5" + "source": "https://github.com/claviska/SimpleImage/tree/3.7.0" }, "funding": [ { @@ -361,17 +361,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.6.3", - "version_normalized": "6.6.3.0", + "version": "v6.6.4", + "version_normalized": "6.6.4.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "9400f305a898f194caff5521f64e5dfa926626f3" + "reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3", - "reference": "9400f305a898f194caff5521f64e5dfa926626f3", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a94fdebaea6bd17f51be0c2373ab80d3d681269b", + "reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b", "shasum": "" }, "require": { @@ -398,7 +398,7 @@ "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, - "time": "2022-06-20T09:21:02+00:00", + "time": "2022-08-22T09:22:00+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -430,7 +430,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.4" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 7e08f02fb7..fa842c47ac 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -11,9 +11,9 @@ ), 'versions' => array( 'claviska/simpleimage' => array( - 'pretty_version' => '3.6.5', - 'version' => '3.6.5.0', - 'reference' => '00f90662686696b9b7157dbb176183aabe89700f', + 'pretty_version' => '3.7.0', + 'version' => '3.7.0.0', + 'reference' => 'abd15ced313c7b8041d7d73d8d2398b4f2510cf1', 'type' => 'library', 'install_path' => __DIR__ . '/../claviska/simpleimage', 'aliases' => array(), @@ -80,9 +80,9 @@ 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.6.3', - 'version' => '6.6.3.0', - 'reference' => '9400f305a898f194caff5521f64e5dfa926626f3', + 'pretty_version' => 'v6.6.4', + 'version' => '6.6.4.0', + 'reference' => 'a94fdebaea6bd17f51be0c2373ab80d3d681269b', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php index b3d5ca94bd..339ee5753b 100644 --- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php @@ -5,22 +5,29 @@ * @package PHPMailer */ -$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).'; -$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.'; -$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .'; -$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: '; -$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: '; -$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: '; -$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: '; -$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: '; -$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.'; -$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: '; +$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.'; +$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.'; +$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.'; +$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.'; +$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: '; +$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: '; +$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: '; +$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: '; +$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: '; +$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: '; +$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: '; +$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή'; +$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: '; +$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.'; -$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: '; +$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.'; +$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: '; $PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.'; -$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: '; -$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: '; -//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; +$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.'; +$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: '; +$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: '; diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php index 6590a0ef36..62424545a2 100644 --- a/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -350,8 +350,8 @@ class PHPMailer public $Password = ''; /** - * SMTP auth type. - * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2. + * If not specified, the first one from that list that the server supports will be selected. * * @var string */ @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.6.3'; + const VERSION = '6.6.4'; /** * Error severity: message only, continue processing. @@ -1096,7 +1096,7 @@ protected function addOrEnqueueAnAddress($kind, $address, $name) return false; } - if ($name !== null) { + if ($name !== null && is_string($name)) { $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim } else { $name = ''; @@ -1288,7 +1288,7 @@ public static function parseAddresses($addrstr, $useimap = true, $charset = self */ public function setFrom($address, $name = '', $auto = true) { - $address = trim($address); + $address = trim((string)$address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim //Don't validate now addresses with IDN. Will be done in send(). $pos = strrpos($address, '@'); @@ -1891,7 +1891,14 @@ protected function mailSend($header, $body) foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } - $to = implode(', ', $toArr); + $to = trim(implode(', ', $toArr)); + + //If there are no To-addresses (e.g. when sending only to BCC-addresses) + //the following should be added to get a correct DKIM-signature. + //Compare with $this->preSend() + if ($to === '') { + $to = 'undisclosed-recipients:;'; + } $params = null; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver @@ -4470,6 +4477,7 @@ public static function _mime_types($ext = '') 'ics' => 'text/calendar', 'xml' => 'text/xml', 'xsl' => 'text/xml', + 'csv' => 'text/csv', 'wmv' => 'video/x-ms-wmv', 'mpeg' => 'video/mpeg', 'mpe' => 'video/mpeg', diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php index a7cc391122..78e91e49a7 100644 --- a/vendor/phpmailer/phpmailer/src/POP3.php +++ b/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.6.3'; + const VERSION = '6.6.4'; /** * Default POP3 port number. diff --git a/vendor/phpmailer/phpmailer/src/SMTP.php b/vendor/phpmailer/phpmailer/src/SMTP.php index c439a888ba..cc1711d2e2 100644 --- a/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.6.3'; + const VERSION = '6.6.4'; /** * SMTP line break constant. From c6e38bb671efd5347f2bb377895a698e4b54d921 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 08:54:27 +0200 Subject: [PATCH 2/8] Upgrade npm dependencies --- panel/package-lock.json | 420 ++++++++++++++++++++-------------------- panel/package.json | 22 +-- 2 files changed, 225 insertions(+), 217 deletions(-) diff --git a/panel/package-lock.json b/panel/package-lock.json index 5fd41e8a39..6263eef895 100644 --- a/panel/package-lock.json +++ b/panel/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "@linusborg/vue-simple-portal": "^0.1.5", "autosize": "^5.0.1", - "dayjs": "^1.11.4", + "dayjs": "^1.11.5", "mitt": "^3.0.0", "prosemirror-commands": "^1.3.0", "prosemirror-history": "^1.3.0", @@ -17,32 +17,32 @@ "prosemirror-model": "^1.18.1", "prosemirror-schema-list": "^1.2.1", "prosemirror-view": "^1.27.0", - "vue": "^2.7.8", + "vue": "^2.7.10", "vuedraggable": "^2.24.3", "vuelidate": "^0.7.7", "vuex": "^3.6.2" }, "devDependencies": { "@vitejs/plugin-vue2": "^1.1.2", - "@vitest/ui": "^0.21.1", + "@vitest/ui": "^0.22.1", "@vue/test-utils": "^1.3.0", "autoprefixer": "^10.4.8", "c8": "^7.12.0", - "cypress": "^10.4.0", - "eslint": "^8.21.0", + "cypress": "^10.6.0", + "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^9.3.0", - "jsdom": "^19.0.0", + "eslint-plugin-vue": "^9.4.0", + "jsdom": "^20.0.0", "postcss-csso": "^6.0.1", "postcss-dir-pseudo-class": "^6.0.5", "postcss-logical": "^5.0.4", "prettier": "^2.7.1", - "terser": "^5.14.2", - "vite": "^3.0.6", - "vitest": "^0.21.1", + "terser": "^5.15.0", + "vite": "^3.0.9", + "vitest": "^0.22.1", "vue-docgen-api": "^4.52.0", - "vue-template-compiler": "^2.7.8" + "vue-template-compiler": "^2.7.10" } }, "node_modules/@babel/helper-string-parser": { @@ -153,14 +153,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -170,6 +170,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@humanwhocodes/config-array": { @@ -196,6 +199,19 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -393,9 +409,9 @@ } }, "node_modules/@vitest/ui": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.21.1.tgz", - "integrity": "sha512-e+AZdMG6NvrYhxB99LGxW1GkoTpqSDPKpL+wghsApWhocNwALBOBzvgsDr/WN6D6YWRXf18rsJ1kY/KaIspRdg==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.22.1.tgz", + "integrity": "sha512-iiM2JN+vzY8pEejUbPPi0EgkEselI3RvrgMPNUOalxQRgtlNVGyMsM0Re99xQsrZ/eBkHgWrlW216gNDoeD5cA==", "dev": true, "dependencies": { "sirv": "^2.0.2" @@ -1422,9 +1438,9 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "node_modules/cypress": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.4.0.tgz", - "integrity": "sha512-OM7F8MRE01SHQRVVzunid1ZK1m90XTxYnl+7uZfIrB4CYqUDCrZEeSyCXzIbsS6qcaijVCAhqDL60SxG8N6hew==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz", + "integrity": "sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -1504,23 +1520,10 @@ "node": ">=12" } }, - "node_modules/data-urls/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/dayjs": { - "version": "1.11.4", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.4.tgz", - "integrity": "sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", + "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" }, "node_modules/de-indent": { "version": "1.0.2", @@ -1699,6 +1702,18 @@ "node": ">=8.6" } }, + "node_modules/entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/esbuild": { "version": "0.14.48", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.48.tgz", @@ -1845,14 +1860,15 @@ } }, "node_modules/eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", + "@eslint/eslintrc": "^1.3.1", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1862,7 +1878,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1887,8 +1903,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -1934,9 +1949,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.3.0.tgz", - "integrity": "sha512-iscKKkBZgm6fGZwFt6poRoWC0Wy2dQOlwUPW++CiPoQiw1enctV2Hj5DBzzjJZfyqs+FAXhgzL4q0Ww03AgSmQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.4.0.tgz", + "integrity": "sha512-Nzz2QIJ8FG+rtJaqT/7/ru5ie2XgT9KCudkbN0y3uFYhQ41nuHEaboLAiqwMcK006hZPQv/rVMRhUIwEGhIvfQ==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", @@ -2004,9 +2019,9 @@ } }, "node_modules/espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -2525,9 +2540,9 @@ } }, "node_modules/globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3093,28 +3108,28 @@ "dev": true }, "node_modules/jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "dev": true, "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -3122,12 +3137,12 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -3748,10 +3763,16 @@ } }, "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "dependencies": { + "entities": "^4.3.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } }, "node_modules/path-exists": { "version": "4.0.0", @@ -4475,15 +4496,15 @@ "dev": true }, "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/semver": { @@ -4732,9 +4753,9 @@ "dev": true }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", + "integrity": "sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", @@ -4797,9 +4818,9 @@ } }, "node_modules/tinyspy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.0.tgz", - "integrity": "sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", "dev": true, "engines": { "node": ">=14.0.0" @@ -5009,12 +5030,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8-to-istanbul": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", @@ -5044,9 +5059,9 @@ } }, "node_modules/vite": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.6.tgz", - "integrity": "sha512-pjfsWIzfUlQME/VAmU6SsjdHkTt6WAHysuqPkHDcjzNu6IGtxDSZ/VfRYOwHaCqX4M3Ivz0kxuSfAPM6gAIX+w==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz", + "integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==", "dev": true, "dependencies": { "esbuild": "^0.14.47", @@ -5085,9 +5100,9 @@ } }, "node_modules/vitest": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.21.1.tgz", - "integrity": "sha512-WBIxuFmIDPuK47GO6Lu9eNeRMqHj/FWL3dk73OHH3eyPPWPiu+UB3QHLkLK2PEggCqJW4FaWoWg8R68S7p9+9Q==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.22.1.tgz", + "integrity": "sha512-+x28YTnSLth4KbXg7MCzoDAzPJlJex7YgiZbUh6YLp0/4PqVZ7q7/zyfdL0OaPtKTpNiQFPpMC8Y2MSzk8F7dw==", "dev": true, "dependencies": { "@types/chai": "^4.3.3", @@ -5097,7 +5112,7 @@ "debug": "^4.3.4", "local-pkg": "^0.4.2", "tinypool": "^0.2.4", - "tinyspy": "^1.0.0", + "tinyspy": "^1.0.2", "vite": "^2.9.12 || ^3.0.0-0" }, "bin": { @@ -5113,7 +5128,6 @@ "@edge-runtime/vm": "*", "@vitest/browser": "*", "@vitest/ui": "*", - "c8": "*", "happy-dom": "*", "jsdom": "*" }, @@ -5127,9 +5141,6 @@ "@vitest/ui": { "optional": true }, - "c8": { - "optional": true - }, "happy-dom": { "optional": true }, @@ -5148,11 +5159,11 @@ } }, "node_modules/vue": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.8.tgz", - "integrity": "sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.10.tgz", + "integrity": "sha512-HmFC70qarSHPXcKtW8U8fgIkF6JGvjEmDiVInTkKZP0gIlEPhlVlcJJLkdGIDiNkIeA2zJPQTWJUI4iWe+AVfg==", "dependencies": { - "@vue/compiler-sfc": "2.7.8", + "@vue/compiler-sfc": "2.7.10", "csstype": "^3.1.0" } }, @@ -5215,9 +5226,9 @@ } }, "node_modules/vue-template-compiler": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.8.tgz", - "integrity": "sha512-eQqdcUpJKJpBRPDdxCNsqUoT0edNvdt1jFjtVnVS/LPPmr0BU2jWzXlrf6BVMeODtdLewB3j8j3WjNiB+V+giw==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.10.tgz", + "integrity": "sha512-QO+8R9YRq1Gudm8ZMdo/lImZLJVUIAM8c07Vp84ojdDAf8HmPJc7XB556PcXV218k2AkKznsRz6xB5uOjAC4EQ==", "dev": true, "dependencies": { "de-indent": "^1.0.2", @@ -5225,9 +5236,9 @@ } }, "node_modules/vue/node_modules/@vue/compiler-sfc": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz", - "integrity": "sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.10.tgz", + "integrity": "sha512-55Shns6WPxlYsz4WX7q9ZJBL77sKE1ZAYNYStLs6GbhIOMrNtjMvzcob6gu3cGlfpCR4bT7NXgyJ3tly2+Hx8Q==", "dependencies": { "@babel/parser": "^7.18.4", "postcss": "^8.4.14", @@ -5316,9 +5327,9 @@ } }, "node_modules/whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "dependencies": { "tr46": "^3.0.0", @@ -5391,9 +5402,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz", - "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "engines": { "node": ">=10.0.0" @@ -5581,14 +5592,14 @@ } }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -5614,6 +5625,12 @@ "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", "dev": true }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -5780,9 +5797,9 @@ "requires": {} }, "@vitest/ui": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.21.1.tgz", - "integrity": "sha512-e+AZdMG6NvrYhxB99LGxW1GkoTpqSDPKpL+wghsApWhocNwALBOBzvgsDr/WN6D6YWRXf18rsJ1kY/KaIspRdg==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.22.1.tgz", + "integrity": "sha512-iiM2JN+vzY8pEejUbPPi0EgkEselI3RvrgMPNUOalxQRgtlNVGyMsM0Re99xQsrZ/eBkHgWrlW216gNDoeD5cA==", "dev": true, "requires": { "sirv": "^2.0.2" @@ -6568,9 +6585,9 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "cypress": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.4.0.tgz", - "integrity": "sha512-OM7F8MRE01SHQRVVzunid1ZK1m90XTxYnl+7uZfIrB4CYqUDCrZEeSyCXzIbsS6qcaijVCAhqDL60SxG8N6hew==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz", + "integrity": "sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -6635,24 +6652,12 @@ "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "requires": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - } - } } }, "dayjs": { - "version": "1.11.4", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.4.tgz", - "integrity": "sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g==" + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz", + "integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==" }, "de-indent": { "version": "1.0.2", @@ -6801,6 +6806,12 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", + "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "dev": true + }, "esbuild": { "version": "0.14.48", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.48.tgz", @@ -6903,14 +6914,15 @@ } }, "eslint": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz", - "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", + "@eslint/eslintrc": "^1.3.1", "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -6920,7 +6932,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.3", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -6945,8 +6957,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" } }, "eslint-config-prettier": { @@ -6974,9 +6985,9 @@ } }, "eslint-plugin-vue": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.3.0.tgz", - "integrity": "sha512-iscKKkBZgm6fGZwFt6poRoWC0Wy2dQOlwUPW++CiPoQiw1enctV2Hj5DBzzjJZfyqs+FAXhgzL4q0Ww03AgSmQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.4.0.tgz", + "integrity": "sha512-Nzz2QIJ8FG+rtJaqT/7/ru5ie2XgT9KCudkbN0y3uFYhQ41nuHEaboLAiqwMcK006hZPQv/rVMRhUIwEGhIvfQ==", "dev": true, "requires": { "eslint-utils": "^3.0.0", @@ -7022,9 +7033,9 @@ "dev": true }, "espree": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", - "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -7413,9 +7424,9 @@ } }, "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7822,28 +7833,28 @@ "dev": true }, "jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", + "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", "dev": true, "requires": { - "abab": "^2.0.5", - "acorn": "^8.5.0", + "abab": "^2.0.6", + "acorn": "^8.7.1", "acorn-globals": "^6.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", + "data-urls": "^3.0.2", "decimal.js": "^10.3.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "parse5": "^7.0.0", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", @@ -7851,8 +7862,8 @@ "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", + "whatwg-url": "^11.0.0", + "ws": "^8.8.0", "xml-name-validator": "^4.0.0" }, "dependencies": { @@ -8321,10 +8332,13 @@ } }, "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", + "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "dev": true, + "requires": { + "entities": "^4.3.0" + } }, "path-exists": { "version": "4.0.0", @@ -8876,9 +8890,9 @@ "dev": true }, "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "requires": { "xmlchars": "^2.2.0" @@ -9067,9 +9081,9 @@ "dev": true }, "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", + "integrity": "sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", @@ -9122,9 +9136,9 @@ "dev": true }, "tinyspy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.0.tgz", - "integrity": "sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz", + "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==", "dev": true }, "tmp": { @@ -9273,12 +9287,6 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-to-istanbul": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", @@ -9302,9 +9310,9 @@ } }, "vite": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.6.tgz", - "integrity": "sha512-pjfsWIzfUlQME/VAmU6SsjdHkTt6WAHysuqPkHDcjzNu6IGtxDSZ/VfRYOwHaCqX4M3Ivz0kxuSfAPM6gAIX+w==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz", + "integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==", "dev": true, "requires": { "esbuild": "^0.14.47", @@ -9315,9 +9323,9 @@ } }, "vitest": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.21.1.tgz", - "integrity": "sha512-WBIxuFmIDPuK47GO6Lu9eNeRMqHj/FWL3dk73OHH3eyPPWPiu+UB3QHLkLK2PEggCqJW4FaWoWg8R68S7p9+9Q==", + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.22.1.tgz", + "integrity": "sha512-+x28YTnSLth4KbXg7MCzoDAzPJlJex7YgiZbUh6YLp0/4PqVZ7q7/zyfdL0OaPtKTpNiQFPpMC8Y2MSzk8F7dw==", "dev": true, "requires": { "@types/chai": "^4.3.3", @@ -9327,7 +9335,7 @@ "debug": "^4.3.4", "local-pkg": "^0.4.2", "tinypool": "^0.2.4", - "tinyspy": "^1.0.0", + "tinyspy": "^1.0.2", "vite": "^2.9.12 || ^3.0.0-0" } }, @@ -9338,18 +9346,18 @@ "dev": true }, "vue": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.8.tgz", - "integrity": "sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.10.tgz", + "integrity": "sha512-HmFC70qarSHPXcKtW8U8fgIkF6JGvjEmDiVInTkKZP0gIlEPhlVlcJJLkdGIDiNkIeA2zJPQTWJUI4iWe+AVfg==", "requires": { - "@vue/compiler-sfc": "2.7.8", + "@vue/compiler-sfc": "2.7.10", "csstype": "^3.1.0" }, "dependencies": { "@vue/compiler-sfc": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz", - "integrity": "sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.10.tgz", + "integrity": "sha512-55Shns6WPxlYsz4WX7q9ZJBL77sKE1ZAYNYStLs6GbhIOMrNtjMvzcob6gu3cGlfpCR4bT7NXgyJ3tly2+Hx8Q==", "requires": { "@babel/parser": "^7.18.4", "postcss": "^8.4.14", @@ -9408,9 +9416,9 @@ } }, "vue-template-compiler": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.8.tgz", - "integrity": "sha512-eQqdcUpJKJpBRPDdxCNsqUoT0edNvdt1jFjtVnVS/LPPmr0BU2jWzXlrf6BVMeODtdLewB3j8j3WjNiB+V+giw==", + "version": "2.7.10", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.10.tgz", + "integrity": "sha512-QO+8R9YRq1Gudm8ZMdo/lImZLJVUIAM8c07Vp84ojdDAf8HmPJc7XB556PcXV218k2AkKznsRz6xB5uOjAC4EQ==", "dev": true, "requires": { "de-indent": "^1.0.2", @@ -9481,9 +9489,9 @@ "dev": true }, "whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "requires": { "tr46": "^3.0.0", @@ -9535,9 +9543,9 @@ "dev": true }, "ws": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz", - "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "requires": {} }, diff --git a/panel/package.json b/panel/package.json index e6c3480e79..ed4e746303 100644 --- a/panel/package.json +++ b/panel/package.json @@ -19,7 +19,7 @@ "dependencies": { "@linusborg/vue-simple-portal": "^0.1.5", "autosize": "^5.0.1", - "dayjs": "^1.11.4", + "dayjs": "^1.11.5", "mitt": "^3.0.0", "prosemirror-commands": "^1.3.0", "prosemirror-history": "^1.3.0", @@ -28,32 +28,32 @@ "prosemirror-model": "^1.18.1", "prosemirror-schema-list": "^1.2.1", "prosemirror-view": "^1.27.0", - "vue": "^2.7.8", + "vue": "^2.7.10", "vuedraggable": "^2.24.3", "vuelidate": "^0.7.7", "vuex": "^3.6.2" }, "devDependencies": { "@vitejs/plugin-vue2": "^1.1.2", - "@vitest/ui": "^0.21.1", + "@vitest/ui": "^0.22.1", "@vue/test-utils": "^1.3.0", "autoprefixer": "^10.4.8", "c8": "^7.12.0", - "cypress": "^10.4.0", - "eslint": "^8.21.0", + "cypress": "^10.6.0", + "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^9.3.0", - "jsdom": "^19.0.0", + "eslint-plugin-vue": "^9.4.0", + "jsdom": "^20.0.0", "postcss-csso": "^6.0.1", "postcss-dir-pseudo-class": "^6.0.5", "postcss-logical": "^5.0.4", "prettier": "^2.7.1", - "terser": "^5.14.2", - "vite": "^3.0.6", - "vitest": "^0.21.1", + "terser": "^5.15.0", + "vite": "^3.0.9", + "vitest": "^0.22.1", "vue-docgen-api": "^4.52.0", - "vue-template-compiler": "^2.7.8" + "vue-template-compiler": "^2.7.10" }, "browserslist": [ "last 2 Android versions", From 5e5661a578f9bc2c0871f317f9d02993bc6c84fe Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 09:02:11 +0200 Subject: [PATCH 3/8] Update dependencies for CI --- .github/workflows/backend.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 836926a272..c4aab9bdda 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -84,7 +84,7 @@ jobs: extensions: ${{ env.extensions }} ini-values: ${{ env.ini }} coverage: pcov - tools: phpunit:9.5.13, psalm:4.20.0 + tools: phpunit:9.5.22, psalm:4.26.0 - name: Setup problem matchers run: | @@ -174,8 +174,8 @@ jobs: extensions: ${{ env.extensions }} coverage: none tools: | - composer:2.3.7, composer-normalize:2.28.0, composer-require-checker:4.0.0, - composer-unused:0.7.12, phpcpd:6.0.3, phpmd:2.12.0 + composer:2.4.1, composer-normalize:2.28.3, composer-require-checker:4.1.0, + composer-unused:0.8.2, phpcpd:6.0.3, phpmd:2.12.0 - name: Validate composer.json/composer.lock if: always() && steps.finishPrepare.outcome == 'success' @@ -220,7 +220,7 @@ jobs: with: php-version: ${{ env.php }} coverage: none - tools: php-cs-fixer:3.8.0 + tools: php-cs-fixer:3.10.0 - name: Cache analysis data id: finishPrepare From 11d0f72d76485bf3a4a5d0e013e54731c5a152e5 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 09:05:45 +0200 Subject: [PATCH 4/8] Fix vitest dependency --- panel/package-lock.json | 57 +++++++++++++++++++++++++++++------------ panel/package.json | 2 +- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/panel/package-lock.json b/panel/package-lock.json index 6263eef895..9703e1d7d1 100644 --- a/panel/package-lock.json +++ b/panel/package-lock.json @@ -24,10 +24,10 @@ }, "devDependencies": { "@vitejs/plugin-vue2": "^1.1.2", + "@vitest/coverage-c8": "^0.22.1", "@vitest/ui": "^0.22.1", "@vue/test-utils": "^1.3.0", "autoprefixer": "^10.4.8", - "c8": "^7.12.0", "cypress": "^10.6.0", "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", @@ -408,6 +408,19 @@ "vue": "^2.7.0-0" } }, + "node_modules/@vitest/coverage-c8": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.22.1.tgz", + "integrity": "sha512-KOOYpO7EGpaF+nD8GD+Y05D0JtZp12NUu6DdLXvBPqSOPo2HkZ7KNBtfR0rb6gOy3NLtGiWTYTzCwhajgb2HlA==", + "dev": true, + "dependencies": { + "c8": "^7.12.0", + "vitest": "0.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@vitest/ui": { "version": "0.22.1", "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.22.1.tgz", @@ -3051,9 +3064,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4341,7 +4354,7 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" @@ -5031,12 +5044,12 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0" }, @@ -5796,6 +5809,16 @@ "dev": true, "requires": {} }, + "@vitest/coverage-c8": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.22.1.tgz", + "integrity": "sha512-KOOYpO7EGpaF+nD8GD+Y05D0JtZp12NUu6DdLXvBPqSOPo2HkZ7KNBtfR0rb6gOy3NLtGiWTYTzCwhajgb2HlA==", + "dev": true, + "requires": { + "c8": "^7.12.0", + "vitest": "0.22.1" + } + }, "@vitest/ui": { "version": "0.22.1", "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-0.22.1.tgz", @@ -7790,9 +7813,9 @@ } }, "istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -8794,7 +8817,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "resolve": { @@ -9288,12 +9311,12 @@ "dev": true }, "v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", + "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0" } diff --git a/panel/package.json b/panel/package.json index ed4e746303..d0c8f5eb42 100644 --- a/panel/package.json +++ b/panel/package.json @@ -35,10 +35,10 @@ }, "devDependencies": { "@vitejs/plugin-vue2": "^1.1.2", + "@vitest/coverage-c8": "^0.22.1", "@vitest/ui": "^0.22.1", "@vue/test-utils": "^1.3.0", "autoprefixer": "^10.4.8", - "c8": "^7.12.0", "cypress": "^10.6.0", "eslint": "^8.23.0", "eslint-config-prettier": "^8.5.0", From a320629b69be2930f29eaa434bb1d4e8c7315f94 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 09:06:19 +0200 Subject: [PATCH 5/8] Fix cs --- bootstrap.php | 3 --- config/components.php | 1 - config/fields/structure.php | 1 - config/fields/tags.php | 1 - config/presets/pages.php | 1 - config/routes.php | 1 - config/tags.php | 1 - src/Cache/FileCache.php | 10 +++++----- src/Cms/App.php | 1 - src/Cms/Blueprint.php | 3 --- src/Cms/Email.php | 3 +-- src/Cms/FileActions.php | 3 --- src/Cms/LanguageRouter.php | 2 -- src/Cms/LanguageRoutes.php | 3 --- src/Cms/Media.php | 1 - src/Cms/ModelWithContent.php | 2 -- src/Cms/PageActions.php | 3 --- src/Cms/PageBlueprint.php | 1 - src/Cms/User.php | 1 - src/Database/Database.php | 1 - src/Database/Query.php | 6 ------ src/Database/Sql.php | 5 ++--- src/Filesystem/Dir.php | 4 ---- src/Form/Form.php | 2 -- src/Panel/Panel.php | 3 --- src/Panel/View.php | 1 - src/Toolkit/A.php | 1 - src/Toolkit/Collection.php | 3 --- src/Toolkit/Html.php | 2 +- src/Toolkit/Pagination.php | 4 ---- src/Toolkit/Properties.php | 1 - src/Toolkit/Str.php | 2 -- tests/Cms/Api/ApiTest.php | 1 - tests/Cms/App/AppPluginsTest.php | 1 - tests/Cms/Permissions/PermissionsTest.php | 1 - tests/Cms/Sections/PagesSectionTest.php | 2 -- tests/Form/Fields/InfoFieldTest.php | 1 - tests/Toolkit/ATest.php | 1 - 38 files changed, 9 insertions(+), 75 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index a5e9766f95..b4c1fa38d0 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -12,7 +12,6 @@ } if (is_file($autoloader = dirname(__DIR__) . '/vendor/autoload.php')) { - /** * Always prefer a site-wide Composer autoloader * if it exists, it means that the user has probably @@ -20,13 +19,11 @@ */ include $autoloader; } elseif (is_file($autoloader = __DIR__ . '/vendor/autoload.php')) { - /** * Fall back to the local autoloader if that exists */ include $autoloader; } else { - /** * If neither one exists, don't bother searching; * it's a custom directory setup and the users need to diff --git a/config/components.php b/config/components.php index c05d886bd9..914cc36bc3 100644 --- a/config/components.php +++ b/config/components.php @@ -101,7 +101,6 @@ // check if the thumb already exists if (file_exists($thumbRoot) === false) { - // if not, create job file $job = $mediaRoot . '/.jobs/' . $thumbName . '.json'; diff --git a/config/fields/structure.php b/config/fields/structure.php index 48b2841802..ee74703f81 100644 --- a/config/fields/structure.php +++ b/config/fields/structure.php @@ -110,7 +110,6 @@ if (empty($this->columns)) { foreach ($this->fields as $field) { - // Skip hidden and unsaveable fields // They should never be included as column if ($field['type'] === 'hidden' || $field['saveable'] === false) { diff --git a/config/fields/tags.php b/config/fields/tags.php index 98cfbb4e33..ab8121af78 100644 --- a/config/fields/tags.php +++ b/config/fields/tags.php @@ -71,7 +71,6 @@ // transform into value-text objects return array_map(function ($option) use ($options) { - // already a valid object if (is_array($option) === true && isset($option['value'], $option['text']) === true) { return $option; diff --git a/config/presets/pages.php b/config/presets/pages.php index 21e76aadbd..8a3e51f5b4 100644 --- a/config/presets/pages.php +++ b/config/presets/pages.php @@ -3,7 +3,6 @@ use Kirby\Toolkit\I18n; return function (array $props) { - // load the general templates setting for all sections $templates = $props['templates'] ?? null; diff --git a/config/routes.php b/config/routes.php index 134ad6005f..3168dd3d6b 100644 --- a/config/routes.php +++ b/config/routes.php @@ -107,7 +107,6 @@ if ($kirby->multilang() === true) { $after = LanguageRoutes::create($kirby); } else { - // Single-language home $after[] = [ 'pattern' => '', diff --git a/config/tags.php b/config/tags.php index 09fec63f2c..52232f8a6f 100644 --- a/config/tags.php +++ b/config/tags.php @@ -214,7 +214,6 @@ 'title' ], 'html' => function ($tag) { - // get and sanitize the username $username = str_replace('@', '', $tag->value); diff --git a/src/Cache/FileCache.php b/src/Cache/FileCache.php index 7393e23eb7..c209fb9419 100644 --- a/src/Cache/FileCache.php +++ b/src/Cache/FileCache.php @@ -79,19 +79,19 @@ protected function file(string $key): string case '/': break; - // backslashes get their own marker in the path - // to differentiate the cache key from one with forward slashes + // backslashes get their own marker in the path + // to differentiate the cache key from one with forward slashes case '\\': $keyParts[] = '_backslash'; break; - // empty part means two slashes in a row; - // special marker like for backslashes + // empty part means two slashes in a row; + // special marker like for backslashes case '': $keyParts[] = '_empty'; break; - // an actual path segment + // an actual path segment default: // check if the segment only contains safe characters; // underscores are *not* safe to guarantee uniqueness diff --git a/src/Cms/App.php b/src/Cms/App.php index e49b64493d..04cb4be2b4 100644 --- a/src/Cms/App.php +++ b/src/Cms/App.php @@ -461,7 +461,6 @@ public function controller(string $name, array $arguments = [], string $contentT } if ($contentType !== 'html') { - // no luck for a specific representation controller? // let's try the html controller instead if ($controller = $this->controllerLookup($name)) { diff --git a/src/Cms/Blueprint.php b/src/Cms/Blueprint.php index bb3f3c1651..bd257c2f35 100644 --- a/src/Cms/Blueprint.php +++ b/src/Cms/Blueprint.php @@ -506,7 +506,6 @@ public static function fieldsProps($fields): array } foreach ($fields as $fieldName => $fieldProps) { - // extend field from string if (is_string($fieldProps) === true) { $fieldProps = [ @@ -600,7 +599,6 @@ protected function normalizeOptions($options, array $defaults, array $aliases = protected function normalizeSections(string $tabName, array $sections): array { foreach ($sections as $sectionName => $sectionProps) { - // unset / remove section if its property is false if ($sectionProps === false) { unset($sections[$sectionName]); @@ -686,7 +684,6 @@ protected function normalizeTabs($tabs): array } foreach ($tabs as $tabName => $tabProps) { - // unset / remove tab if its property is false if ($tabProps === false) { unset($tabs[$tabName]); diff --git a/src/Cms/Email.php b/src/Cms/Email.php index e6550d8d7a..6009792e53 100644 --- a/src/Cms/Email.php +++ b/src/Cms/Email.php @@ -106,7 +106,6 @@ protected function preset($preset): array protected function template(): void { if (isset($this->props['template']) === true) { - // prepare data to be passed to template $data = $this->props['data'] ?? []; @@ -123,7 +122,7 @@ protected function template(): void $this->props['body']['text'] = $text->render($data); } - // fallback to single email text template + // fallback to single email text template } elseif ($text->exists()) { $this->props['body'] = $text->render($data); } else { diff --git a/src/Cms/FileActions.php b/src/Cms/FileActions.php index 9e1b24fdf5..e82171a53b 100644 --- a/src/Cms/FileActions.php +++ b/src/Cms/FileActions.php @@ -194,7 +194,6 @@ public static function create(array $props) // run the hook return $file->commit('create', compact('file', 'upload'), function ($file, $upload) { - // delete all public versions $file->unpublish(); @@ -230,7 +229,6 @@ public static function create(array $props) public function delete(): bool { return $this->commit('delete', ['file' => $this], function ($file) { - // remove all versions in the media folder $file->unpublish(); @@ -289,7 +287,6 @@ public function replace(string $source) ]; return $this->commit('replace', $arguments, function ($file, $upload) { - // delete all public versions $file->unpublish(); diff --git a/src/Cms/LanguageRouter.php b/src/Cms/LanguageRouter.php index 8d384554de..8fafbd774a 100644 --- a/src/Cms/LanguageRouter.php +++ b/src/Cms/LanguageRouter.php @@ -60,7 +60,6 @@ public function routes(): array // only keep the scoped language routes $routes = array_values(array_filter($routes, function ($route) use ($language) { - // no language scope if (empty($route['language']) === true) { return false; @@ -82,7 +81,6 @@ public function routes(): array foreach ($routes as $index => $route) { if ($pageId = ($route['page'] ?? null)) { if ($page = $kirby->page($pageId)) { - // convert string patterns to arrays $patterns = A::wrap($route['pattern']); diff --git a/src/Cms/LanguageRoutes.php b/src/Cms/LanguageRoutes.php index ad0ac896fb..6d15957f78 100644 --- a/src/Cms/LanguageRoutes.php +++ b/src/Cms/LanguageRoutes.php @@ -23,7 +23,6 @@ public static function create(App $kirby): array $baseurl = $kirby->url(); foreach ($kirby->languages() as $language) { - // ignore languages with a different base url if ($language->baseurl() !== $baseurl) { continue; @@ -66,7 +65,6 @@ public static function fallback(App $kirby): array 'method' => 'ALL', 'env' => 'site', 'action' => function (string $path) use ($kirby) { - // check for content representations or files $extension = F::extension($path); @@ -115,7 +113,6 @@ public static function home(App $kirby): array 'method' => 'ALL', 'env' => 'site', 'action' => function () use ($kirby) { - // find all languages with the same base url as the current installation $languages = $kirby->languages()->filter('baseurl', $kirby->url()); diff --git a/src/Cms/Media.php b/src/Cms/Media.php index 022778b47f..32da5af123 100644 --- a/src/Cms/Media.php +++ b/src/Cms/Media.php @@ -41,7 +41,6 @@ public static function link(Model $model = null, string $hash, string $filename) // try to find a file by model and filename // this should work for all original files if ($file = $model->file($filename)) { - // check if the request contained an outdated media hash if ($file->mediaHash() !== $hash) { // if at least the token was correct, redirect diff --git a/src/Cms/ModelWithContent.php b/src/Cms/ModelWithContent.php index 796eb1716d..2596ea1b05 100644 --- a/src/Cms/ModelWithContent.php +++ b/src/Cms/ModelWithContent.php @@ -83,7 +83,6 @@ abstract protected function commit(string $action, array $arguments, Closure $ca */ public function content(string $languageCode = null) { - // single language support if ($this->kirby()->multilang() === false) { if (is_a($this->content, 'Kirby\Cms\Content') === true) { @@ -95,7 +94,6 @@ public function content(string $languageCode = null) // multi language support } else { - // only fetch from cache for the default language if ($languageCode === null && is_a($this->content, 'Kirby\Cms\Content') === true) { return $this->content; diff --git a/src/Cms/PageActions.php b/src/Cms/PageActions.php index 437121c570..ec9115c69b 100644 --- a/src/Cms/PageActions.php +++ b/src/Cms/PageActions.php @@ -478,7 +478,6 @@ public static function create(array $props) // run the hooks and creation action $page = $page->commit('create', ['page' => $page, 'input' => $props], function ($page, $props) { - // always create pages in the default language if ($page->kirby()->multilang() === true) { $languageCode = $page->kirby()->defaultLanguage()->code(); @@ -594,7 +593,6 @@ public function createNum(int $num = null): int public function delete(bool $force = false): bool { return $this->commit('delete', ['page' => $this, 'force' => $force], function ($page, $force) { - // delete all files individually foreach ($page->files() as $file) { $file->delete(); @@ -607,7 +605,6 @@ public function delete(bool $force = false): bool // actually remove the page from disc if ($page->exists() === true) { - // delete all public media files Dir::remove($page->mediaRoot()); diff --git a/src/Cms/PageBlueprint.php b/src/Cms/PageBlueprint.php index 0a5e9bf018..87e4937732 100644 --- a/src/Cms/PageBlueprint.php +++ b/src/Cms/PageBlueprint.php @@ -119,7 +119,6 @@ protected function normalizeStatus($status): array // clean up and translate each status foreach ($status as $key => $options) { - // skip invalid status definitions if (in_array($key, ['draft', 'listed', 'unlisted']) === false || $options === false) { unset($status[$key]); diff --git a/src/Cms/User.php b/src/Cms/User.php index 6bd2cb0656..67b138c34f 100644 --- a/src/Cms/User.php +++ b/src/Cms/User.php @@ -648,7 +648,6 @@ public function roles() // if there's an authenticated user … if ($user = $kirby->user()) { - // admin users can select pretty much any role if ($user->isAdmin() === true) { // except if the user is the last admin diff --git a/src/Database/Database.php b/src/Database/Database.php index 87b77b4361..99260e4b86 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -380,7 +380,6 @@ protected function hit(string $query, array $bindings = []): bool // store the final sql to add it to the trace later $this->lastQuery = $this->statement->queryString; } catch (Throwable $e) { - // store the error $this->affected = 0; $this->lastError = $e; diff --git a/src/Database/Query.php b/src/Database/Query.php index 8e894484d8..935489205e 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -956,14 +956,12 @@ protected function filterQuery(array $args, $current) // ->where('username like "myuser"'); } elseif (is_string($args[0]) === true) { - // simply add the entire string to the where clause // escaping or using bindings has to be done before calling this method $result = $args[0]; // ->where(['username' => 'myuser']); } elseif (is_array($args[0]) === true) { - // simple array mode (AND operator) $sql = $this->database->sql()->values($this->table, $args[0], ' AND ', true, true); @@ -990,7 +988,6 @@ protected function filterQuery(array $args, $current) // ->where('username like :username', ['username' => 'myuser']) if (is_string($args[0]) === true && is_array($args[1]) === true) { - // prepared where clause $result = $args[0]; @@ -999,7 +996,6 @@ protected function filterQuery(array $args, $current) // ->where('username like ?', 'myuser') } elseif (is_string($args[0]) === true && is_string($args[1]) === true) { - // prepared where clause $result = $args[0]; @@ -1012,7 +1008,6 @@ protected function filterQuery(array $args, $current) // ->where('username', 'like', 'myuser'); if (is_string($args[0]) === true && is_string($args[1]) === true) { - // validate column $sql = $this->database->sql(); $key = $sql->columnName($this->table, $args[0]); @@ -1061,7 +1056,6 @@ protected function filterQuery(array $args, $current) } break; - } // attach the where clause diff --git a/src/Database/Sql.php b/src/Database/Sql.php index 2228c296cd..713a2064f2 100644 --- a/src/Database/Sql.php +++ b/src/Database/Sql.php @@ -672,7 +672,6 @@ public function selected($table, $columns = null): string // array of columns if (is_array($columns) === true) { - // validate columns $result = []; @@ -708,11 +707,11 @@ public function splitIdentifier($table, $identifier): array case 1: return [$table, $this->unquoteIdentifier($parts[0])]; - // qualified identifier + // qualified identifier case 2: return [$this->unquoteIdentifier($parts[0]), $this->unquoteIdentifier($parts[1])]; - // every other number is an error + // every other number is an error default: throw new InvalidArgumentException('Invalid identifier ' . $identifier); } diff --git a/src/Filesystem/Dir.php b/src/Filesystem/Dir.php index 4375c7c8be..8207efc887 100644 --- a/src/Filesystem/Dir.php +++ b/src/Filesystem/Dir.php @@ -239,7 +239,6 @@ public static function inventory(string $dir, string $contentExtension = 'txt', natsort($items); foreach ($items as $item) { - // ignore all items with a leading dot if (in_array(substr($item, 0, 1), ['.', '_']) === true) { continue; @@ -248,7 +247,6 @@ public static function inventory(string $dir, string $contentExtension = 'txt', $root = $dir . '/' . $item; if (is_dir($root) === true) { - // extract the slug and num of the directory if (preg_match('/^([0-9]+)' . static::$numSeparator . '(.*)$/', $item, $match)) { $num = (int)$match[1]; @@ -313,7 +311,6 @@ public static function inventory(string $dir, string $contentExtension = 'txt', */ protected static function inventoryContent(array $inventory, array $content): array { - // filter meta files from the content file if (empty($content) === true) { $inventory['template'] = 'default'; @@ -321,7 +318,6 @@ protected static function inventoryContent(array $inventory, array $content): ar } foreach ($content as $contentName) { - // could be a meta file. i.e. cover.jpg if (isset($inventory['files'][$contentName]) === true) { continue; diff --git a/src/Form/Form.php b/src/Form/Form.php index e6445e7098..5935ced2e3 100644 --- a/src/Form/Form.php +++ b/src/Form/Form.php @@ -73,7 +73,6 @@ public function __construct(array $props) $this->values = []; foreach ($fields as $name => $props) { - // inject stuff from the form constructor (model, etc.) $props = array_merge($inject, $props); @@ -104,7 +103,6 @@ public function __construct(array $props) } if ($strict !== true) { - // use all given values, no matter // if there's a field or not. $input = array_merge($values, $input); diff --git a/src/Panel/Panel.php b/src/Panel/Panel.php index f0f6e03457..f237478007 100644 --- a/src/Panel/Panel.php +++ b/src/Panel/Panel.php @@ -314,7 +314,6 @@ public static function router(string $path = null) // create a micro-router for the Panel return Router::execute($path, $method = $kirby->request()->method(), $routes, function ($route) use ($areas, $kirby, $method, $path) { - // route needs authentication? $auth = $route->attributes()['auth'] ?? true; $areaId = $route->attributes()['area'] ?? null; @@ -416,7 +415,6 @@ public static function routesForDialogs(string $areaId, array $area): array $routes = []; foreach ($dialogs as $key => $dialog) { - // create the full pattern with dialogs prefix $pattern = 'dialogs/' . trim(($dialog['pattern'] ?? $key), '/'); @@ -492,7 +490,6 @@ public static function routesForSearches(string $areaId, array $area): array $routes = []; foreach ($searches as $name => $params) { - // create the full routing pattern $pattern = 'search/' . $name; diff --git a/src/Panel/View.php b/src/Panel/View.php index 6d24094221..3eb7155a17 100644 --- a/src/Panel/View.php +++ b/src/Panel/View.php @@ -420,7 +420,6 @@ public static function response($data, array $options = []) // if requested, send $fiber data as JSON if (Panel::isFiberRequest() === true) { - // filter data, if only or globals headers or // query parameters are set $fiber = static::apply($fiber); diff --git a/src/Toolkit/A.php b/src/Toolkit/A.php index 75f6727cbf..58eab0beae 100644 --- a/src/Toolkit/A.php +++ b/src/Toolkit/A.php @@ -177,7 +177,6 @@ public static function merge($array1, $array2, int $mode = A::MERGE_APPEND) } foreach ($array2 as $key => $value) { - // append to the merged array, don't overwrite numeric keys if (is_int($key) === true && $mode === static::MERGE_APPEND) { $merged[] = $value; diff --git a/src/Toolkit/Collection.php b/src/Toolkit/Collection.php index 4edde89437..7bf9b88f23 100644 --- a/src/Toolkit/Collection.php +++ b/src/Toolkit/Collection.php @@ -525,7 +525,6 @@ protected function getAttributeFromObject($object, string $attribute) */ public function group($field, bool $i = true) { - // group by field name if (is_string($field) === true) { return $this->group(function ($item) use ($field, $i) { @@ -541,7 +540,6 @@ public function group($field, bool $i = true) $groups = []; foreach ($this->data as $key => $item) { - // get the value to group by $value = $field($item); @@ -1005,7 +1003,6 @@ public function sort() $fields = []; foreach ($args as $arg) { - // get the index of the latest field array inside the $fields array $currentField = $fields ? count($fields) - 1 : 0; diff --git a/src/Toolkit/Html.php b/src/Toolkit/Html.php index b334216977..f7e5586a97 100644 --- a/src/Toolkit/Html.php +++ b/src/Toolkit/Html.php @@ -594,7 +594,7 @@ public static function youtube(string $url, array $options = [], array $attr = [ break; - // regular video URLs + // regular video URLs case 'watch': if ($isYoutubeId($query->v) === true) { $src = $host . '/' . $query->v; diff --git a/src/Toolkit/Pagination.php b/src/Toolkit/Pagination.php index a27084f201..6f6a91682e 100644 --- a/src/Toolkit/Pagination.php +++ b/src/Toolkit/Pagination.php @@ -81,7 +81,6 @@ public static function for(Collection $collection, ...$arguments) */ return $a; } elseif (is_array($a) === true) { - /** * First argument is an option array * @@ -89,7 +88,6 @@ public static function for(Collection $collection, ...$arguments) */ $params = $a; } elseif (is_int($a) === true && $b === null) { - /** * First argument is the limit * @@ -97,7 +95,6 @@ public static function for(Collection $collection, ...$arguments) */ $params['limit'] = $a; } elseif (is_int($a) === true && is_int($b) === true) { - /** * First argument is the limit, * second argument is the page @@ -107,7 +104,6 @@ public static function for(Collection $collection, ...$arguments) $params['limit'] = $a; $params['page'] = $b; } elseif (is_int($a) === true && is_array($b) === true) { - /** * First argument is the limit, * second argument are options diff --git a/src/Toolkit/Properties.php b/src/Toolkit/Properties.php index 05f258189e..181eceff42 100644 --- a/src/Toolkit/Properties.php +++ b/src/Toolkit/Properties.php @@ -122,7 +122,6 @@ protected function setProperty($name, $value, $required = null) // handle empty values if ($value === null) { - // replace null with a default value, if a default handler exists if (method_exists($this, 'default' . $name) === true) { $value = $this->{'default' . $name}(); diff --git a/src/Toolkit/Str.php b/src/Toolkit/Str.php index c8c08a5d6f..7ccef0c15a 100644 --- a/src/Toolkit/Str.php +++ b/src/Toolkit/Str.php @@ -846,11 +846,9 @@ public static function replaceReplacements(string $string, array $replacements): if (is_int($replacement['limit']) === false) { throw new Exception('Invalid limit "' . $replacement['limit'] . '".'); } elseif ($replacement['limit'] === -1) { - // no limit, we don't need our special replacement routine $string = str_replace($replacement['search'], $replacement['replace'], $string); } elseif ($replacement['limit'] > 0) { - // limit given, only replace for $replacement['limit'] times per replacement $position = -1; diff --git a/tests/Cms/Api/ApiTest.php b/tests/Cms/Api/ApiTest.php index eb91cd6af8..49b3b36dd0 100644 --- a/tests/Cms/Api/ApiTest.php +++ b/tests/Cms/Api/ApiTest.php @@ -399,7 +399,6 @@ public function testUsers() public function testFileGetRoute() { - // regular $result = $this->api->call('pages/a/files/a-regular-file.jpg', 'GET'); diff --git a/tests/Cms/App/AppPluginsTest.php b/tests/Cms/App/AppPluginsTest.php index dfc49a7008..08f3986af1 100644 --- a/tests/Cms/App/AppPluginsTest.php +++ b/tests/Cms/App/AppPluginsTest.php @@ -339,7 +339,6 @@ public function testCollection() public function testCollectionFilters() { - // fetch all previous filters $prevFilters = Collection::$filters; diff --git a/tests/Cms/Permissions/PermissionsTest.php b/tests/Cms/Permissions/PermissionsTest.php index 1d72dda1bf..2d06cea415 100644 --- a/tests/Cms/Permissions/PermissionsTest.php +++ b/tests/Cms/Permissions/PermissionsTest.php @@ -55,7 +55,6 @@ public function actionsProvider() */ public function testActions(string $category, $action) { - // default $p = new Permissions(); $this->assertTrue($p->for($category, $action)); diff --git a/tests/Cms/Sections/PagesSectionTest.php b/tests/Cms/Sections/PagesSectionTest.php index 53ec60704a..10acd33ef1 100644 --- a/tests/Cms/Sections/PagesSectionTest.php +++ b/tests/Cms/Sections/PagesSectionTest.php @@ -22,7 +22,6 @@ public function setUp(): void public function testHeadline() { - // single headline $section = new Section('pages', [ 'name' => 'test', @@ -465,7 +464,6 @@ public function testTranslatedEmpty() public function testHelp() { - // single help $section = new Section('pages', [ 'name' => 'test', diff --git a/tests/Form/Fields/InfoFieldTest.php b/tests/Form/Fields/InfoFieldTest.php index 86dcea6e5a..50fa281c6a 100644 --- a/tests/Form/Fields/InfoFieldTest.php +++ b/tests/Form/Fields/InfoFieldTest.php @@ -20,7 +20,6 @@ public function testDefaultProps() public function testText() { - // simple text $field = $this->field('info', [ 'text' => 'test' diff --git a/tests/Toolkit/ATest.php b/tests/Toolkit/ATest.php index 04206f0fb7..47da05ba8a 100644 --- a/tests/Toolkit/ATest.php +++ b/tests/Toolkit/ATest.php @@ -184,7 +184,6 @@ public function testMapWithClassMethod() */ public function testMerge() { - // simple non-associative arrays $this->assertSame(['a', 'b', 'c', 'd'], A::merge(['a', 'b'], ['c', 'd'])); $this->assertSame(['a', 'b', 'c', 'd', 'a'], A::merge(['a', 'b'], ['c', 'd', 'a'])); From 23a9ff097e1095017cd6a00372832bf83d7777af Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 09:08:53 +0200 Subject: [PATCH 6/8] Revert to `composer-unused:0.7.12` for now --- .github/workflows/backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index c4aab9bdda..04e85b443f 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -175,7 +175,7 @@ jobs: coverage: none tools: | composer:2.4.1, composer-normalize:2.28.3, composer-require-checker:4.1.0, - composer-unused:0.8.2, phpcpd:6.0.3, phpmd:2.12.0 + composer-unused:0.7.12, phpcpd:6.0.3, phpmd:2.12.0 - name: Validate composer.json/composer.lock if: always() && steps.finishPrepare.outcome == 'success' From 143a260fde4e1ad8c0ad525806fc0224391c3286 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 12:07:47 +0200 Subject: [PATCH 7/8] Downgrade composer for CI --- .github/workflows/backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 04e85b443f..983f54dd55 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -174,7 +174,7 @@ jobs: extensions: ${{ env.extensions }} coverage: none tools: | - composer:2.4.1, composer-normalize:2.28.3, composer-require-checker:4.1.0, + composer:2.3.8, composer-normalize:2.28.3, composer-require-checker:4.1.0, composer-unused:0.7.12, phpcpd:6.0.3, phpmd:2.12.0 - name: Validate composer.json/composer.lock From 74428a4a591ee026c6f04c2e61cac9b27b714018 Mon Sep 17 00:00:00 2001 From: Nico Hoffmann Date: Sat, 27 Aug 2022 15:15:43 +0200 Subject: [PATCH 8/8] Fix indentation --- src/Cache/FileCache.php | 8 ++++---- src/Database/Sql.php | 6 +++--- src/Toolkit/Html.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Cache/FileCache.php b/src/Cache/FileCache.php index c209fb9419..4063263880 100644 --- a/src/Cache/FileCache.php +++ b/src/Cache/FileCache.php @@ -75,24 +75,24 @@ protected function file(string $key): string $keyParts = []; foreach (preg_split('#([\/\\\\])#', $key, 0, PREG_SPLIT_DELIM_CAPTURE) as $part) { switch ($part) { - // forward slashes don't need special treatment case '/': + // forward slashes don't need special treatment break; + case '\\': // backslashes get their own marker in the path // to differentiate the cache key from one with forward slashes - case '\\': $keyParts[] = '_backslash'; break; + case '': // empty part means two slashes in a row; // special marker like for backslashes - case '': $keyParts[] = '_empty'; break; - // an actual path segment default: + // an actual path segment: // check if the segment only contains safe characters; // underscores are *not* safe to guarantee uniqueness // as they are used in the special cases diff --git a/src/Database/Sql.php b/src/Database/Sql.php index 713a2064f2..e3cff62751 100644 --- a/src/Database/Sql.php +++ b/src/Database/Sql.php @@ -703,16 +703,16 @@ public function splitIdentifier($table, $identifier): array $parts = preg_split('/(?:`[^`]*`|"[^"]*")(*SKIP)(*F)|\./', $identifier); switch (count($parts)) { - // non-qualified identifier case 1: + // non-qualified identifier return [$table, $this->unquoteIdentifier($parts[0])]; - // qualified identifier case 2: + // qualified identifier return [$this->unquoteIdentifier($parts[0]), $this->unquoteIdentifier($parts[1])]; - // every other number is an error default: + // every other number is an error throw new InvalidArgumentException('Invalid identifier ' . $identifier); } } diff --git a/src/Toolkit/Html.php b/src/Toolkit/Html.php index f7e5586a97..c8c30d7edf 100644 --- a/src/Toolkit/Html.php +++ b/src/Toolkit/Html.php @@ -585,17 +585,17 @@ public static function youtube(string $url, array $options = [], array $attr = [ }; switch ($path->toString()) { - // playlists case 'embed/videoseries': case 'playlist': + // playlists if ($isYoutubeId($query->list) === true) { $src = $host . '/videoseries'; } break; - // regular video URLs case 'watch': + // regular video URLs if ($isYoutubeId($query->v) === true) { $src = $host . '/' . $query->v;