Skip to content

Add JSON schema for theme info - #8525

Open
dmerand wants to merge 17 commits into
mainfrom
donald/theme-info-json-schema
Open

dmerand wants to merge 17 commits into
mainfrom
donald/theme-info-json-schema

Conversation

@dmerand

@dmerand dmerand commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Theme and environment JSON results should have a discoverable, consistent contract.

WHAT is this pull request doing?

Expose strict camelCase resources, string theme IDs, nullable unavailable fields and one ordered object for explicit environment batches. Preserve authentication and operation failures per environment.

The public output follows docs/cli/json-output.md; explicitly named environments use one {environments: [...]} object.

How to manually test your changes?

shopify theme info --json
shopify theme info --environment staging --json
shopify theme info --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 — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the Area: @shopify/theme @shopify/theme package issues label Sep 11, 2026
@dmerand
dmerand requested review from a team September 11, 2026 01:53
@dmerand
dmerand force-pushed the donald/theme-info-json-schema branch from cf6bd6d to 42bc978 Compare September 11, 2026 14:24
@gonzaloriestra

Copy link
Copy Markdown
Contributor

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

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

Test the snapshot by installing your package globally:

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

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.

Comment thread packages/theme/src/cli/commands/theme/info.ts
Comment thread packages/theme/src/cli/commands/theme/info.ts
Base automatically changed from gonzalo/json-schema-flag to gonzalo/json-support-by-default September 16, 2026 11:13
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from f46d908 to 0c95979 Compare September 16, 2026 11:21
@gonzaloriestra
gonzaloriestra changed the base branch from gonzalo/json-support-by-default to main September 16, 2026 11:21
@github-actions github-actions Bot added Area: @shopify/cli @shopify/cli package issues Area: @shopify/theme @shopify/theme package issues and removed Area: @shopify/theme @shopify/theme package issues Area: @shopify/cli @shopify/cli package issues labels Sep 16, 2026
@gonzaloriestra
gonzaloriestra added this pull request to stack #8644 September 24, 2026 09:19
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from 77bfbfd to d18e392 Compare September 24, 2026 10:04
@gonzaloriestra
gonzaloriestra removed this pull request from stack #8644 September 24, 2026 10:04
@gonzaloriestra
gonzaloriestra added this pull request to stack #8655 September 24, 2026 10:05
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from d18e392 to 6d61a3e Compare September 24, 2026 10:25
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/theme @shopify/theme package issues labels Sep 24, 2026
Comment thread packages/theme/src/cli/commands/theme/info.ts Outdated
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from 6d61a3e to cb7a4db Compare September 24, 2026 11:56
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 24, 2026 14:13
@github-actions github-actions Bot added shopify.dev preview Area: @shopify/cli @shopify/cli package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels Oct 6, 2026
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from 5ed4077 to 8c0467c Compare October 8, 2026 08:43
@gonzaloriestra gonzaloriestra reopened this Oct 8, 2026
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review October 8, 2026 10:03
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch 3 times, most recently from b0b71b7 to 520154d Compare October 9, 2026 12:48
@gonzaloriestra
gonzaloriestra force-pushed the donald/theme-info-json-schema branch from 520154d to 2ced92e Compare October 9, 2026 13:09
@github-actions

github-actions Bot commented Oct 9, 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
theme-info-json-contract.md '@shopify/cli': major

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/base-command.d.ts
@@ -35,6 +35,7 @@ declare abstract class BaseCommand extends Command {
         argv: string[];
     }>;
     protected environmentsFilename(): string | undefined;
+    protected validateNonTTYFlags(flags: FlagOutput): void;
     protected failMissingNonTTYFlags(flags: FlagOutput, requiredFlags: string[]): void;
     private failMissingNonTTYFlagRequirements;
     private applicableNonTTYFlagRequirements;

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants