v0.4.23: fix #178 stale version stamp, fix #260 add .html to DOC_EXTENSIONS

This commit is contained in:
Safi
2026-04-18 10:47:37 +01:00
parent f8a5328197
commit d67436c065
5 changed files with 25 additions and 3 deletions
+17
View File
@@ -23,6 +23,19 @@ def _check_skill_version(skill_dst: Path) -> None:
if installed != __version__:
print(f" warning: skill is from graphify {installed}, package is {__version__}. Run 'graphify install' to update.")
def _refresh_all_version_stamps() -> None:
"""After a successful install, update .graphify_version in all other known skill dirs.
Prevents stale-version warnings from platforms that were installed previously
but not explicitly re-installed during this upgrade.
"""
for cfg in _PLATFORM_CONFIG.values():
vf = Path.home() / cfg["skill_dst"]
vf = vf.parent / ".graphify_version"
if vf.exists():
vf.write_text(__version__, encoding="utf-8")
_SETTINGS_HOOK = {
"matcher": "Glob|Grep",
"hooks": [
@@ -159,6 +172,10 @@ def install(platform: str = "claude") -> None:
if platform == "opencode":
_install_opencode_plugin(Path("."))
# Refresh version stamps in all other previously-installed skill dirs so
# stale-version warnings don't fire for platforms not explicitly re-installed.
_refresh_all_version_stamps()
print()
print("Done. Open your AI coding assistant and type:")
print()
+1 -1
View File
@@ -19,7 +19,7 @@ class FileType(str, Enum):
_MANIFEST_PATH = "graphify-out/manifest.json"
CODE_EXTENSIONS = {'.py', '.ts', '.js', '.jsx', '.tsx', '.mjs', '.ejs', '.go', '.rs', '.java', '.cpp', '.cc', '.cxx', '.c', '.h', '.hpp', '.rb', '.swift', '.kt', '.kts', '.cs', '.scala', '.php', '.lua', '.toc', '.zig', '.ps1', '.ex', '.exs', '.m', '.mm', '.jl', '.vue', '.svelte', '.dart', '.v', '.sv'}
DOC_EXTENSIONS = {'.md', '.mdx', '.txt', '.rst'}
DOC_EXTENSIONS = {'.md', '.mdx', '.txt', '.rst', '.html'}
PAPER_EXTENSIONS = {'.pdf'}
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg'}
OFFICE_EXTENSIONS = {'.docx', '.xlsx'}