Skip to content

Commit 90f9525

Browse files
authored
fix: classify all supported lockfiles (#7)
1 parent 857aa2a commit 90f9525

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

skills/codebase-evolution-controller/scripts/manifest_inventory.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"pubspec.yaml", "pubspec.lock", "Gemfile", "Gemfile.lock", "composer.json", "composer.lock",
1919
".nvmrc", ".node-version", ".python-version", ".ruby-version", "rust-toolchain", "rust-toolchain.toml", "mise.toml", ".tool-versions",
2020
}
21+
LOCKFILE_NAMES = {
22+
"package-lock.json", "pnpm-lock.yaml", "yarn.lock", "bun.lock", "bun.lockb",
23+
"poetry.lock", "Pipfile.lock", "Cargo.lock", "go.sum", "pubspec.lock",
24+
"Gemfile.lock", "composer.lock",
25+
}
2126

2227

2328
def read_limited(path: Path, limit: int = 2_000_000) -> str | None:
@@ -101,7 +106,7 @@ def inventory(root: Path, max_files: int) -> dict[str, Any]:
101106
results.append(item)
102107
if truncated:
103108
break
104-
locks = [r["path"] for r in results if r["name"].endswith("lock") or r["name"].endswith("lockb") or r["name"] in {"go.sum", "yarn.lock"}]
109+
locks = [r["path"] for r in results if r["name"] in LOCKFILE_NAMES]
105110
return {
106111
"root": str(root), "files_scanned": min(seen, max_files), "truncated": truncated,
107112
"manifests": results, "lockfiles": locks,

0 commit comments

Comments
 (0)