Repository navigation
Add typed JSON output to app config link - #8603
Draft
gonzaloriestra wants to merge 4 commits into
Draft
gonzaloriestra wants to merge 4 commits into
gonzaloriestra wants to merge 4 commits into
Conversation
gonzaloriestra
added this pull request to stack #8606
September 21, 2026 08:08
Contributor
Author
|
/snapit |
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 21, 2026 08:11
748636a to
5f38640
Compare
Contributor
Author
|
/snapit |
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 22, 2026 11:22
5f38640 to
c0601e6
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 22, 2026 12:28
c0601e6 to
b74e72e
Compare
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/context/local.d.ts@@ -11,6 +11,12 @@ export declare function isTerminalInteractive(): boolean;
* @returns The path to the user's home directory.
*/
export declare function homeDirectory(): string;
+/**
+ * Clears the memoized result of isUnitTest so the environment variable is re-read.
+ *
+ * Only intended for test helpers that temporarily toggle unit-test detection.
+ */
+export declare function resetMemoizedIsUnitTest(): void;
/**
* Returns true if the CLI is running in debug mode.
*
packages/cli-kit/dist/public/node/testing/output.d.ts@@ -8,6 +8,36 @@ interface OutputMock {
error: () => string;
clear: () => void;
}
+interface StandardStreamsMock {
+ stdout: () => string;
+ stderr: () => string;
+ restore: () => void;
+}
+export interface CapturedStandardStreams {
+ stdout: () => string;
+ stderr: () => string;
+}
+/**
+ * Runs a callback with process stdout/stderr captured and unit-test output suppression disabled,
+ * so tests can assert on what a command actually writes to the standard streams.
+ *
+ * The callback receives accessors instead of the function returning captured output so that
+ * assertions remain possible when the callback throws (for example commands that abort).
+ * Streams, console.warn and unit-test detection are restored afterwards.
+ * Not safe for concurrent tests.
+ *
+ * @param run - Callback receiving accessors for the captured stdout and stderr.
+ * @returns The value returned by the callback.
+ */
+export declare function withCapturedStandardStreams<T>(run: (streams: CapturedStandardStreams) => T | Promise<T>): Promise<T>;
+/**
+ * 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.
+ * Prefer withCapturedStandardStreams, which also disables unit-test output suppression while it runs.
+ *
+ * @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.
*
|
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 23, 2026 08:21
b74e72e to
41c925a
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
September 23, 2026 12:14
41c925a to
8a0f161
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
2 times, most recently
from
October 6, 2026 12:21
d630444 to
7ca93e8
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
2 times, most recently
from
October 6, 2026 13:53
0054a95 to
c2dfd08
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
October 6, 2026 13:56
c2dfd08 to
72f450d
Compare
gonzaloriestra
force-pushed
the
gonzalo/json-app-config-link
branch
from
October 9, 2026 10:58
72f450d to
2636763
Compare
Contributor
|
| Changeset | Package |
|---|---|
typed-app-config-validate.md |
'@shopify/cli': major |
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?
Related to https://github.com/shop/issues-develop/issues/23665
App configuration linking needs a machine-readable result.
WHAT is this pull request doing?
Add JSON output with the absolute written path, native configuration content, and a strict public app projection. Use name and clientId, separate actual GIDs from other identifiers, and return null for unavailable selected fields. Keep credentials and runtime state out of the result.
How to manually test your changes?
Checklist