fix(codemods): colour the upgrade by-hand list and print summaries last - #3063
Open
mfal wants to merge 1 commit into
Open
fix(codemods): colour the upgrade by-hand list and print summaries last#3063mfal wants to merge 1 commit into
mfal wants to merge 1 commit into
Conversation
`upgrade`'s by-hand migration list never got the TTY/NO_COLOR colour detection `list` already had, so it always rendered plain. The "N codemods run" and "N codemod(s) did not complete" summaries also logged before the by-hand list instead of after it, so they scrolled out of view on longer runs. Wire color/width through UpgradeDeps like list.ts does, and move both closing summaries to the end of the output. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Coverage Report for ./packages/components/
File CoverageNo changed files found. |
mfal
enabled auto-merge (squash)
September 1, 2026 14:23
Contributor
🚀 Preview DeploymentPreview environments are ready:
Images:
|
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.
What & why
The
upgradecommand's output had two issues:listdetects a real TTY andNO_COLORto decide whether to colour its output, butupgradenever wired that through to the by-hand migration list it renders viarenderList— so that list always printed in plain text, even in an interactive terminal.Changes
UpgradeDepsgains optionalcolor/widthfields;cli.tscomputes them the same way it already does forlist(TTY +NO_COLORcheck) and passes them through torunUpgrade.renderListcall inupgrade.tsnow receivescolor/widthinstead of defaulting to no colour.Verification
pnpm nx test:compile codemods— cleanpnpm nx test:unit codemods— 307 tests passscript -q /dev/null node dist/cli.js upgrade major --dry --allow-dirty -y) confirms ANSI colour codes now appear in the by-hand list and the summary line lands after it.