Skip to content

Add typed JSON output for store delete - #8585

Merged
gonzaloriestra merged 2 commits into
gonzalo/json-store-create-devfrom
gonzalo/json-store-delete
Sep 21, 2026
Merged

gonzaloriestra merged 2 commits into
gonzalo/json-store-create-devfrom
gonzalo/json-store-delete

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

The store deletion command supports JSON but does not expose or validate its output contract.

WHAT is this pull request doing?

Adds a discoverable schema for confirmed deletion, pending deletion, and existing JSON errors. Reuses shared store, organization, and error schemas while preserving confirmation and polling behavior. Includes the single release note for the store JSON stack.

Example output

Illustrative sample data. Text excerpts omit terminal decoration and progress. JSON blocks show the final stdout result; progress and diagnostics go to stderr.

shopify store delete --store disposable-dev-store.myshopify.com --organization-id 1234 --force

Text

Dev store "disposable-dev-store.myshopify.com" deleted successfully.

The store was deleted.

JSON (--json)

{
  "store": {
    "domain": "disposable-dev-store.myshopify.com",
    "deletionRequested": true,
    "deletionConfirmed": true
  },
  "organization": {
    "id": "1234",
    "name": "Acme"
  }
}

Deletion requested, confirmation still pending

Text

Dev store "disposable-dev-store.myshopify.com" deletion was requested, but not confirmed.

Shopify accepted the deletion request, but deletion was not confirmed before the CLI stopped waiting.
The store may still finish deleting asynchronously.

JSON (--json)

{
  "store": {
    "domain": "disposable-dev-store.myshopify.com",
    "deletionRequested": true,
    "deletionConfirmed": false
  },
  "organization": {
    "id": "1234",
    "name": "Acme"
  },
  "message": "Deletion was requested, but has not been confirmed yet. The store may still finish deleting asynchronously."
}

JSON error (non-interactive invocation without --force; exit code 1)

{
  "error": true,
  "message": "Deleting the dev store disposable-dev-store.myshopify.com requires confirmation.",
  "nextSteps": [
    "Use the `--force` flag to skip confirmation when running non-interactively."
  ],
  "exitCode": 1
}

How to manually test your changes?

shopify store delete --json-schema
shopify store delete --store disposable-dev-store.myshopify.com --organization-id 1234 --force --json

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 and added a changeset.

@gonzaloriestra
gonzaloriestra added this pull request to stack #8564 September 18, 2026 11:45
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 18, 2026
@gonzaloriestra gonzaloriestra changed the title gonzalo/json store delete Add typed JSON output for store delete Sep 18, 2026
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 18, 2026 14:37
@gonzaloriestra
gonzaloriestra requested review from a team as code owners September 18, 2026 14:37
Comment thread packages/store/src/cli/services/store/delete/types.ts
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/json-store-delete branch from 69a9a86 to 1654e2e Compare September 21, 2026 16:50
@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/local-storage.d.ts
@@ -48,7 +48,6 @@ export declare class LocalStorage<T extends Record<string, any>> {
      *
      * @param error - The error that occurred.
      * @param operation - The operation that failed.
-     * @param configPath - The local storage configuration file path.
      * @throws AbortError if the error is permission-related.
      * @throws BugError if the error is not permission-related.
      */

@gonzaloriestra
gonzaloriestra added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit 7c72909 Sep 21, 2026
33 of 57 checks passed
@gonzaloriestra
gonzaloriestra deleted the gonzalo/json-store-delete branch September 21, 2026 17:21
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