feat: add --json flag to heroku buildpacks and subcommands (W-23597909, #1637) - #3842
Open
heroku-johnny wants to merge 3 commits into
Open
feat: add --json flag to heroku buildpacks and subcommands (W-23597909, #1637)#3842heroku-johnny wants to merge 3 commits into
heroku-johnny wants to merge 3 commits into
Conversation
Adds a -j/--json flag to all buildpacks subcommands (index, info, add, set, remove, clear). Commands that return a buildpack list output the raw BuildpackResponse array; info outputs the registry object; clear and single-removal output an empty array. Updates all unit tests with JSON coverage. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 20:08 — with
GitHub Actions
Inactive
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 20:08 — with
GitHub Actions
Inactive
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 20:08 — with
GitHub Actions
Inactive
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 20:08 — with
GitHub Actions
Inactive
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 21:45 — with
GitHub Actions
Inactive
heroku-johnny
temporarily deployed
to
AcceptanceTests
July 27, 2026 21:45 — with
GitHub Actions
Inactive
heroku-johnny
had a problem deploying
to
AcceptanceTests
July 27, 2026 21:45 — with
GitHub Actions
Error
heroku-johnny
had a problem deploying
to
AcceptanceTests
July 27, 2026 21:45 — with
GitHub Actions
Failure
michaelmalave
temporarily deployed
to
AcceptanceTests
August 4, 2026 17:35 — with
GitHub Actions
Inactive
michaelmalave
temporarily deployed
to
AcceptanceTests
August 4, 2026 17:35 — with
GitHub Actions
Inactive
michaelmalave
temporarily deployed
to
AcceptanceTests
August 4, 2026 17:35 — with
GitHub Actions
Inactive
michaelmalave
temporarily deployed
to
AcceptanceTests
August 4, 2026 17:35 — with
GitHub Actions
Inactive
michaelmalave
left a comment
Contributor
There was a problem hiding this comment.
Dev Tools Standards Review Results (machine-generated)
🟡 1 advisory.
| @@ -1,17 +1,19 @@ | |||
| import {Command, flags as Flags} from '@heroku-cli/command' | |||
| import {hux} from '@heroku/heroku-cli-util' | |||
Contributor
There was a problem hiding this comment.
delete-unused-code (Code style · minor · 60% confidence): The diff adds import {hux} from '@heroku/heroku-cli-util' but hux is never referenced anywhere in this file — run() only delegates to buildpackCommand.clear(...). An unused import is dead code that should be removed rather than left in place.
michaelmalave
approved these changes
Aug 4, 2026
michaelmalave
left a comment
Contributor
There was a problem hiding this comment.
Code passes - just a note on an import. LGTM!
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.
Summary
-j/--jsonflag to all sixbuildpackssubcommands:index(list),info,add,set,remove, andclearindex,add,set,remove) output the rawBuildpackResponse[]array as JSONinfooutputs the full buildpack registry object as JSONclearand single-buildpackremoveoutput an empty array[]as JSON (representing the cleared state)BuildpackCommand.clear()insrc/lib/buildpacks/buildpacks.tsgains an optionaljsonparameter; when set, it skips the config-vars API call and outputs[]immediatelyTest plan
npx tsc --noEmit)Closes #1637
GUS: W-23597909
🤖 Generated with Claude Code