Skip to content

Add typed JSON output to autocorrect on - #8932

Merged
gonzaloriestra merged 3 commits into
gonzalo/autocorrect-status-jsonfrom
gonzalo/autocorrect-on-json
Oct 20, 2026
Merged

gonzaloriestra merged 3 commits into
gonzalo/autocorrect-status-jsonfrom
gonzalo/autocorrect-on-json

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

config autocorrect on cannot return the saved preference as a typed JSON result.

Related to https://github.com/shop/issues-develop/issues/24282.

WHAT is this pull request doing?

Add --json using the shared autocorrect result schema and presenter. Return {enabled: true} after saving the preference, preserve the terminal message, and refresh the migration exceptions, manifest, and generated documentation. Cover persistence with real temporary storage and extend the command contract tests.

How to manually test your changes?

  • Record the current preference with pnpm shopify config autocorrect status.
  • Run pnpm shopify config autocorrect on --json --no-input and check for {"enabled": true}.
  • Run pnpm shopify config autocorrect status --json to confirm the preference was saved, then restore the original setting with the corresponding on or off command.

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

@gonzaloriestra
gonzaloriestra added this pull request to stack #8934 October 16, 2026 14:29
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Oct 16, 2026
@github-actions

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/themes/theme-manager.d.ts
@@ -11,12 +11,5 @@ export declare abstract class ThemeManager {
     findOrCreate(name?: string, role?: Role): Promise<Theme>;
     fetch(name?: string, role?: Role): Promise<Theme | undefined>;
     generateThemeName(context: string): string;
-    create(themeRole?: Role, themeName?: string): Promise<{
-        createdAtRuntime: boolean;
-        id: number;
-        name: string;
-        processing: boolean;
-        role: string;
-        src?: string;
-    }>;
+    create(themeRole?: Role, themeName?: string): Promise<Theme>;
 }
\ No newline at end of file

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/autocorrect-on-json branch from 6324dd7 to 365815f Compare October 19, 2026 09:44
@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/cli @shopify/cli package issues labels Oct 19, 2026
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review October 19, 2026 10:51
@gonzaloriestra
gonzaloriestra requested review from a team as code owners October 19, 2026 10:51
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/autocorrect-on-json branch from 365815f to 67cdb7f Compare October 19, 2026 11:59

@karreiro karreiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @gonzaloriestra!

@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/autocorrect-on-json branch from 67cdb7f to 4d2ed94 Compare October 20, 2026 11:59
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/autocorrect-on-json branch from 4d2ed94 to 858ac6e Compare October 20, 2026 13:19
@gonzaloriestra
gonzaloriestra added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 2058b0f Oct 20, 2026
31 checks passed
@gonzaloriestra
gonzaloriestra deleted the gonzalo/autocorrect-on-json branch October 20, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. shopify.dev preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants