Pin fastapi-vue minimum patch version to that of fastapi-vue-setup when ran, to force upgrades.

This commit is contained in:
2026-08-31 21:14:04 +00:00
parent b0b216b784
commit 372d91bf49
+5 -5
View File
@@ -1596,11 +1596,11 @@ def cmd_setup(args: argparse.Namespace) -> int:
print("✅ Created .gitignore") print("✅ Created .gitignore")
# === Add dependencies using uv === # === Add dependencies using uv ===
# Pin fastapi-vue to the same major.minor as this setup tool (both are released # Pin fastapi-vue to the same major.minor.patch as this setup tool (both are
# from the same tags). Patch/dev releases may deviate, which also keeps this # released from the same tags). This makes freshly set up projects request the
# resolvable when running a development version of fastapi-vue-setup. # matching patch release directly, while `~=` still allows compatible updates.
mm = re.match(r"(\d+)\.(\d+)", version) mmp = re.match(r"(\d+)\.(\d+)\.(\d+)", version)
fastapi_vue_req = f"fastapi-vue~={mm[1]}.{mm[2]}.0" if mm else "fastapi-vue" fastapi_vue_req = f"fastapi-vue~={mmp[1]}.{mmp[2]}.{mmp[3]}" if mmp else "fastapi-vue"
if dry: if dry:
print(f"📦 Would add: fastapi[standard], {fastapi_vue_req}") print(f"📦 Would add: fastapi[standard], {fastapi_vue_req}")
else: else: