Compare commits

...

2 Commits

Author SHA1 Message Date
18d3789836 deps: types-requests 20261006, shared_preferences 2.5.6, sqflite 2.4.4+1, @vitejs/plugin-react 6.1.2, typescript-eslint 8.71.1
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (flutter, flutter-analyze, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint,flutter-analyze) (push) Waiting to run
Tests / test (push) Waiting to run
Tests / lock-popup-safety (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (0) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (1) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (2) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (3) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (4) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (5) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (6) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (7) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (8) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (9) (push) Waiting to run
Tests / flutter-coverage (push) Blocked by required conditions
Tests / web-coverage (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-06 20:58:57 +02:00
d1817675c4 earner-bonus: add the new modules, unit and tests missed by 7851d59
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-06 20:44:01 +02:00
10 changed files with 386 additions and 80 deletions

View File

@ -47,7 +47,12 @@ of that derivation gets wiped by the next reset -- that is how a 00:02 workout
lost its hours on 2026-09-13. A new bonus source is an `Earner` in the
registry, never code here: the reset includes it as a term, and the live pass
(`apply_flat_bonuses_if_new`, stamped `<name>_bonus_date` in
`shutdown_base.json`) picks it up for flat earners. The base is the registry
`shutdown_base.json`) picks it up for flat earners. That pass runs the moment
a gate writes its ledger: `earner-bonus.path` (rendered from the registry by
`_earner_units`, re-synced by every `--sync-only` pass) starts
`earner-bonus.service` (`--apply-bonuses`). The 15-minute `workout-sync` is
only the fallback. The reset and the pass hold `_bonus_lock`, since three
processes can run them at once. The base is the registry
constant, not the state file: the file once persisted `base_*_hour`, which
made the code's default dead.

11
earner-bonus.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Apply newly earned flat shutdown bonuses (LeetCode, reading, Anki, ...)
[Service]
Type=oneshot
# Started by earner-bonus.path the moment a gate writes its ledger. Only the
# flat-bonus pass: no phone sync, no Tk, no lock screen, so a solve moves the
# shutdown time within seconds instead of at the next 15-minute workout-sync.
# The path unit itself is generated from the earned_time registry
# (screen_locker._earner_units), so it is not a file in this repo.
ExecStart=/usr/bin/python3 -m screen_locker.screen_lock --apply-bonuses

View File

@ -21,4 +21,4 @@ pytest-xdist==3.8.0
# module imports it itself, so it is declared rather than assumed.
requests==2.34.2
ruff==0.16.10
types-requests==2.33.0.20260906
types-requests==2.33.0.20261006

View File

@ -0,0 +1,38 @@
"""One writer at a time for the shutdown bonus state.
The daily reset and the live bonus pass both read ``shutdown_base.json``,
push ``/etc/shutdown-schedule.conf`` with a read-add-write and stamp the file.
They run from three processes -- the locker at login, the 15-minute
``workout-sync`` pass and the ledger-triggered ``earner-bonus`` pass -- so two
of them can see the same unstamped earner and each add its time. Holding this
lock across check, write and stamp makes the second one see the stamp.
A dedicated file, not the state file itself: ``_save_state`` truncates that.
"""
from __future__ import annotations
from contextlib import contextmanager
import fcntl
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterator
from pathlib import Path
__all__ = ["bonus_lock"]
@contextmanager
def bonus_lock(state_file: Path) -> Iterator[None]:
"""Hold an exclusive lock beside *state_file* for the ``with`` body.
Blocks until any other holder is done; the passes it serialises take a
second or two, so waiting is cheaper than skipping a bonus.
"""
with state_file.with_suffix(".lock").open("a") as handle:
fcntl.flock(handle, fcntl.LOCK_EX)
try:
yield
finally:
fcntl.flock(handle, fcntl.LOCK_UN)

View File

@ -0,0 +1,99 @@
"""The ``earner-bonus.path`` unit: apply a flat bonus the moment it is earned.
The live bonus pass used to run only on the 15-minute ``workout-sync`` timer,
so a LeetCode solve could wait a quarter of an hour for its shutdown hour
while the gaming hour landed in seconds (2026-10-06). The path unit watches
every flat earner's ledger and starts ``earner-bonus.service``
(``--apply-bonuses``) when a gate writes one.
The watch list is rendered from the ``earned_time`` registry, not kept by
hand. Re-pinning the registry is a pip install that never re-runs the
installer, so :func:`sync_path_unit` -- called from every ``--sync-only``
pass -- rewrites an installed unit that has drifted from the registry. A new
earner is watched within 15 minutes with no step to remember.
``PathChanged=`` and not ``PathModified=``: the gates write a temp file and
rename it into place, which ``PathChanged`` sees, including the first write
into a directory that does not exist yet. ``PathModified`` would also fire
mid-write on a gate that writes in place, and a half-written ledger reads as
"could not check".
"""
from __future__ import annotations
import logging
from pathlib import Path
import subprocess
import sys
from typing import Final
from screen_locker._earned import flat_earners, ledger_file
__all__ = ["PATH_UNIT_NAME", "USER_UNIT_DIR", "render_path_unit", "sync_path_unit"]
_logger = logging.getLogger(__name__)
PATH_UNIT_NAME: Final = "earner-bonus.path"
USER_UNIT_DIR: Final = Path.home() / ".config" / "systemd" / "user"
_HEADER: Final = """\
# Generated by screen_locker._earner_units from the earned_time registry.
# Do not edit: the next --sync-only pass rewrites a unit that has drifted.
[Unit]
Description=Apply a flat earner's shutdown bonus as soon as its ledger changes
[Path]
"""
_FOOTER: Final = """
[Install]
WantedBy=default.target
"""
def render_path_unit() -> str:
"""The unit text: one ``PathChanged=`` per flat earner's ledger."""
watches = "".join(f"PathChanged={ledger_file(e)}\n" for e in flat_earners())
return _HEADER + watches + _FOOTER
def sync_path_unit(unit_dir: Path | None = None) -> bool:
"""Rewrite an installed path unit that no longer matches the registry.
An absent unit is left absent: it was never installed, or it was removed
on purpose, and installing units is the installer's job. *unit_dir*
defaults to :data:`USER_UNIT_DIR`, read at call time.
Returns True if the unit was rewritten.
"""
unit = (unit_dir or USER_UNIT_DIR) / PATH_UNIT_NAME
if not unit.is_file():
return False
wanted = render_path_unit()
try:
if unit.read_text(encoding="utf-8") == wanted:
return False
unit.write_text(wanted, encoding="utf-8")
subprocess.run(
["/usr/bin/systemctl", "--user", "daemon-reload"],
check=True,
capture_output=True,
)
except (OSError, subprocess.CalledProcessError) as exc:
_logger.warning(
"%s differs from the earner registry and could not be refreshed: %s"
" -- a newly registered earner waits for the 15-minute sync",
unit,
exc,
)
return False
_logger.warning(
"%s was out of date with the earner registry; rewritten and reloaded",
unit,
)
return True
if __name__ == "__main__":
# install_systemd.sh / arm.sh: write the unit into the given directory.
target = Path(sys.argv[1]) / PATH_UNIT_NAME
target.write_text(render_path_unit(), encoding="utf-8")

View File

@ -0,0 +1,153 @@
"""Tests for the ledger watch (``_earner_units``) and the bonus lock."""
from __future__ import annotations
import fcntl
import subprocess
from typing import TYPE_CHECKING
from unittest.mock import MagicMock, patch
import pytest
from screen_locker import _earner_units
from screen_locker._bonus_lock import bonus_lock
from screen_locker._earned import flat_earners, ledger_file
from screen_locker._shutdown_base import (
apply_flat_bonuses_if_new,
reset_to_base_if_new_day,
)
if TYPE_CHECKING:
from pathlib import Path
def _installed(unit_dir: Path, text: str) -> Path:
"""Write *text* as the installed path unit and return its path."""
unit_dir.mkdir(parents=True, exist_ok=True)
unit = unit_dir / _earner_units.PATH_UNIT_NAME
unit.write_text(text, encoding="utf-8")
return unit
class TestRenderPathUnit:
"""The unit watches exactly the registry's flat ledgers."""
def test_one_path_changed_per_flat_earner(self) -> None:
"""Every flat earner's ledger is watched, in registry order."""
lines = _earner_units.render_path_unit().splitlines()
watched = [ln.removeprefix("PathChanged=") for ln in lines if "=" in ln]
expected = [str(ledger_file(e)) for e in flat_earners()]
assert [w for w in watched if w in expected] == expected
assert sum(ln.startswith("PathChanged=") for ln in lines) == len(expected)
def test_never_path_modified(self) -> None:
"""PathModified would fire on a half-written ledger."""
assert "PathModified" not in _earner_units.render_path_unit()
def test_is_installable(self) -> None:
"""An [Install] section, so `enable` has a target."""
assert "[Install]\nWantedBy=default.target" in _earner_units.render_path_unit()
class TestSyncPathUnit:
"""The sync pass repairs a drifted unit and leaves an absent one alone."""
def test_absent_unit_is_not_installed(self, tmp_path: Path) -> None:
"""Removed on purpose stays removed."""
with patch.object(_earner_units.subprocess, "run") as run:
assert _earner_units.sync_path_unit(tmp_path) is False
run.assert_not_called()
assert not (tmp_path / _earner_units.PATH_UNIT_NAME).exists()
def test_defaults_to_the_patched_user_unit_dir(self) -> None:
"""No argument reads USER_UNIT_DIR at call time (conftest: empty)."""
assert _earner_units.sync_path_unit() is False
def test_current_unit_is_left_alone(self, tmp_path: Path) -> None:
"""No drift, no write, no daemon-reload."""
_installed(tmp_path, _earner_units.render_path_unit())
with patch.object(_earner_units.subprocess, "run") as run:
assert _earner_units.sync_path_unit(tmp_path) is False
run.assert_not_called()
def test_drifted_unit_is_rewritten_and_reloaded(
self, tmp_path: Path, caplog: pytest.LogCaptureFixture
) -> None:
"""A missing watch is restored, systemd reloaded, and it says so."""
unit = _installed(tmp_path, "[Path]\nPathChanged=/old\n")
with patch.object(_earner_units.subprocess, "run") as run:
assert _earner_units.sync_path_unit(tmp_path) is True
assert unit.read_text(encoding="utf-8") == _earner_units.render_path_unit()
run.assert_called_once_with(
["/usr/bin/systemctl", "--user", "daemon-reload"],
check=True,
capture_output=True,
)
assert "out of date" in caplog.text
def test_failed_reload_is_loud(
self, tmp_path: Path, caplog: pytest.LogCaptureFixture
) -> None:
"""A reload that fails is a warning, not a silent False."""
_installed(tmp_path, "stale")
err = subprocess.CalledProcessError(1, "systemctl")
with patch.object(_earner_units.subprocess, "run", side_effect=err):
assert _earner_units.sync_path_unit(tmp_path) is False
assert "could not be refreshed" in caplog.text
def test_unreadable_unit_is_loud(
self, tmp_path: Path, caplog: pytest.LogCaptureFixture
) -> None:
"""An OSError reading the unit is a warning too."""
_installed(tmp_path, "stale")
with patch.object(
_earner_units.Path, "read_text", side_effect=OSError("denied")
):
assert _earner_units.sync_path_unit(tmp_path) is False
assert "denied" in caplog.text
class TestBonusLock:
"""Both bonus writers hold one exclusive lock beside the state file."""
def test_takes_and_releases_an_exclusive_lock(self, tmp_path: Path) -> None:
"""LOCK_EX for the body, LOCK_UN afterwards, on the .lock file."""
state = tmp_path / "shutdown_base.json"
with patch.object(fcntl, "flock") as flock:
with bonus_lock(state):
assert flock.call_args.args[1] == fcntl.LOCK_EX
assert flock.call_args.args[1] == fcntl.LOCK_UN
assert (tmp_path / "shutdown_base.lock").exists()
def test_released_when_the_body_raises(self, tmp_path: Path) -> None:
"""An exception inside still unlocks."""
with patch.object(fcntl, "flock") as flock:
with pytest.raises(RuntimeError), bonus_lock(tmp_path / "s.json"):
raise RuntimeError
assert flock.call_args.args[1] == fcntl.LOCK_UN
def test_held_by_the_live_pass(self, tmp_path: Path) -> None:
"""apply_flat_bonuses_if_new runs under the lock."""
state = tmp_path / "s.json"
seen: list[bool] = []
with (
patch(
"screen_locker._shutdown_base.bonus_lock",
return_value=MagicMock(__enter__=lambda _s: seen.append(True)),
) as lock,
patch("screen_locker._shutdown_base.flat_earners", return_value=()),
):
apply_flat_bonuses_if_new(state, object())
lock.assert_called_once_with(state)
assert seen == [True]
def test_held_by_the_daily_reset(self, tmp_path: Path) -> None:
"""reset_to_base_if_new_day runs under the lock."""
state = tmp_path / "s.json"
with (
patch("screen_locker._shutdown_base.bonus_lock") as lock,
patch("screen_locker._shutdown_base._reset", return_value=True) as reset,
):
assert reset_to_base_if_new_day(state, object()) is True
lock.assert_called_once_with(state)
reset.assert_called_once_with(state, reset.call_args.args[1], None, None)

View File

@ -709,10 +709,10 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: c3025c5534b01739267eb7d76959bbc25a6d10f6988e1c2a3036940133dd10bf
sha256: "1e85e0dccf5b4a016077fea7dfbb4a7cb39c759ac1596fcf60c06deadb7da91f"
url: "https://pub.dev"
source: hosted
version: "2.5.5"
version: "2.5.6"
shared_preferences_android:
dependency: transitive
description:
@ -778,10 +778,10 @@ packages:
dependency: "direct main"
description:
name: sqflite
sha256: "54ad23e2a79c846b596b6c56cdd9c867ea58c288258402316b602f78df0cbfe0"
sha256: "7419d02d128023f38586481c81e14e5692167f75b7f411a914b1eb50d28c010e"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.4+1"
sqflite_android:
dependency: transitive
description:

View File

@ -33,8 +33,8 @@ dependencies:
path: 1.9.1
path_provider: 2.1.6
permission_handler: 13.0.2
shared_preferences: 2.5.5
sqflite: 2.4.4
shared_preferences: 2.5.6
sqflite: 2.4.4+1
# Linux desktop has no sqflite plugin; the FFI factory drives the same
# schema (and already backed the test suite before the desktop target).
sqflite_common_ffi: 2.4.3

140
web/package-lock.json generated
View File

@ -20,7 +20,7 @@
"@types/node": "26.6.4",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@vitejs/plugin-react": "6.1.1",
"@vitejs/plugin-react": "6.1.2",
"@vitest/coverage-v8": "5.0.3",
"eslint": "10.12.0",
"eslint-plugin-react-hooks": "7.1.1",
@ -28,7 +28,7 @@
"globals": "17.13.0",
"jsdom": "30.1.2",
"typescript": "6.0.3",
"typescript-eslint": "8.71.0",
"typescript-eslint": "8.71.1",
"vite": "8.3.2",
"vitest": "5.0.3"
}
@ -1281,17 +1281,17 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.0.tgz",
"integrity": "sha512-pqcS9c1HxZTHt7End4nXqd0s5lJrrFzrgCkKFJrsbUnaL6M3+6oBFZaslg6Gjsl3argl2DDRFROnXARaZ2e4Nw==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.1.tgz",
"integrity": "sha512-nNlBf6HuotqMgZvSkWD5hNdemiBIxQ2NmrlgfcUIeZRs+BbakjscCQRq/Hb74EFVnFiSWWdL12JruqwBy3ERDw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.12.2",
"@typescript-eslint/scope-manager": "8.71.0",
"@typescript-eslint/type-utils": "8.71.0",
"@typescript-eslint/utils": "8.71.0",
"@typescript-eslint/visitor-keys": "8.71.0",
"@typescript-eslint/scope-manager": "8.71.1",
"@typescript-eslint/type-utils": "8.71.1",
"@typescript-eslint/utils": "8.71.1",
"@typescript-eslint/visitor-keys": "8.71.1",
"ignore": "^7.0.5",
"natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0"
@ -1304,15 +1304,15 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"@typescript-eslint/parser": "^8.71.0",
"@typescript-eslint/parser": "^8.71.1",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
"version": "7.0.11",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.11.tgz",
"integrity": "sha512-YChdK5txDjwGUvgR7oCJcLGkwi3LDh8Zx8tS7ndYciLEg/oOCL26VUBSUEtgS7EjiybcBqFxh5j0rAdDX7/bbg==",
"version": "7.0.12",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz",
"integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==",
"dev": true,
"license": "MIT",
"engines": {
@ -1320,16 +1320,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.0.tgz",
"integrity": "sha512-CG4nPk1f2zc8yw4pALqHsFYH2hdo+h1T9daSp21+Hnxi9LOE3GT9hAfTKJCBXVNM2GmYs1eMEP615wPoeOgk3A==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.1.tgz",
"integrity": "sha512-oM/5sAqz/l1v/zYK1qTOPrn2+JIrBGC1V6uNYucRO5gh6eT9vWJ/RhPbGE59byvZEUQ4VP6XkLBaS5Jti5jpvw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.71.0",
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/typescript-estree": "8.71.0",
"@typescript-eslint/visitor-keys": "8.71.0",
"@typescript-eslint/scope-manager": "8.71.1",
"@typescript-eslint/types": "8.71.1",
"@typescript-eslint/typescript-estree": "8.71.1",
"@typescript-eslint/visitor-keys": "8.71.1",
"debug": "^4.4.3"
},
"engines": {
@ -1345,14 +1345,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.0.tgz",
"integrity": "sha512-aABjw5rjBacYONVPaPiWOCjJu0vEF4a25iQuodlmQYL1trtLZ0X/y+2Vzl3BKI1odM4LnwLE1oUDXYp1wzx1TQ==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.1.tgz",
"integrity": "sha512-Oijc9RUsohHjncg6iGi7gCtjnEjYt9FWv9u6ygK8uKcHK5eLjLAkqERQ9BaytbpceOFdk6kifPCS/zAZE+A99g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.71.0",
"@typescript-eslint/types": "^8.71.0",
"@typescript-eslint/tsconfig-utils": "^8.71.1",
"@typescript-eslint/types": "^8.71.1",
"debug": "^4.4.3"
},
"engines": {
@ -1367,14 +1367,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.0.tgz",
"integrity": "sha512-gWF0BhUcnjZxSpLE8ngS/59n2SB0J3YqRxvX1+2aoRJk9hNtHSLOV+TcarFiOr5ipXm3yc1QrI4c9YZc8zyCxw==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.1.tgz",
"integrity": "sha512-1YUDZXdTnXLlob03SFHBipdyMBsDVm7zoSz0ytTJ39dk5J1TgsTK03VlR/dLXG/RLLUrPcYbD4rp23BmHxHP0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/visitor-keys": "8.71.0"
"@typescript-eslint/types": "8.71.1",
"@typescript-eslint/visitor-keys": "8.71.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1385,9 +1385,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.0.tgz",
"integrity": "sha512-Z1UlWHADEK2Mlb9NpWfDeSjqoZ5EyrOv4R3eQpbkzqn/EwaIdOpXXupEA1+0ZIOSJSZZDBHG0BrQyN8zUG6Pwg==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.1.tgz",
"integrity": "sha512-oTvkml5SxXhgg+WWKhod5qWQICDXtOB+/Hi9VdPKFAANJ2b7YOgMffgvzXuqog7R6A/JtrzRf128dsxummyWhg==",
"dev": true,
"license": "MIT",
"engines": {
@ -1402,15 +1402,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.0.tgz",
"integrity": "sha512-i8uO1qbdxeKgRnS5sCRt6On3/nfo2d2DwQe3Yvjx543zLy7r8ySqRuPPiIIXAhS03U0v5NfAFx+rUgxFzKKwNw==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.1.tgz",
"integrity": "sha512-kH3t3jZCYv2PZSBEWPKTariLrCaoF1CLoPitYFBJOhAGEwWnSRAtGEifrfrpBa4K9JlwWNZotgA5w3/wLSk/FQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/typescript-estree": "8.71.0",
"@typescript-eslint/utils": "8.71.0",
"@typescript-eslint/types": "8.71.1",
"@typescript-eslint/typescript-estree": "8.71.1",
"@typescript-eslint/utils": "8.71.1",
"debug": "^4.4.3",
"ts-api-utils": "^2.5.0"
},
@ -1427,9 +1427,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.0.tgz",
"integrity": "sha512-cJ4OoxPGWvFnBTnSZyaU+qJzGTqPTGJY+gDchj6cRyLRdmIdt4rcsE4twj+zPfrNiWuVi38wijHzShL++Z9atQ==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.1.tgz",
"integrity": "sha512-ybYnPTUwg3VQQOFEiBPLs8Jxl1ry2vXdn1kVKguomBbvxpetdu3MKTNDqFNUrlG8ylP9MpZosmXMFYlGQHk1oQ==",
"dev": true,
"license": "MIT",
"engines": {
@ -1441,16 +1441,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.0.tgz",
"integrity": "sha512-PEEF4G5sLLWAS5BpPrUvms4ySZkiBQQZM4z+3ReI46axK5Vqr/vXBQatJQIZZOYdGyPUAKTtsrWzpqKuU+3DEw==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.1.tgz",
"integrity": "sha512-pSKSEK1JJpHs6KiKVtABCE4iJK5d7FLFzDXQNBQ2oRY7LEd3UwOt3TZemTgu9syTIf56dJWlTn/pdmrO9oKUXQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/project-service": "8.71.0",
"@typescript-eslint/tsconfig-utils": "8.71.0",
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/visitor-keys": "8.71.0",
"@typescript-eslint/project-service": "8.71.1",
"@typescript-eslint/tsconfig-utils": "8.71.1",
"@typescript-eslint/types": "8.71.1",
"@typescript-eslint/visitor-keys": "8.71.1",
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
@ -1482,16 +1482,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.0.tgz",
"integrity": "sha512-pKR/tEMVrXZG23UFKUn5BQf3zfmfk7KQceI2cGzywZ5nxM5Eu3hEJU1utjWzydtzBbcJAQhHN8iPCxobHpPcZQ==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.1.tgz",
"integrity": "sha512-CBjT6gfAz3DW2j9Q4moFnqt208Aq+506sVGXfpRcyAeqn0EpayL0mjdWoCO2t3RC7GewNrFxdeehuEaPg6DMzQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/scope-manager": "8.71.0",
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/typescript-estree": "8.71.0"
"@typescript-eslint/scope-manager": "8.71.1",
"@typescript-eslint/types": "8.71.1",
"@typescript-eslint/typescript-estree": "8.71.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1506,13 +1506,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.0.tgz",
"integrity": "sha512-8eQ9R218XORK+KLosnf4bu/QsUXvUyVwTbArg7/0NMB1Pu87OJKvj4nhFblkYE8gQV73mW1dx1ptlPCkwRGa7A==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.1.tgz",
"integrity": "sha512-0GxiUGqMU0qXJt58cBsiG3DP8lUmBaFo2vChtUX+CT7PnR3v/VGLLrzVP4K9r1lNiZXjHYefMBbPunplr09v6w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.71.0",
"@typescript-eslint/types": "8.71.1",
"eslint-visitor-keys": "^5.0.0"
},
"engines": {
@ -1524,9 +1524,9 @@
}
},
"node_modules/@vitejs/plugin-react": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.1.tgz",
"integrity": "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz",
"integrity": "sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -1538,7 +1538,7 @@
"peerDependencies": {
"@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
"babel-plugin-react-compiler": "^1.0.0",
"oxc-transform-react": "^0.145.0",
"oxc-transform-react": "^0.152.0",
"vite": "^8.0.0"
},
"peerDependenciesMeta": {
@ -3520,16 +3520,16 @@
}
},
"node_modules/typescript-eslint": {
"version": "8.71.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.0.tgz",
"integrity": "sha512-fBdHYiqQ14RW6mOMXD14Svn82ZsCYAoQSzGRzyEjR59S5A2Krh/l7fGTOQ7iCr8gGy/mHVXtEF7s5fgjEdV0Pw==",
"version": "8.71.1",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.1.tgz",
"integrity": "sha512-oiNVPC3/NbV1FpaHU07l8O6ynqG9v4PAiW2WvTrAmZdR0f2HI/gE668ElMLCK7Xbsu5k2fK5C4fXNiq05j7/nQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.71.0",
"@typescript-eslint/parser": "8.71.0",
"@typescript-eslint/typescript-estree": "8.71.0",
"@typescript-eslint/utils": "8.71.0"
"@typescript-eslint/eslint-plugin": "8.71.1",
"@typescript-eslint/parser": "8.71.1",
"@typescript-eslint/typescript-estree": "8.71.1",
"@typescript-eslint/utils": "8.71.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"

View File

@ -26,7 +26,7 @@
"@types/node": "26.6.4",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@vitejs/plugin-react": "6.1.1",
"@vitejs/plugin-react": "6.1.2",
"@vitest/coverage-v8": "5.0.3",
"eslint": "10.12.0",
"eslint-plugin-react-hooks": "7.1.1",
@ -34,7 +34,7 @@
"globals": "17.13.0",
"jsdom": "30.1.2",
"typescript": "6.0.3",
"typescript-eslint": "8.71.0",
"typescript-eslint": "8.71.1",
"vite": "8.3.2",
"vitest": "5.0.3"
}