Skip to content

Add typed JSON output to app import channel-config - #8821

Merged
isaacroldan merged 6 commits into
mainfrom
codex/json-app-channel-config
Oct 13, 2026
Merged

isaacroldan merged 6 commits into
mainfrom
codex/json-app-channel-config

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Give scripts a strict channel-config import result. Related to #23958.

WHAT is this pull request doing?

Separate the import result from terminal output. Return a success status, an absolute TOML path, the unchanged TOML, and export warnings. Validate the result before writing files, preserve text output and --force, and use the existing schema getter and warning helpers.

This is a major JSON change: use path directly instead of joining it to the app directory.

Text: Imported the channel spec for Example app.
JSON: {"status":"success","handle":"example","filename":"example.toml","path":"/tmp/app/extensions/channel-config/specifications/example.toml","toml":"handle = \"example\"\n","warnings":[]}.

How to manually test your changes?

Use a copy of a linked app that is allowlisted for channel-spec export.

  1. Run shopify app import channel-config --path <app> --json --no-input > result.json 2> events.jsonl. Check the absolute path, compare the native toml with that file, and check warning events on stderr.
  2. Repeat; expect one error and no overwrite. Add --force and check successful replacement. Run without --json to compare warning and success text.
  3. Run shopify app import channel-config --json-schema to inspect the contract. Use a missing app path with --json --no-input; expect one error document and a nonzero exit.

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
  • Added the required major changeset

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Oct 7, 2026
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@isaacroldan
isaacroldan force-pushed the codex/json-app-channel-config branch from 6955e74 to 675ac51 Compare October 7, 2026 13:33
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

Built from 675ac51e33cfbcf2dd30bcee797c54e49217a510. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]

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.

@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

Built from 71b94f1e7b9ae14935642803320fd202160b0f9e. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]

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.

@isaacroldan
isaacroldan force-pushed the codex/json-app-channel-config branch from 71b94f1 to 2718614 Compare October 8, 2026 16:02
@github-actions

github-actions Bot commented Oct 8, 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
json-app-channel-config.md '@shopify/cli': major

@isaacroldan
isaacroldan marked this pull request as ready for review October 8, 2026 16:04
@isaacroldan
isaacroldan requested review from a team as code owners October 8, 2026 16:04
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

Built from 2718614cbe9395ed9e4cf6e2dd2475765186afd9. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/[email protected]

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.

@isaacroldan
isaacroldan added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 12c4cf2 Oct 13, 2026
28 of 30 checks passed
@isaacroldan
isaacroldan deleted the codex/json-app-channel-config branch October 13, 2026 10:05
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.

2 participants