github dmno-dev/varlock varlock@0.8.2

17 hours ago

Patch Changes

  • #620 0f3ca3b - Fix regex literal parsing ambiguity with file paths

    Removed grammar-level regex literal (/pattern/) parsing which caused paths like /folder/foo/bar to be incorrectly parsed as regex patterns. Regex-like strings are now detected at runtime by specific consumers (remap() match values, matches type option) instead of at the grammar level. Unquoted strings that look like /pattern/flags are treated as regex in those contexts; wrap in quotes to force literal string matching.

  • #618 0db7d1d - Fix varlock run on Windows: correctly build the cmd.exe command string when spawning .cmd/.bat files

    Previously, individual arguments were double-quoted separately (e.g. "tsx.cmd" "watch" "src/index.ts"). Because cmd.exe's /s /c strips 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 findCommand cannot resolve a bare command name to a .cmd/.bat path, varlock now falls back to routing through cmd.exe so that Windows PATHEXT lookups (e.g. tsxtsx.cmd, pnpmpnpm.cmd) are handled automatically.

Don't miss a new varlock release

NewReleases is sending notifications on new releases.