Fix component name regex to support : and / in paths

The dep scanner regex only matched [a-zA-Z0-9_-] in component names,
missing the new path separators (/) and namespace delimiters (:).
Fixed in deps.sx spec + rebootstrapped sx_ref.py and sx-browser.js.
Also fixed the Python fallback in deps.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:27:52 +00:00
parent 6186cd1c53
commit 355f57a60b
4 changed files with 5 additions and 329 deletions

View File

@@ -126,7 +126,7 @@ def _compute_all_io_refs_fallback(
def _scan_components_from_sx_fallback(source: str) -> set[str]:
import re
return {f"~{m}" for m in re.findall(r'\(~([a-zA-Z_][a-zA-Z0-9_\-]*)', source)}
return {f"~{m}" for m in re.findall(r'\(~([a-zA-Z_][a-zA-Z0-9_\-:/]*)', source)}
def _components_needed_fallback(page_sx: str, env: dict[str, Any]) -> set[str]: