Add typed JSON output to theme share - #8649
Draft
gonzaloriestra wants to merge 1 commit into
Draft
gonzaloriestra wants to merge 1 commit into
gonzaloriestra wants to merge 1 commit into
Conversation
gonzaloriestra
added this pull request to stack #8650
September 24, 2026 09:31
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 10:04
da398e8 to
9ea0fcf
Compare
gonzaloriestra
removed this pull request from stack #8650
September 24, 2026 10:04
gonzaloriestra
added this pull request to stack #8655
September 24, 2026 10:05
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 10:13
9ea0fcf to
9ea9818
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 10:25
9ea9818 to
9b471ea
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 11:56
9b471ea to
6fa7e17
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 13:46
6fa7e17 to
27f1592
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 14:21
27f1592 to
42d54fc
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 24, 2026 14:36
42d54fc to
36bed07
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 25, 2026 11:43
36bed07 to
097f129
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 25, 2026 11:59
097f129 to
04d63cb
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-theme-share
branch
from
September 25, 2026 12:27
04d63cb to
7c078ff
Compare
gonzaloriestra
removed this pull request from stack #8655
September 25, 2026 12:28
gonzaloriestra
added this pull request to stack #8673
September 25, 2026 12:29
Contributor
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 declarationspackages/cli-kit/dist/private/node/ui/tasks.d.tsimport { TokenizedString } from '../../../public/node/output.js';
export interface Task<TContext = unknown> {
title: string | TokenizedString;
task: (ctx: TContext, task: Task<TContext>) => Promise<void | Task<TContext>[]>;
retry?: number;
retryCount?: number;
errors?: Error[];
skip?: (ctx: TContext) => boolean;
}
export declare function runTasks<TContext>(tasks: Task<TContext>[], onTask?: (task: Task<TContext>) => void): Promise<TContext>;
Existing type declarationspackages/cli-kit/dist/private/node/ui/components/Tasks.d.ts@@ -1,14 +1,7 @@
import { AbortSignal } from '../../../../public/node/abort.js';
-import { TokenizedString } from '../../../../public/node/output.js';
+import { Task } from '../tasks.js';
import React from 'react';
-export interface Task<TContext = unknown> {
- title: string | TokenizedString;
- task: (ctx: TContext, task: Task<TContext>) => Promise<void | Task<TContext>[]>;
- retry?: number;
- retryCount?: number;
- errors?: Error[];
- skip?: (ctx: TContext) => boolean;
-}
+export type { Task } from '../tasks.js';
interface TasksProps<TContext> {
tasks: Task<TContext>[];
silent?: boolean;
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Closes https://github.com/shop/issues-develop/issues/23693
theme sharecreates a theme but does not declare a JSON flag or expose its result schema.WHAT is this pull request doing?
Add
--jsonand a discoverable share schema using the push transfer contract. Preserve random theme naming, listing selection, upload warnings/errors, and the existing terminal output.Normal output:
Matching JSON:
{ "theme": { "id": 1, "name": "Creative Theme", "role": "unpublished", "shop": "example.myshopify.com", "editor_url": "https://example.myshopify.com/admin/themes/1/editor", "preview_url": "https://example.myshopify.com?preview_theme_id=1" } }Uses the draft multi-environment contract from this stack: one array in requested order, environment names on successful results, failures on stderr,
[]when none succeed, and unchanged exit behavior. The shared tests also cover cancellation and analytics cleanup failures across all three commands.How to manually test your changes?
Checklist