[4.8] Fix shopify theme pull/push/package sync - #8630
Merged
Merged
Conversation
karreiro
approved these changes
Sep 23, 2026
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/private/node/api.d.ts@@ -37,21 +37,6 @@ export declare function isTransientNetworkError(error: unknown): boolean;
* - Permanent: certificate validation failures, misconfigured SSL
*/
export declare function isNetworkError(error: unknown): boolean;
-/**
- * Checks if an error is an aborted request: a user cancelling the command, the host process
- * cancelling it, or one of the CLI's own request timeouts firing.
- *
- * Not used by the retry logic, because a user-cancelled request must not be retried.
- * `isTransientNetworkError` separately matches the CLI's own timeout message, so timeouts do
- * still retry.
- *
- * The `name` check matches the `AbortError` shape that fetch throws, not cli-kit's own
- * `AbortError`, which leaves `name` as 'Error'.
- *
- * @param error - Error to be checked.
- * @returns A boolean indicating if the request was aborted.
- */
-export declare function isAbortedFetchError(error: unknown): boolean;
export declare function simpleRequestWithDebugLog<T extends {
headers: Headers;
status: number;
packages/cli-kit/dist/public/common/version.d.ts@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "4.8.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "4.8.1";
\ No newline at end of file
packages/cli-kit/dist/public/node/base-command.d.ts@@ -1,4 +1,3 @@
-import { type JsonOutputSchema } from './json-output-schema.js';
import { Command } from '@oclif/core';
import { OutputFlags, Input, ParserOutput, FlagInput, OutputArgs } from '@oclif/core/parser';
export type ArgOutput = OutputArgs<any>;
@@ -11,19 +10,14 @@ export interface NonTTYFlagRequirement {
}
declare abstract class BaseCommand extends Command {
static baseFlags: FlagInput<{}>;
- static descriptionWithMarkdown?: string;
- static get jsonOutputSchema(): JsonOutputSchema | undefined;
static get requiresSyncAnalytics(): boolean;
static nonTTYFlagRequirements(_flags: FlagOutput): NonTTYFlagRequirement[];
- static descriptionForHelp(): string | undefined;
- /** @deprecated Use descriptionForHelp instead. */
static descriptionWithoutMarkdown(): string | undefined;
static analyticsNameOverride(): string | undefined;
static analyticsStopCommand(): string | undefined;
catch(error: Error & {
skipOclifErrorHandling: boolean;
}): Promise<void>;
- protected _run<T>(): Promise<T>;
protected init(): Promise<unknown>;
protected showNpmFlagWarning(): void;
protected exitWithTimestampWhenEnvVariablePresent(): void;
packages/cli-kit/dist/public/node/custom-oclif-loader.d.ts@@ -17,12 +17,6 @@ export declare class ShopifyConfig extends Config {
* @param loader - The lazy command loader function.
*/
setLazyCommandLoader(loader: LazyCommandLoader): void;
- /**
- * Override load to protect oclif's shell detection from a failing OS user lookup.
- *
- * @returns A promise that resolves once the config is loaded.
- */
- load(): Promise<void>;
/**
* Override runCommand to use lazy loading when available.
* Instead of calling cmd.load() which triggers loading ALL commands via index.js,
packages/cli-kit/dist/public/node/environment.d.ts@@ -42,10 +42,9 @@ export declare function getIdentityTokenInformation(): {
* Checks if the JSON output is enabled via flag (--json or -j) or environment variable (SHOPIFY_FLAG_JSON).
*
* @param environment - Process environment variables.
- * @param argv - Command arguments to inspect for JSON flags.
* @returns True if the JSON output is enabled, false otherwise.
*/
-export declare function jsonOutputEnabled(environment?: NodeJS.ProcessEnv, argv?: string[]): boolean;
+export declare function jsonOutputEnabled(environment?: NodeJS.ProcessEnv): boolean;
/**
* If true, the CLI should not use the network level retry.
*
packages/cli-kit/dist/public/node/error.d.ts@@ -1 +1,87 @@
-export * from './error/index.js';
\ No newline at end of file
+import { OutputMessage } from './output.js';
+import { type InlineToken, type TokenItem } from '../../private/node/ui/components/token-item.js';
+import type { AlertCustomSection } from './ui.js';
+export declare enum FatalErrorType {
+ Abort = 0,
+ AbortSilent = 1,
+ Bug = 2
+}
+export declare class CancelExecution extends Error {
+}
+/**
+ * A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
+ * There shouldn't be code that catches fatal errors.
+ */
+export declare abstract class FatalError extends Error {
+ tryMessage: TokenItem | null;
+ type: FatalErrorType;
+ nextSteps?: TokenItem<InlineToken>[];
+ formattedMessage?: TokenItem;
+ customSections?: AlertCustomSection[];
+ skipOclifErrorHandling: boolean;
+ /**
+ * Creates a new FatalError error.
+ *
+ * @param message - The error message.
+ * @param type - The type of fatal error.
+ * @param tryMessage - The message that recommends next steps to the user.
+ * You can pass a string a {@link TokenizedString} or a {@link TokenItem}
+ * if you need to style the message inside the error Banner component.
+ * @param nextSteps - Message to show as "next steps" with suggestions to solve the issue.
+ * @param customSections - Custom sections to show in the error banner. To be used if nextSteps is not enough.
+ */
+ constructor(message: TokenItem | OutputMessage, type: FatalErrorType, tryMessage?: TokenItem | OutputMessage | null, nextSteps?: TokenItem<InlineToken>[], customSections?: AlertCustomSection[]);
+}
+/**
+ * An abort error is a fatal error that shouldn't be reported as a bug.
+ * Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer.
+ */
+export declare class AbortError extends FatalError {
+ constructor(message: TokenItem | OutputMessage, tryMessage?: TokenItem | OutputMessage | null, nextSteps?: TokenItem<InlineToken>[], customSections?: AlertCustomSection[]);
+}
+/**
+ * An external error is similar to Abort but has extra command and args attributes.
+ * This is useful to represent errors coming from external commands, usually executed by execa.
+ */
+export declare class ExternalError extends FatalError {
+ command: string;
+ args: string[];
+ constructor(message: OutputMessage, command: string, args: string[], tryMessage?: TokenItem | OutputMessage | null);
+}
+export declare class AbortSilentError extends FatalError {
+ constructor();
+}
+/**
+ * A bug error is an error that represents a bug and therefore should be reported.
+ */
+export declare class BugError extends FatalError {
+ constructor(message: TokenItem | OutputMessage, tryMessage?: TokenItem | OutputMessage | null);
+}
+/**
+ * A function that handles errors that blow up in the CLI.
+ *
+ * @param error - Error to be handled.
+ * @returns A promise that resolves with the error passed.
+ */
+export declare function handler(error: unknown): Promise<unknown>;
+/**
+ * A function that maps an error to an Abort with the stack trace when coming from the CLI.
+ *
+ * @param error - Error to be mapped.
+ * @returns A promise that resolves with the new error object.
+ */
+export declare function errorMapper(error: unknown): Promise<unknown>;
+/**
+ * A function that checks if an error should be reported as unexpected.
+ *
+ * @param error - Error to be checked.
+ * @returns A boolean indicating if the error should be reported as unexpected.
+ */
+export declare function shouldReportErrorAsUnexpected(error: unknown): boolean;
+/**
+ * Stack traces usually have file:// - we strip that and also remove the Windows drive designation.
+ *
+ * @param filePath - Path to be cleaned.
+ * @returns The cleaned path.
+ */
+export declare function cleanSingleStackTracePath(filePath: string): string;
\ No newline at end of file
packages/cli-kit/dist/public/node/fs.d.ts@@ -114,26 +114,12 @@ export declare function mkdir(path: string): Promise<void>;
* @param path - Path to the directory to be created.
*/
export declare function mkdirSync(path: string): void;
-interface RemoveFileOptions {
- /**
- * Number of times Node retries the removal when it hits a transient error
- * (EBUSY, EMFILE, ENFILE, ENOTEMPTY or EPERM), waiting `retryDelay` milliseconds
- * longer on each try. Defaults to 0 (no retries).
- */
- maxRetries?: number;
- /**
- * Milliseconds to wait between retries. Defaults to 100.
- */
- retryDelay?: number;
-}
/**
- * Removes a file or directory (recursively) at the given path.
+ * Removes a file at the given path.
*
- * @param path - Path to the file or directory to be removed.
- * @param options - Retry behavior, passed through to Node's `fs.rm`. Useful when the removal can
- * race with transient locks, such as an antivirus scanning freshly written files.
+ * @param path - Path to the file to be removed.
*/
-export declare function removeFile(path: string, options?: RemoveFileOptions): Promise<void>;
+export declare function removeFile(path: string): Promise<void>;
/**
* Renames a file.
* @param from - Path to the file to be renamed.
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.
*/
packages/cli-kit/dist/public/node/output.d.ts@@ -68,12 +68,6 @@ export declare const clearCollectedLogs: () => void;
* @param content - The content to be output to the user.
*/
export declare function outputResult(content: OutputMessage): void;
-/**
- * Waits for queued stdout writes to reach their destination before the process exits.
- *
- * @returns A promise that resolves when stdout has flushed.
- */
-export declare function flushStdout(): Promise<void>;
/**
* Logs information at the info level.
* Info messages don't get additional formatting.
packages/cli-kit/dist/public/node/context/local.d.ts@@ -11,12 +11,6 @@ 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,36 +8,6 @@ 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.
*
|
Contributor
|
The "Check graphql-codegen has been run" check was picking newer schema values against the older stable/4.8 base |
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.
Fix
shopify theme pull/push/packagesync