From 372d91bf4964a382566ad4a0e8ead3c7d3212090 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 31 Aug 2026 21:14:04 +0000 Subject: [PATCH] Pin fastapi-vue minimum patch version to that of fastapi-vue-setup when ran, to force upgrades. --- fastapi_vue_setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fastapi_vue_setup.py b/fastapi_vue_setup.py index d602948..3eb5e71 100644 --- a/fastapi_vue_setup.py +++ b/fastapi_vue_setup.py @@ -1596,11 +1596,11 @@ def cmd_setup(args: argparse.Namespace) -> int: print("✅ Created .gitignore") # === Add dependencies using uv === - # Pin fastapi-vue to the same major.minor as this setup tool (both are released - # from the same tags). Patch/dev releases may deviate, which also keeps this - # resolvable when running a development version of fastapi-vue-setup. - mm = re.match(r"(\d+)\.(\d+)", version) - fastapi_vue_req = f"fastapi-vue~={mm[1]}.{mm[2]}.0" if mm else "fastapi-vue" + # Pin fastapi-vue to the same major.minor.patch as this setup tool (both are + # released from the same tags). This makes freshly set up projects request the + # matching patch release directly, while `~=` still allows compatible updates. + mmp = re.match(r"(\d+)\.(\d+)\.(\d+)", version) + fastapi_vue_req = f"fastapi-vue~={mmp[1]}.{mmp[2]}.{mmp[3]}" if mmp else "fastapi-vue" if dry: print(f"📦 Would add: fastapi[standard], {fastapi_vue_req}") else: