From e8385912bd6839db48b3b232318577afd27b761f Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 29 Oct 2024 23:21:50 +0800 Subject: [PATCH 1/8] fix(dbrunner): The key might be scalar --- src/Service/Processes/DbRunnerProcessService.php | 4 +--- tests/Service/DbRunnerTest.php | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Service/Processes/DbRunnerProcessService.php b/src/Service/Processes/DbRunnerProcessService.php index 6f589d1..e61d057 100644 --- a/src/Service/Processes/DbRunnerProcessService.php +++ b/src/Service/Processes/DbRunnerProcessService.php @@ -29,9 +29,7 @@ public function main(object $input): object $rowCasted = []; foreach ($row as $key => $value) { - \assert(\is_string($key)); - - $rowCasted[$key] = $value; + $rowCasted[(string) $key] = $value; } $resultArray[] = $rowCasted; diff --git a/tests/Service/DbRunnerTest.php b/tests/Service/DbRunnerTest.php index 7b6f068..288fbba 100644 --- a/tests/Service/DbRunnerTest.php +++ b/tests/Service/DbRunnerTest.php @@ -216,6 +216,14 @@ public static function runQueryProvider(): array ], /* result */ null, /* exception */ ], + [ + '', + 'SELECT 1;', + [ + ['1' => 1], + ], /* result */ + null, /* exception */ + ], ]; } From 50f7a2cf70f84c35d245d4c213b52862088684c0 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Tue, 29 Oct 2024 23:22:48 +0800 Subject: [PATCH 2/8] refactor(dbrunner): Mark functions as deterministic --- src/Service/Types/SchemaDatabase.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Service/Types/SchemaDatabase.php b/src/Service/Types/SchemaDatabase.php index 88568b0..c0b0431 100644 --- a/src/Service/Types/SchemaDatabase.php +++ b/src/Service/Types/SchemaDatabase.php @@ -67,13 +67,14 @@ private static function setUp(\SQLite3 $db): \SQLite3 ); // MySQL-compatible functions - $db->createFunction('YEAR', $dateop('Y'), 1); - $db->createFunction('MONTH', $dateop('n'), 1); - $db->createFunction('DAY', $dateop('j'), 1); + $db->createFunction('YEAR', $dateop('Y'), 1, SQLITE3_DETERMINISTIC); + $db->createFunction('MONTH', $dateop('n'), 1, SQLITE3_DETERMINISTIC); + $db->createFunction('DAY', $dateop('j'), 1, SQLITE3_DETERMINISTIC); $db->createFunction( 'IF', fn (bool $condition, mixed $true, mixed $false) => $condition ? $true : $false, 3, + SQLITE3_DETERMINISTIC ); return $db; From c237ba5feabb197e9bb60ac1e08739fc5fb46b19 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:17:17 +0800 Subject: [PATCH 3/8] fix(processes): Mark DbRunnerProcessPayload as allowed_classes It does not matter, but it awas added to prevent future bugs. --- src/Service/Processes/ProcessService.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Service/Processes/ProcessService.php b/src/Service/Processes/ProcessService.php index b9d60c7..8f9fc82 100644 --- a/src/Service/Processes/ProcessService.php +++ b/src/Service/Processes/ProcessService.php @@ -4,6 +4,7 @@ namespace App\Service\Processes; +use App\Service\Types\DbRunnerProcessPayload; use App\Service\Types\ProcessError; /** @@ -22,7 +23,11 @@ public function run(): void throw new \RuntimeException('could not read from stdin'); } - $input = unserialize($stdin); + $input = unserialize($stdin, [ + 'allowed_classes' => [ + DbRunnerProcessPayload::class, + ], + ]); if (!\is_object($input)) { throw new \InvalidArgumentException('input must be an object'); } From b25448f01746d90be3bf8d19dbc4b717fdca401b Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:17:50 +0800 Subject: [PATCH 4/8] feat(service): Add LEFT() function back After upgrading the SQLite version, it works now. --- src/Service/Types/SchemaDatabase.php | 12 ++--- tests/Service/DbRunnerTest.php | 72 ++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/Service/Types/SchemaDatabase.php b/src/Service/Types/SchemaDatabase.php index c0b0431..1fac701 100644 --- a/src/Service/Types/SchemaDatabase.php +++ b/src/Service/Types/SchemaDatabase.php @@ -67,14 +67,15 @@ private static function setUp(\SQLite3 $db): \SQLite3 ); // MySQL-compatible functions - $db->createFunction('YEAR', $dateop('Y'), 1, SQLITE3_DETERMINISTIC); - $db->createFunction('MONTH', $dateop('n'), 1, SQLITE3_DETERMINISTIC); - $db->createFunction('DAY', $dateop('j'), 1, SQLITE3_DETERMINISTIC); + $db->createFunction('YEAR', $dateop('Y'), 1, \SQLITE3_DETERMINISTIC); + $db->createFunction('MONTH', $dateop('n'), 1, \SQLITE3_DETERMINISTIC); + $db->createFunction('DAY', $dateop('j'), 1, \SQLITE3_DETERMINISTIC); + $db->createFunction('LEFT', fn (string $str, int $len) => substr($str, 0, $len), 2, \SQLITE3_DETERMINISTIC); $db->createFunction( 'IF', fn (bool $condition, mixed $true, mixed $false) => $condition ? $true : $false, 3, - SQLITE3_DETERMINISTIC + \SQLITE3_DETERMINISTIC ); return $db; @@ -96,8 +97,7 @@ private static function initialize(string $filename, string $schema): void return; } - $db = new \SQLite3($filename); - $db->enableExceptions(true); + $db = self::setUp(new \SQLite3($filename)); try { $db->exec('BEGIN EXCLUSIVE'); diff --git a/tests/Service/DbRunnerTest.php b/tests/Service/DbRunnerTest.php index 288fbba..9395424 100644 --- a/tests/Service/DbRunnerTest.php +++ b/tests/Service/DbRunnerTest.php @@ -224,6 +224,66 @@ public static function runQueryProvider(): array ], /* result */ null, /* exception */ ], + [ + "CREATE TABLE records ( + RecordID INTEGER PRIMARY KEY, -- Assuming a unique identifier for each record + ClassNo varchar(5) NOT NULL, -- Stores the class number as a string + YMD DATE NOT NULL, -- Stores the date in 'YYYY-MM-DD' format + Leave INTEGER DEFAULT 0, -- Stores the leave count for personal leave + SickLeave INTEGER DEFAULT 0, -- Stores the leave count for sick leave + PublicLeave INTEGER DEFAULT 0, -- Stores the leave count for public leave + Absent INTEGER DEFAULT 0 -- Stores the count for absences +); + +INSERT INTO records (RecordID, ClassNo, YMD, Leave, SickLeave, PublicLeave, Absent) VALUES + (1, '101A', '2018-03-15', 2, 1, 0, 0), + (2, '101B', '2018-03-16', 0, 0, 1, 1), + (3, '102A', '2018-03-17', 1, 0, 2, 0), + (4, '101A', '2018-04-15', 0, 1, 0, 1), + (5, '102B', '2018-05-20', 3, 0, 0, 0), + (6, '101B', '2018-06-25', 0, 2, 0, 1), + (7, '101C', '2018-07-10', 1, 1, 1, 0), + (8, '103A', '2018-08-30', 0, 0, 3, 1), + (9, '101A', '2019-09-01', 2, 1, 0, 1), -- Different year for variety + (10, '102A', '2018-10-11', 0, 0, 1, 0);", + 'SELECT + LEFT(records.ClassNo, 3) AS 班級, + SUM(records.Leave) AS 事假總計, + SUM(records.SickLeave) AS 病假總計, + SUM(records.PublicLeave) AS 公假總計, + SUM(records.Absent) AS 曠課總計 +FROM + records +WHERE + YEAR(YMD) = 2018 +group BY + LEFT(records.ClassNo, 3) +', + [ + [ + '班級' => '101', + '事假總計' => 3, + '病假總計' => 5, + '公假總計' => 2, + '曠課總計' => 3, + ], + [ + '班級' => '102', + '事假總計' => 4, + '病假總計' => 0, + '公假總計' => 3, + '曠課總計' => 0, + ], + [ + '班級' => '103', + '事假總計' => 0, + '病假總計' => 0, + '公假總計' => 3, + '曠課總計' => 1, + ], + ], /* result */ + null, /* exception */ + ], ]; } @@ -342,6 +402,18 @@ public function testRunQueryIf(): void self::assertEquals([['if(0, 2, 3)' => 3]], $dbrunner->runQuery('', 'SELECT if(0, 2, 3)')); } + public function testRunQueryLeft(): void + { + $dbrunner = new DbRunner(); + + self::assertEquals([['left("abcdef", 3)' => 'abc']], $dbrunner->runQuery('', 'SELECT left("abcdef", 3)')); + self::assertEquals([['left("1234567", 8)' => '1234567']], $dbrunner->runQuery('', 'SELECT left("1234567", 8)')); + self::assertEquals([['left("hello", 2)' => 'he']], $dbrunner->runQuery('', 'SELECT left("hello", 2)')); + self::assertEquals([['left("hello", 0)' => '']], $dbrunner->runQuery('', 'SELECT left("hello", 0)')); + self::assertEquals([['left("hello", 6)' => 'hello']], $dbrunner->runQuery('', 'SELECT left("hello", 6)')); + self::assertEquals([['left(c, 6)' => 'hello']], $dbrunner->runQuery('', 'SELECT left(c, 6) FROM (SELECT \'hello\' AS c)')); + } + public function testRunQuerySum(): void { $dbrunner = new DbRunner(); From ed24b97b252440a13ca74baa2708192cf30838bb Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:17:57 +0800 Subject: [PATCH 5/8] chore(typescript): Upgrade SWC version --- config/packages/sensiolabs_typescript.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/packages/sensiolabs_typescript.yaml b/config/packages/sensiolabs_typescript.yaml index 0eff5b3..56dfa7f 100644 --- a/config/packages/sensiolabs_typescript.yaml +++ b/config/packages/sensiolabs_typescript.yaml @@ -1,2 +1,2 @@ sensiolabs_typescript: - swc_version: v1.7.14 + swc_version: v1.7.40 From 556987a2fc1c3dc34adbf6fe40c065ea037967f8 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:19:01 +0800 Subject: [PATCH 6/8] fix(docker): Change to alpine Debian bookworm does not provide the SQLite version I want (v3.45+). --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0779819..2a653dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # Versions -FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream +FROM dunglas/frankenphp:1-php8.3-alpine AS frankenphp_upstream # Base FrankenPHP image FROM frankenphp_upstream AS frankenphp_base @@ -10,12 +10,14 @@ WORKDIR /app VOLUME /app/var/ # persistent / runtime deps -RUN apt-get update && apt-get install -y --no-install-recommends \ - acl \ - file \ - gettext \ - git \ - && rm -rf /var/lib/apt/lists/* +RUN set -eux; \ + apk add --no-cache \ + acl \ + fcgi \ + file \ + gettext \ + git \ + ; RUN set -eux; \ install-php-extensions \ From 0ff0f1646785509f397d500007a82bb64f43645c Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:21:15 +0800 Subject: [PATCH 7/8] test: Type fix --- tests/Service/DbRunnerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Service/DbRunnerTest.php b/tests/Service/DbRunnerTest.php index 9395424..de52411 100644 --- a/tests/Service/DbRunnerTest.php +++ b/tests/Service/DbRunnerTest.php @@ -72,7 +72,7 @@ public static function hashInvalidProvider(): array } /** - * @return array>|null, class-string<\Throwable>|null}> + * @return array>|null, class-string<\Throwable>|null}> */ public static function runQueryProvider(): array { From 69ecd891e0b95c8db2271510c3a41e189b259643 Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 31 Oct 2024 03:24:08 +0800 Subject: [PATCH 8/8] chore: Upgrade dependencies --- composer.lock | 80 +++++++++++++------------- devenv.lock | 16 +++--- importmap.php | 2 +- package.json | 2 +- pnpm-lock.yaml | 152 ++++++++++++++++++++++++------------------------- 5 files changed, 126 insertions(+), 126 deletions(-) diff --git a/composer.lock b/composer.lock index f6c178e..984dc57 100644 --- a/composer.lock +++ b/composer.lock @@ -1411,12 +1411,12 @@ "source": { "type": "git", "url": "https://github.com/EasyCorp/EasyAdminBundle.git", - "reference": "339a627c9dc79012340c745361ed6d5329404121" + "reference": "b3b8869ebab3269789fd855b42f890497593800e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/339a627c9dc79012340c745361ed6d5329404121", - "reference": "339a627c9dc79012340c745361ed6d5329404121", + "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/b3b8869ebab3269789fd855b42f890497593800e", + "reference": "b3b8869ebab3269789fd855b42f890497593800e", "shasum": "" }, "require": { @@ -1499,7 +1499,7 @@ "type": "github" } ], - "time": "2024-10-28T21:31:57+00:00" + "time": "2024-10-29T18:23:02+00:00" }, { "name": "egulias/email-validator", @@ -3608,12 +3608,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "de74db6d7c9f4ecabf7b4a1a20655e021b034001" + "reference": "c32691c80952990ee151c054f62d09aceeece23b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/de74db6d7c9f4ecabf7b4a1a20655e021b034001", - "reference": "de74db6d7c9f4ecabf7b4a1a20655e021b034001", + "url": "https://api.github.com/repos/symfony/console/zipball/c32691c80952990ee151c054f62d09aceeece23b", + "reference": "c32691c80952990ee151c054f62d09aceeece23b", "shasum": "" }, "require": { @@ -3693,7 +3693,7 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:56:12+00:00" + "time": "2024-10-27T06:46:44+00:00" }, { "name": "symfony/dependency-injection", @@ -6881,12 +6881,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", - "reference": "049a9f3bebe7d4d9572e3d4a86f0fb7fe24fb077" + "reference": "06fa5c812ce91fad1789571f0239906823996cc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/049a9f3bebe7d4d9572e3d4a86f0fb7fe24fb077", - "reference": "049a9f3bebe7d4d9572e3d4a86f0fb7fe24fb077", + "url": "https://api.github.com/repos/symfony/runtime/zipball/06fa5c812ce91fad1789571f0239906823996cc2", + "reference": "06fa5c812ce91fad1789571f0239906823996cc2", "shasum": "" }, "require": { @@ -6952,7 +6952,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2024-10-27T06:46:44+00:00" }, { "name": "symfony/security-bundle", @@ -7494,12 +7494,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/stimulus-bundle.git", - "reference": "60ec83e56c94d441eae0c33d858addf6f1c780dd" + "reference": "2dc5431fd4fd84662615b435af7a0a6affd94f2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stimulus-bundle/zipball/60ec83e56c94d441eae0c33d858addf6f1c780dd", - "reference": "60ec83e56c94d441eae0c33d858addf6f1c780dd", + "url": "https://api.github.com/repos/symfony/stimulus-bundle/zipball/2dc5431fd4fd84662615b435af7a0a6affd94f2d", + "reference": "2dc5431fd4fd84662615b435af7a0a6affd94f2d", "shasum": "" }, "require": { @@ -7556,7 +7556,7 @@ "type": "tidelift" } ], - "time": "2024-10-24T13:23:34+00:00" + "time": "2024-10-28T11:18:16+00:00" }, { "name": "symfony/stopwatch", @@ -9247,12 +9247,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "494f010d29bf86e600fed21ce1d8477b66c475da" + "reference": "75751250cc8b6efd53495dfbdd50a4d424c75caa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/494f010d29bf86e600fed21ce1d8477b66c475da", - "reference": "494f010d29bf86e600fed21ce1d8477b66c475da", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/75751250cc8b6efd53495dfbdd50a4d424c75caa", + "reference": "75751250cc8b6efd53495dfbdd50a4d424c75caa", "shasum": "" }, "require": { @@ -9319,7 +9319,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T14:01:04+00:00" + "time": "2024-10-30T12:17:12+00:00" } ], "packages-dev": [ @@ -9648,12 +9648,12 @@ "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "168ac89555dc3bdd9f37a89dbd38457bef85a8ff" + "reference": "daf0550dc3b67ff56534169181575e24c363caa4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/168ac89555dc3bdd9f37a89dbd38457bef85a8ff", - "reference": "168ac89555dc3bdd9f37a89dbd38457bef85a8ff", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/daf0550dc3b67ff56534169181575e24c363caa4", + "reference": "daf0550dc3b67ff56534169181575e24c363caa4", "shasum": "" }, "require": { @@ -9744,7 +9744,7 @@ "type": "github" } ], - "time": "2024-10-28T21:52:08+00:00" + "time": "2024-10-29T14:53:40+00:00" }, { "name": "masterminds/html5", @@ -10106,12 +10106,12 @@ "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5797c27f1daad0028797475a5dc4c0130c2cde6a" + "reference": "2c264f467a2d1872ae9740d6cc2e1ffeddf4b2f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5797c27f1daad0028797475a5dc4c0130c2cde6a", - "reference": "5797c27f1daad0028797475a5dc4c0130c2cde6a", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2c264f467a2d1872ae9740d6cc2e1ffeddf4b2f5", + "reference": "2c264f467a2d1872ae9740d6cc2e1ffeddf4b2f5", "shasum": "" }, "require": { @@ -10157,7 +10157,7 @@ "type": "github" } ], - "time": "2024-10-29T06:27:12+00:00" + "time": "2024-10-30T19:20:30+00:00" }, { "name": "phpstan/phpstan-doctrine", @@ -10165,12 +10165,12 @@ "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-doctrine.git", - "reference": "f36d43fb20befd1f550481267b74c4f29a0c6d78" + "reference": "813296e18e232d8937fc2823cd987db1d0477ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/f36d43fb20befd1f550481267b74c4f29a0c6d78", - "reference": "f36d43fb20befd1f550481267b74c4f29a0c6d78", + "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/813296e18e232d8937fc2823cd987db1d0477ab1", + "reference": "813296e18e232d8937fc2823cd987db1d0477ab1", "shasum": "" }, "require": { @@ -10229,7 +10229,7 @@ "issues": "https://github.com/phpstan/phpstan-doctrine/issues", "source": "https://github.com/phpstan/phpstan-doctrine/tree/2.0.x" }, - "time": "2024-10-28T14:13:32+00:00" + "time": "2024-10-29T12:20:14+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -10338,12 +10338,12 @@ "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "282a6982af299730790f0583f9662b8dede12ed7" + "reference": "55ff7b7640c14e3daf0f25f65f183855b9950fff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/282a6982af299730790f0583f9662b8dede12ed7", - "reference": "282a6982af299730790f0583f9662b8dede12ed7", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/55ff7b7640c14e3daf0f25f65f183855b9950fff", + "reference": "55ff7b7640c14e3daf0f25f65f183855b9950fff", "shasum": "" }, "require": { @@ -10402,7 +10402,7 @@ "issues": "https://github.com/phpstan/phpstan-symfony/issues", "source": "https://github.com/phpstan/phpstan-symfony/tree/2.0.x" }, - "time": "2024-10-14T03:22:40+00:00" + "time": "2024-10-30T12:08:07+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12696,12 +12696,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "078398ebac9b707438286e8d689b30b5ef1e6602" + "reference": "0228dd1180ee3ef6c85eeb51ddbe89e0eaef7d33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/078398ebac9b707438286e8d689b30b5ef1e6602", - "reference": "078398ebac9b707438286e8d689b30b5ef1e6602", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0228dd1180ee3ef6c85eeb51ddbe89e0eaef7d33", + "reference": "0228dd1180ee3ef6c85eeb51ddbe89e0eaef7d33", "shasum": "" }, "require": { @@ -12770,7 +12770,7 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:50:56+00:00" + "time": "2024-10-27T06:46:44+00:00" }, { "name": "symfony/web-profiler-bundle", diff --git a/devenv.lock b/devenv.lock index af5f509..40623a3 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1730028891, + "lastModified": 1730213537, "owner": "cachix", "repo": "devenv", - "rev": "a337f8862efa9bde348c48a48b5b943f710604dd", + "rev": "5c046eeafd13f7a2b9fc733f70ea17571b24410f", "type": "github" }, "original": { @@ -53,10 +53,10 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729980323, + "lastModified": 1730170245, "owner": "nixos", "repo": "nixpkgs", - "rev": "86e78d3d2084ff87688da662cf78c2af085d8e73", + "rev": "30c9efeef01e2ad4880bff6a01a61dd99536b3c9", "type": "github" }, "original": { @@ -68,10 +68,10 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1729973466, + "lastModified": 1730137625, "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd3e8833d70618c4eea8df06f95b364b016d4950", + "rev": "64b80bfb316b57cdb8919a9110ef63393d74382a", "type": "github" }, "original": { @@ -91,10 +91,10 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1729104314, + "lastModified": 1730302582, "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", "type": "github" }, "original": { diff --git a/importmap.php b/importmap.php index 4d591c1..f647906 100644 --- a/importmap.php +++ b/importmap.php @@ -65,7 +65,7 @@ 'version' => '6.5.6', ], '@codemirror/autocomplete' => [ - 'version' => '6.18.1', + 'version' => '6.18.2', ], '@codemirror/lint' => [ 'version' => '6.8.2', diff --git a/package.json b/package.json index da3e1c2..ad66b80 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "dprint": "^0.47.5", "eslint": "^9.13.0", "globals": "^15.11.0", - "typescript-eslint": "^8.12.1" + "typescript-eslint": "^8.12.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bccc4af..6f8e24d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,13 +45,13 @@ importers: specifier: ^15.11.0 version: 15.11.0 typescript-eslint: - specifier: ^8.12.1 - version: 8.12.1(eslint@9.13.0)(typescript@5.6.3) + specifier: ^8.12.2 + version: 8.12.2(eslint@9.13.0)(typescript@5.6.3) packages: - "@codemirror/autocomplete@6.18.1": + "@codemirror/autocomplete@6.18.2": resolution: { - integrity: sha512-iWHdj/B1ethnHRTwZj+C1obmmuCzquH29EbcKr0qIjA9NfDeBDJ7vs+WOHsFeLeflE4o+dHfYndJloMKHUkWUA==, + integrity: sha512-wJGylKtMFR/Ds6Gh01+OovXE/pncPiKZNNBKuC39pKnH+XK5d9+WsNqcrdxPjFPFTigRBqse0rfxw9UxrfyhPg==, } peerDependencies: "@codemirror/language": ^6.0.0 @@ -302,9 +302,9 @@ packages: integrity: sha512-wz7kjjRRj8/Lty4B+Kr0LN6Ypc/3SymeCCGSbaXp2leH0ZVg/PriNiOwNj4bD4uphI7A8NXS4b6Gl373sfO5mA==, } - "@typescript-eslint/eslint-plugin@8.12.1": + "@typescript-eslint/eslint-plugin@8.12.2": resolution: { - integrity: sha512-gNg/inLRcPoBsKKIe4Vv38SVSOhk4BKWNO0T56sVff33gRqtTpOsrhHtiOKD1lmIOmCtZMPaW2x/h2FlM+sCEg==, + integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: @@ -315,9 +315,9 @@ packages: typescript: optional: true - "@typescript-eslint/parser@8.12.1": + "@typescript-eslint/parser@8.12.2": resolution: { - integrity: sha512-I/I9Bg7qFa8rOgBnUUHIWTgzbB5wVkSLX+04xGUzTcJUtdq/I2uHWR9mbW6qUYJG/UmkuDcTax5JHvoEWOAHOQ==, + integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: @@ -327,15 +327,15 @@ packages: typescript: optional: true - "@typescript-eslint/scope-manager@8.12.1": + "@typescript-eslint/scope-manager@8.12.2": resolution: { - integrity: sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA==, + integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } - "@typescript-eslint/type-utils@8.12.1": + "@typescript-eslint/type-utils@8.12.2": resolution: { - integrity: sha512-zJzrvbDVjIzVKV2TGHcjembEhws8RWXJhmqfO9hS2gRXBN0gDwGhRPEdJ6AZglzfJ+YA1q09EWpSLSXjBJpIMQ==, + integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: @@ -344,15 +344,15 @@ packages: typescript: optional: true - "@typescript-eslint/types@8.12.1": + "@typescript-eslint/types@8.12.2": resolution: { - integrity: sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q==, + integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } - "@typescript-eslint/typescript-estree@8.12.1": + "@typescript-eslint/typescript-estree@8.12.2": resolution: { - integrity: sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw==, + integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: @@ -361,17 +361,17 @@ packages: typescript: optional: true - "@typescript-eslint/utils@8.12.1": + "@typescript-eslint/utils@8.12.2": resolution: { - integrity: sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ==, + integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 - "@typescript-eslint/visitor-keys@8.12.1": + "@typescript-eslint/visitor-keys@8.12.2": resolution: { - integrity: sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw==, + integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } @@ -523,9 +523,9 @@ packages: } engines: { node: ">=10" } - eslint-scope@8.1.0: + eslint-scope@8.2.0: resolution: { - integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==, + integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } @@ -535,9 +535,9 @@ packages: } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } - eslint-visitor-keys@4.1.0: + eslint-visitor-keys@4.2.0: resolution: { - integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==, + integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } @@ -553,9 +553,9 @@ packages: jiti: optional: true - espree@10.2.0: + espree@10.3.0: resolution: { - integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==, + integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } @@ -932,9 +932,9 @@ packages: } engines: { node: ">=8.0" } - ts-api-utils@1.3.0: + ts-api-utils@1.4.0: resolution: { - integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==, + integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==, } engines: { node: ">=16" } peerDependencies: @@ -946,9 +946,9 @@ packages: } engines: { node: ">= 0.8.0" } - typescript-eslint@8.12.1: + typescript-eslint@8.12.2: resolution: { - integrity: sha512-SsKedZnq4TStkrpqnk+OqTnmkC9CkYBRNKjQ965CLpFruGcRkPF5UhKxbcbF6c/m2r6YAgKw/UtQxdlMjh3mug==, + integrity: sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: @@ -994,7 +994,7 @@ packages: engines: { node: ">=10" } snapshots: - "@codemirror/autocomplete@6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)": + "@codemirror/autocomplete@6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)": dependencies: "@codemirror/language": 6.10.3 "@codemirror/state": 6.4.1 @@ -1010,7 +1010,7 @@ snapshots: "@codemirror/lang-sql@6.8.0(@codemirror/view@6.34.1)": dependencies: - "@codemirror/autocomplete": 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) + "@codemirror/autocomplete": 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) "@codemirror/language": 6.10.3 "@codemirror/state": 6.4.1 "@lezer/common": 1.2.3 @@ -1093,7 +1093,7 @@ snapshots: dependencies: ajv: 6.12.6 debug: 4.3.7 - espree: 10.2.0 + espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 @@ -1171,30 +1171,30 @@ snapshots: "@types/webpack-env@1.18.5": {} - "@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)": + "@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)": dependencies: "@eslint-community/regexpp": 4.12.1 - "@typescript-eslint/parser": 8.12.1(eslint@9.13.0)(typescript@5.6.3) - "@typescript-eslint/scope-manager": 8.12.1 - "@typescript-eslint/type-utils": 8.12.1(eslint@9.13.0)(typescript@5.6.3) - "@typescript-eslint/utils": 8.12.1(eslint@9.13.0)(typescript@5.6.3) - "@typescript-eslint/visitor-keys": 8.12.1 + "@typescript-eslint/parser": 8.12.2(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/scope-manager": 8.12.2 + "@typescript-eslint/type-utils": 8.12.2(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/utils": 8.12.2(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/visitor-keys": 8.12.2 eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - supports-color - "@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3)": + "@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3)": dependencies: - "@typescript-eslint/scope-manager": 8.12.1 - "@typescript-eslint/types": 8.12.1 - "@typescript-eslint/typescript-estree": 8.12.1(typescript@5.6.3) - "@typescript-eslint/visitor-keys": 8.12.1 + "@typescript-eslint/scope-manager": 8.12.2 + "@typescript-eslint/types": 8.12.2 + "@typescript-eslint/typescript-estree": 8.12.2(typescript@5.6.3) + "@typescript-eslint/visitor-keys": 8.12.2 debug: 4.3.7 eslint: 9.13.0 optionalDependencies: @@ -1202,54 +1202,54 @@ snapshots: transitivePeerDependencies: - supports-color - "@typescript-eslint/scope-manager@8.12.1": + "@typescript-eslint/scope-manager@8.12.2": dependencies: - "@typescript-eslint/types": 8.12.1 - "@typescript-eslint/visitor-keys": 8.12.1 + "@typescript-eslint/types": 8.12.2 + "@typescript-eslint/visitor-keys": 8.12.2 - "@typescript-eslint/type-utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)": + "@typescript-eslint/type-utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)": dependencies: - "@typescript-eslint/typescript-estree": 8.12.1(typescript@5.6.3) - "@typescript-eslint/utils": 8.12.1(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/typescript-estree": 8.12.2(typescript@5.6.3) + "@typescript-eslint/utils": 8.12.2(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - eslint - supports-color - "@typescript-eslint/types@8.12.1": {} + "@typescript-eslint/types@8.12.2": {} - "@typescript-eslint/typescript-estree@8.12.1(typescript@5.6.3)": + "@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)": dependencies: - "@typescript-eslint/types": 8.12.1 - "@typescript-eslint/visitor-keys": 8.12.1 + "@typescript-eslint/types": 8.12.2 + "@typescript-eslint/visitor-keys": 8.12.2 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - supports-color - "@typescript-eslint/utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)": + "@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)": dependencies: "@eslint-community/eslint-utils": 4.4.1(eslint@9.13.0) - "@typescript-eslint/scope-manager": 8.12.1 - "@typescript-eslint/types": 8.12.1 - "@typescript-eslint/typescript-estree": 8.12.1(typescript@5.6.3) + "@typescript-eslint/scope-manager": 8.12.2 + "@typescript-eslint/types": 8.12.2 + "@typescript-eslint/typescript-estree": 8.12.2(typescript@5.6.3) eslint: 9.13.0 transitivePeerDependencies: - supports-color - typescript - "@typescript-eslint/visitor-keys@8.12.1": + "@typescript-eslint/visitor-keys@8.12.2": dependencies: - "@typescript-eslint/types": 8.12.1 + "@typescript-eslint/types": 8.12.2 eslint-visitor-keys: 3.4.3 acorn-jsx@5.3.2(acorn@8.14.0): @@ -1305,7 +1305,7 @@ snapshots: codemirror@6.0.1(@lezer/common@1.2.3): dependencies: - "@codemirror/autocomplete": 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) + "@codemirror/autocomplete": 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) "@codemirror/commands": 6.7.1 "@codemirror/language": 6.10.3 "@codemirror/lint": 6.8.2 @@ -1352,14 +1352,14 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-scope@8.1.0: + eslint-scope@8.2.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.1.0: {} + eslint-visitor-keys@4.2.0: {} eslint@9.13.0: dependencies: @@ -1380,9 +1380,9 @@ snapshots: cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.1.0 - eslint-visitor-keys: 4.1.0 - espree: 10.2.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -1401,11 +1401,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@10.2.0: + espree@10.3.0: dependencies: acorn: 8.14.0 acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 4.1.0 + eslint-visitor-keys: 4.2.0 esquery@1.6.0: dependencies: @@ -1613,7 +1613,7 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.6.3): + ts-api-utils@1.4.0(typescript@5.6.3): dependencies: typescript: 5.6.3 @@ -1621,11 +1621,11 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.12.1(eslint@9.13.0)(typescript@5.6.3): + typescript-eslint@8.12.2(eslint@9.13.0)(typescript@5.6.3): dependencies: - "@typescript-eslint/eslint-plugin": 8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) - "@typescript-eslint/parser": 8.12.1(eslint@9.13.0)(typescript@5.6.3) - "@typescript-eslint/utils": 8.12.1(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/eslint-plugin": 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/parser": 8.12.2(eslint@9.13.0)(typescript@5.6.3) + "@typescript-eslint/utils": 8.12.2(eslint@9.13.0)(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: