From f7f1bd129a65cd274b7817972f167306b092168c Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 24 Apr 2026 20:26:23 -0400 Subject: [PATCH] web: match version numbers with python --- justfile | 3 ++- web/src/lib/queryPersister.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 65f6e4d..2d81f05 100644 --- a/justfile +++ b/justfile @@ -28,9 +28,10 @@ down: logs: docker compose logs -f -# Set version in pyproject.toml +# Set version in pyproject.toml and web/package.json version ver: uv run python -c "import re, pathlib; p=pathlib.Path('pyproject.toml'); p.write_text(re.sub(r'^version = \".*\"', 'version = \"{{ ver }}\"', p.read_text(), count=1, flags=re.M))" + cd web && npm version {{ ver }} --no-git-tag-version --allow-same-version uv lock # Tag and push a release diff --git a/web/src/lib/queryPersister.ts b/web/src/lib/queryPersister.ts index a0bb0f0..f4c0761 100644 --- a/web/src/lib/queryPersister.ts +++ b/web/src/lib/queryPersister.ts @@ -1,7 +1,7 @@ import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister"; +import { version } from "../../package.json"; -// Bump on breaking cache-shape changes to invalidate older clients. -const BUSTER = "atbbs-v2"; +const BUSTER = version; const MAX_AGE = 24 * 60 * 60 * 1000; const persister = createSyncStoragePersister({ -- 2.51.2