Skip to content

Add typed JSON output to Hydrogen environment commands - #4099

Draft
gonzaloriestra wants to merge 1 commit into
gonzalo/hydrogen-json-deployfrom
gonzalo/hydrogen-json-env
Draft

gonzaloriestra wants to merge 1 commit into
gonzalo/hydrogen-json-deployfrom
gonzalo/hydrogen-json-env

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Scripts need environment data and sync receipts without parsing tables, banners or environment variable values.

WHAT is this pull request doing?

Add typed results to env list, env pull and env push. Preserve list fields, empty results, dry runs, cancellation and confirmation behavior. Sync receipts include variable names and metadata without values; dry-run diffs stay out of the JSON result.

Without --json, the existing terminal presentation remains. Example JSON result:

shopify hydrogen env push --env preview --dry-run --json
{"status":"dry-run","file":"/project/.env","variables":["PUBLIC_STORE_DOMAIN"],"skipped":[]}

HOW to test your changes?

pnpm --filter @shopify/cli-hydrogen test src/commands/hydrogen/env/json-output.test.ts

Build and typecheck were checked at each layer. The full stack passed 498 tests (6 skipped), lint, and schema discovery for all 22 finite commands. Command-line smoke checks covered a successful unlink result, fatal project errors, watch-mode rejection and schema environment flags. Live authenticated Shopify operations have not been exercised.

Stack

Draft 5 of 9. Previous: #4098. Next: #4100. One changeset is included in #4103.

  1. Prepare Hydrogen commands for typed JSON output
  2. Add typed JSON output to Hydrogen build tooling
  3. Add typed JSON output to hydrogen customer-account-push
  4. Add typed JSON output to hydrogen deploy
  5. Add typed JSON output to Hydrogen environment commands
  6. Add typed JSON output to Hydrogen route generation
  7. Add typed JSON output to Hydrogen project and account commands
  8. Add typed JSON output to Hydrogen setup commands
  9. Add typed JSON output to Hydrogen maintenance commands

@shopify

shopify Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Oxygen deployed a preview of your gonzalo/hydrogen-json-env branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment September 29, 2026 2:56 PM

Learn more about Hydrogen's GitHub integration.

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/hydrogen-json-env branch from 9dc7a15 to ff6f897 Compare September 29, 2026 14:54

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.

2 participants