Repository navigation
Emit info and warning alerts as JSON diagnostics - #8792
Open
gonzaloriestra wants to merge 3 commits into
Open
gonzaloriestra wants to merge 3 commits into
gonzaloriestra wants to merge 3 commits into
Conversation
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 declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/multiple-installation-warning.d.ts@@ -1,6 +1,6 @@
/**
* Shows a warning if there are two Shopify CLI installations found (global and local).
- * Won't show anything if the user included the --json flag.
+ * Emits a diagnostic on stderr in JSON mode.
*
* @param directory - The directory of the project.
* @param dependencies - The dependencies of the project.
packages/cli-kit/dist/private/node/ui/alert.d.ts@@ -3,4 +3,4 @@ import { RenderOptions } from 'ink';
export interface AlertOptions extends AlertProps {
renderOptions?: RenderOptions;
}
-export declare function alert({ type, headline, body, nextSteps, reference, link, customSections, orderedNextSteps, renderOptions, }: AlertOptions): string | undefined;
\ No newline at end of file
+export declare function alert(options: AlertOptions): string | undefined;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/token-item.d.ts@@ -35,4 +35,6 @@ export type Token = string | {
export type InlineToken = Exclude<Token, ListToken>;
export type TokenItem<T extends Token = Token> = T | T[];
export declare function tokenItemToString(token: TokenItem): string;
-export declare function appendToTokenItem(token: TokenItem, suffix: string): TokenItem;
\ No newline at end of file
+export declare function appendToTokenItem(token: TokenItem, suffix: string): TokenItem;
+/** Converts tokens to JSON message text, retaining link URLs and list titles. */
+export declare function tokenItemToJsonString(token: TokenItem): string;
\ No newline at end of file
|
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006120211Caution After installing, validate the version by running |
gonzaloriestra
marked this pull request as ready for review
October 6, 2026 12:14
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?
renderInfoandrenderWarningcurrently print terminal banners when--jsonis enabled. Callers must choose a different output helper to produce JSON diagnostics.Example:
WHAT is this pull request doing?
Make both helpers emit diagnostic events on stderr in JSON mode, while preserving banners in text mode. Preserve alert details and URLs, reuse the JSON error formatter, and update the guidance. Simplify bulk-operation diagnostics, app-log notices, and the multiple-installation notice to use the shared helpers without format branches.
How to manually test your changes?
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset