Patch Changes
-
#620
0f3ca3b- Fix regex literal parsing ambiguity with file pathsRemoved grammar-level regex literal (
/pattern/) parsing which caused paths like/folder/foo/barto be incorrectly parsed as regex patterns. Regex-like strings are now detected at runtime by specific consumers (remap()match values,matchestype option) instead of at the grammar level. Unquoted strings that look like/pattern/flagsare treated as regex in those contexts; wrap in quotes to force literal string matching. -
#618
0db7d1d- Fixvarlock runon Windows: correctly build the cmd.exe command string when spawning.cmd/.batfilesPreviously, individual arguments were double-quoted separately (e.g.
"tsx.cmd" "watch" "src/index.ts"). Because cmd.exe's/s /cstrips only the first and last quote from the entire command string, this left a stray"after the command name, causing errors like "The system cannot find the path specified."The fix wraps the entire inner command string in a single pair of outer quotes (e.g.
"tsx.cmd watch src/index.ts"), which is what cmd.exe expects. Paths or arguments that contain spaces are individually quoted inside those outer quotes.Additionally, when
findCommandcannot resolve a bare command name to a.cmd/.batpath, varlock now falls back to routing through cmd.exe so that Windows PATHEXT lookups (e.g.tsx→tsx.cmd,pnpm→pnpm.cmd) are handled automatically.