Skip to content

fix(build-logs): strip bidi overrides and C1 controls from build log output - #384

Open
sivaratrisrinivas wants to merge 2 commits into
InsForge:mainfrom
sivaratrisrinivas:fix/build-logs-bidi-c1
Open

sivaratrisrinivas wants to merge 2 commits into
InsForge:mainfrom
sivaratrisrinivas:fix/build-logs-bidi-c1

Conversation

@sivaratrisrinivas

Copy link
Copy Markdown

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).

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread test/build-logs.test.ts Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Yun Tianming] src/build-logs.ts: safeText passes bidi overrides and C1 controls to the terminal

2 participants