Repository navigation
Keep automatic upgrade output in JSON diagnostics - #8845
Closed
isaacroldan wants to merge 1 commit into
Closed
isaacroldan wants to merge 1 commit into
isaacroldan wants to merge 1 commit into
Conversation
1 of 4 tasks
isaacroldan
added this pull request to stack #8846
October 9, 2026 08:17
isaacroldan
removed this pull request from stack #8846
October 9, 2026 08:19
isaacroldan
added this pull request to stack #8847
October 9, 2026 08:20
isaacroldan
force-pushed
the
codex/json-upgrade-output
branch
from
October 9, 2026 08:50
3114d0a to
0f577d0
Compare
isaacroldan
removed this pull request from stack #8847
October 9, 2026 09:07
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.
WHY are these changes introduced?
Automatic global upgrades can append package-manager output to a command's final JSON document, which makes stdout invalid JSON.
WHAT is this pull request doing?
Route the upgrade subprocess through the shared JSON diagnostic streams and report upgrade completion as a diagnostic. Preserve inherited terminal streams and the success banner in text mode. Keep installed-version checks and subprocess failures.
This is a prerequisite for #8816, stacked on #8801.
How to manually test your changes?
Use an outdated global CLI installation with a newer release available in the same major version and automatic upgrades enabled.
SHOPIFY_CLI_FORCE_AUTO_UPGRADE=1 shopify version --json --no-input > version.json 2> events.jsonl. This updates the global installation. Check that stdout contains one version object and upgrade output appears as JSON events on stderr.--json. Check the existing package-manager output and upgrade success banner.Validation
45 focused upgrade and postrun tests passed, with scoped lint, CLI Kit build, and CLI Kit type check. The new stdout/stderr tests fail when inherited subprocess output is restored. Subprocess installation was stubbed; no global packages were installed.
Checklist