You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the BOM-migration regex that ate the previous line at 8 sites
The migration in d391aa6 used a value-capture regex that included
[\s\S]{0,50}? so the match could cross a newline. At 8 sites the rewriter
consumed the assignment line before each ConvertTo-Json pipeline and produced
two garbled lines: `Save-TcpkJson -Value $path = Join-Path $Dir 'coverage.json'`
followed by `$obj -Path $path -Depth 6`.
The brace-balance checker did not catch it because the braces still balanced.
The audit died with parse errors on the first affected file loaded, which was
_Coverage.ps1 on the reporter's Windows machine.
Every corrupted site restored to a proper
`Save-TcpkJson -Value $x -Path $p -Depth n` call on its own line:
_Coverage.ps1, _Llm.ps1, _Osv.ps1, three sites in Invoke-TcpkAudit.ps1,
Save-TcpkFileSnapshot.ps1, Save-TcpkRegistrySnapshot.ps1.
Lesson recorded so this class of mistake stays out of future migrations:
never use [\s\S] in a codebase-wide rewriter; eyeball the diff before commit;
ship one file first if the change is unverified on Windows.
0 commit comments