Repository navigation
fix(build-logs): strip bidi overrides and C1 controls from build log output - #384
Open
sivaratrisrinivas wants to merge 2 commits into
Open
sivaratrisrinivas wants to merge 2 commits into
sivaratrisrinivas wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #364
widened the safeText regex in src/build-logs.ts so build logs also drop C1 controls (\x80-\x9f) and bidi marks, overrides and isolates (\u200e \u200f \u202a-\u202e \u2066-\u2069), the same set config.ts already strips. build logs come from user code, so something like U+202E could reorder or hide what you see in the terminal.
added a BuildLogPrinter test with those characters that checks they're removed while \t, \n and normal text stay. the test fails on main and passes with the fix. npm run typecheck && npm test pass (2115 passed, 135 skipped).