plan-governance-cli 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plan-governance-cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "统一入口的计划治理检查 CLI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1940,8 +1940,11 @@ def map_blockers(plan_map_text):
1940
1940
  label = row[0] or "未命名阻塞项"
1941
1941
  if not blocker_is_open(row[3], row[4], f"PLAN_MAP {label}", issues):
1942
1942
  continue
1943
- scope = re.sub(r"\[[^\]]+\]\((?:\./)?plans/([^/)]+)\.md(?:#[^)]*)?\)",
1944
- r"\1", row[2]).replace("`", "")
1943
+ scope = re.sub(
1944
+ r"\[[^\]]+\]\(((?:\./)?plans/[^)#]+\.md)(?:#[^)]*)?\)",
1945
+ lambda match: Path(match.group(1)).stem,
1946
+ row[2],
1947
+ ).replace("`", "")
1945
1948
  targets = set(filter(None, re.split(r"[,,、/;;\s]+", scope.strip())))
1946
1949
  if not targets or targets - names:
1947
1950
  issues.append(f"PLAN_MAP 当前阻塞项 {label} 的影响范围无法归属:{row[2]}")