Skip to content

Add typed JSON output to autocorrect off - #8933

Open
gonzaloriestra wants to merge 2 commits into
gonzalo/autocorrect-on-jsonfrom
gonzalo/autocorrect-off-json
Open

gonzaloriestra wants to merge 2 commits into
gonzalo/autocorrect-on-jsonfrom
gonzalo/autocorrect-off-json

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

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

Fixes 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: false} after saving the preference, preserve the terminal message, and refresh the migration exceptions, manifest, and generated documentation. Extend the command contract tests to cover disabling autocorrect.

How to manually test your changes?

  • Record the current preference with pnpm shopify config autocorrect status.
  • Run pnpm shopify config autocorrect off --json --no-input and check for {"enabled": false}.
  • 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
  • The change is user-facing — added a minor changeset.

@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-off-json branch from 7bd745d to e614504 Compare October 19, 2026 09:44
@gonzaloriestra

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

Copy link
Copy Markdown
Contributor

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

Built from e6145047804bd39dca2244eb6eda80a86c6b1631. 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-20261019103528

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 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-off-json branch from e614504 to 713f0b2 Compare October 19, 2026 11:59

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.

2 participants