Repository navigation
Add typed JSON output to theme check - #8920
Conversation
cbc61f4 to
5fc194f
Compare
5fc194f to
f5fe261
Compare
39313b0 to
9f5d761
Compare
isaacroldan
left a comment
There was a problem hiding this comment.
JSON mode still misses two supported input paths.
🤖 Generated by the review-pr skill
bb63927 to
7ce8bcb
Compare
isaacroldan
left a comment
There was a problem hiding this comment.
Found one remaining diagnostic issue.
🤖 Generated by the review-pr skill
7ce8bcb to
b5ca8ae
Compare
477b1ed to
582384c
Compare
karreiro
left a comment
There was a problem hiding this comment.
Thank you, @gonzaloriestra!
582384c to
bb0e289
Compare
bb0e289 to
f4263d1
Compare
|
| Changeset | Package |
|---|---|
theme-check-json-contract.md |
'@shopify/cli': major |
Differences in type declarationsWe 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:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/base-command.d.ts@@ -21,6 +21,7 @@ declare abstract class BaseCommand extends Command {
static descriptionWithoutMarkdown(): string | undefined;
static analyticsNameOverride(): string | undefined;
static analyticsStopCommand(): string | undefined;
+ private jsonOutputFromFlags;
catch(error: Error & {
skipOclifErrorHandling: boolean;
}): Promise<void>;
@@ -36,6 +37,7 @@ declare abstract class BaseCommand extends Command {
}, TGlobalFlags extends FlagOutput, TArgs extends ArgOutput>(options?: Input<TFlags, TGlobalFlags, TArgs>, argv?: string[]): Promise<ParserOutput<TFlags, TGlobalFlags, TArgs> & {
argv: string[];
}>;
+ protected runWithParsedOutput<T>(flags: FlagOutput, execute: () => T): T;
protected environmentsFilename(): string | undefined;
protected parseEnvironmentFlags<TFlags extends FlagOutput, TGlobalFlags extends FlagOutput, TArgs extends ArgOutput>(environment: JsonMap, options: Input<TFlags, TGlobalFlags, TArgs>, explicitFlags: FlagOutput): Promise<FlagOutput>;
protected validateNonTTYFlags(flags: FlagOutput): void;
|
Original PR and review history: #8642.
WHY are these changes introduced?
Fixes https://github.com/shop/issues-develop/issues/23691
Theme Check JSON needs consistent validation results and diagnostic fields.
WHAT is this pull request doing?
Return valid, flat issues and consistent severity counts with absolute file paths and zero-based camelCase positions. Retain completed validation in environment batches, honor the blocking policy, and wait for requested corrections before final JSON.
The public output follows
docs/cli/json-output.md; explicitly named environments use one{environments: [...]}object.How to manually test your changes?
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add