Add typed JSON output to app config validate - #8602
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 #8606
September 21, 2026 08:08
Contributor
Author
|
/snapit |
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/testing/output.d.ts@@ -8,6 +8,19 @@ interface OutputMock {
error: () => string;
clear: () => void;
}
+interface StandardStreamsMock {
+ stdout: () => string;
+ stderr: () => string;
+ restore: () => void;
+}
+/**
+ * Captures writes to stdout and stderr, including console warnings intercepted by Vitest.
+ * Call restore in a finally block. This replaces process globals and must not be used in concurrent tests.
+ * CLI output tests must disable SHOPIFY_UNIT_TEST and reset modules before loading the command.
+ *
+ * @returns Captured output and a function to restore the original writers.
+ */
+export declare function mockAndCaptureStandardStreams(): StandardStreamsMock;
/**
* Returns a set of functions to get the outputs ocurred during a test run.
*
|
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?
App configuration validation has JSON output but no declared, discoverable result contract.
WHAT is this pull request doing?
Return typed validation facts and present them through the schema encoder. Preserve existing JSON bytes, terminal messages, analytics and failure exits. Reuse the standard-stream capture helper from #8575 to test the real output boundary.
Normal output:
JSON output:
{ "valid": true, "issues": [] }How to manually test your changes?
Checklist