Skip to content

Add typed JSON output to app function replay - #8757

Draft
gonzaloriestra wants to merge 1 commit into
gonzalo/function-run-jsonfrom
gonzalo/function-replay-json
Draft

gonzaloriestra wants to merge 1 commit into
gonzalo/function-run-jsonfrom
gonzalo/function-replay-json

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

app function replay --json defaults to a watch UI that ignores JSON selection. Finite replays also delegate unvalidated output to the Function runner.

WHAT is this pull request doing?

Use the shared native runner schema and encoder for --no-watch --json. Reject JSON watch mode before app linking, preserve text/watch workflows, and keep log selection independent from output format. Keep synchronous analytics and existing saved-log selection.

Normal finite replay output (excerpt):

Output
{"operations":[]}
Benchmark Results
Name: function.wasm
Linear Memory Usage: 64KB
Instructions: 1K

Matching JSON:

{
  "name": "function.wasm",
  "size": 1,
  "memory_usage": 64,
  "instructions": 1000,
  "logs": "",
  "input": {},
  "output": {"operations": []},
  "success": true
}

How to manually test your changes?

shopify app function replay --path /path/to/function --log abcdef --no-watch
shopify app function replay --path /path/to/function --log abcdef --no-watch --json
shopify app function replay --path /path/to/function --log abcdef --json
shopify app function replay --path /path/to/function --log abcdef
shopify app function replay --json-schema

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — added a major changeset for the existing JSON contract

Stack

  1. Add typed JSON output to app function info #8755 — Function info
  2. Add typed JSON output to app function run #8756 — Function run
  3. Add typed JSON output to app function replay #8757 — Function replay

@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Potential Breaking Changes Detected

This PR contains changes that may break the existing contract.

@shopify/dev_experience — this PR contains breaking changes that require coordination for the next major release.

📦 Major Version Changesets

The following changesets request a major version bump:

Changeset Package
function-replay-json-contract.md '@shopify/cli': major

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm.

Built from 3c51e9c65fe63b798ed3617d869f271e8f1e2c0b. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261005124853

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@gonzaloriestra
gonzaloriestra added this pull request to stack #8773 October 6, 2026 08:00

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

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant