Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.67] Update checksum calculation to no longer minify assets before calculating #4546

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

karreiro
Copy link
Contributor

Backport: #4545

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

Copy link
Contributor

Differences in type declarations

We 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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/analytics.d.ts
@@ -20,7 +20,6 @@ interface EnvironmentData {
     env_cloud: string;
     env_package_manager: string;
     env_is_global: boolean;
-    env_auth_method: string;
 }
 export declare function getEnvironmentData(config: Interfaces.Config): Promise<EnvironmentData>;
 export declare function getSensitiveEnvironmentData(config: Interfaces.Config): Promise<{
packages/cli-kit/dist/private/node/session.d.ts
@@ -62,35 +62,6 @@ export interface OAuthSession {
     appManagement?: string;
     userId: string;
 }
-type AuthMethod = 'partners_token' | 'device_auth' | 'theme_access_token' | 'custom_app_token' | 'none';
-/**
- * Retrieves the user ID from the current session or returns 'unknown' if not found.
- *
- * This function performs the following steps:
- * 1. Checks for a cached user ID in memory (obtained in the current run).
- * 2. Attempts to fetch it from the secure store (from a previous auth session).
- * 3. Checks if a custom token was used (either as a theme password or partners token).
- * 4. If a custom token is present in the environment, generates a UUID and uses it as userId.
- * 5. If after all this we don't have a userId, then reports as 'unknown'.
- *
- * @returns A Promise that resolves to the user ID as a string.
- */
-export declare function getLastSeenUserIdAfterAuth(): Promise<string>;
-export declare function setLastSeenUserIdAfterAuth(id: string): void;
-/**
- * Retrieves the last seen authentication method used in the current session.
- *
- * This function checks for the authentication method in the following order:
- * 1. Returns the cached auth method if it's not 'none'.
- * 2. Checks for a cached session, which implies 'device_auth' was used.
- * 3. Checks for a partners token in the environment.
- * 4. Checks for a theme password in the environment.
- * 5. If none of the above are true, returns 'none'.
- *
- * @returns A Promise that resolves to the last seen authentication method as an AuthMethod type.
- */
-export declare function getLastSeenAuthMethod(): Promise<AuthMethod>;
-export declare function setLastSeenAuthMethod(method: AuthMethod): void;
 /**
  * This method ensures that we have a valid session to authenticate against the given applications using the provided scopes.
  *
packages/cli-kit/dist/public/common/url.d.ts
@@ -5,11 +5,4 @@
  * @returns True if the URL is valid, false otherwise.
  * @throws An error if URL's constructor throws an error other than .
  */
-export declare function isValidURL(url: string): boolean;
-/**
- * Safely parse a string into a URL.
- *
- * @param url - The string to parse into a URL.
- * @returns A URL object if the parsing is successful, undefined otherwise.
- */
-export declare function safeParseURL(url: string): URL | undefined;
\ No newline at end of file
+export declare function isValidURL(url: string): boolean;
\ No newline at end of file
packages/cli-kit/dist/public/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.67.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.67.2";
\ No newline at end of file
packages/cli-kit/dist/public/node/monorail.d.ts
@@ -2,7 +2,7 @@ import { JsonMap } from '../../private/common/json.js';
 import { DeepRequired } from '../common/ts/deep-required.js';
 export { DeepRequired };
 type Optional<T> = T | null;
-export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.14";
+export declare const MONORAIL_COMMAND_TOPIC = "app_cli3_command/1.12";
 export interface Schemas {
     [MONORAIL_COMMAND_TOPIC]: {
         sensitive: {
@@ -30,7 +30,6 @@ export interface Schemas {
             node_version: string;
             is_employee: boolean;
             store_fqdn_hash?: Optional<string>;
-            user_id: string;
             cmd_all_alias_used?: Optional<string>;
             cmd_all_launcher?: Optional<string>;
             cmd_all_path_override?: Optional<boolean>;
@@ -121,7 +120,6 @@ export interface Schemas {
             env_web_ide?: Optional<string>;
             env_cloud?: Optional<string>;
             env_is_global?: Optional<boolean>;
-            env_auth_method?: Optional<string>;
         };
     };
     [schemaId: string]: {
packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -293,17 +293,4 @@ export declare function addResolutionOrOverride(directory: string, dependencies:
  * @param packageJSON - Package.json file to write.
  */
 export declare function writePackageJSON(directory: string, packageJSON: PackageJson): Promise<void>;
-/**
- * Infers the package manager to be used based on the provided options and environment.
- *
- * This function determines the package manager in the following order of precedence:
- * 1. Uses the package manager specified in the options, if valid.
- * 2. Infers the package manager from the user agent string.
- * 3. Infers the package manager used for the global CLI installation.
- * 4. Defaults to 'npm' if no other method succeeds.
- *
- * @param optionsPackageManager - The package manager specified in the options (if any).
- * @returns The inferred package manager as a PackageManager type.
- */
-export declare function inferPackageManager(optionsPackageManager: string | undefined, env?: NodeJS.ProcessEnv): PackageManager;
 export {};
\ No newline at end of file
packages/cli-kit/dist/private/node/api/rest.d.ts
@@ -6,5 +6,4 @@ export declare function restRequestUrl(session: AdminSession, apiVersion: string
 }, env?: NodeJS.ProcessEnv): string;
 export declare function restRequestHeaders(session: AdminSession): {
     [key: string]: string;
-};
-export declare function isThemeAccessSession(session: AdminSession): boolean;
\ No newline at end of file
+};
\ No newline at end of file
packages/cli-kit/dist/private/node/session/exchange.d.ts
@@ -39,10 +39,7 @@ export declare function refreshAccessToken(currentToken: IdentityToken): Promise
  * @param token - The CLI token passed as ENV variable
  * @returns An instance with the application access tokens.
  */
-export declare function exchangeCustomPartnerToken(token: string): Promise<{
-    accessToken: string;
-    userId: string;
-}>;
+export declare function exchangeCustomPartnerToken(token: string): Promise<ApplicationToken>;
 type IdentityDeviceError = 'authorization_pending' | 'access_denied' | 'expired_token' | 'slow_down' | 'unknown_failure';
 /**
  * Given a deviceCode obtained after starting a device identity flow, request an identity token.
packages/cli-kit/dist/public/node/context/local.d.ts
@@ -125,13 +125,6 @@ export declare function codespacePortForwardingDomain(env?: NodeJS.ProcessEnv):
  * @returns True in case the CLI is run from a cloud environment.
  */
 export declare function isCloudEnvironment(env?: NodeJS.ProcessEnv): boolean;
-/**
- * The token used to run a theme command with a custom password.
- *
- * @param env - Environment variables used when the cli is launched.
- * @returns A string with the token.
- */
-export declare function themeToken(env?: NodeJS.ProcessEnv): string | undefined;
 /**
  * Returns the cloud environment platform name and if the platform support online IDE in case the CLI is run from one of
  * them. Platform name 'localhost' is returned otherwise.

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 73.03% 8388/11485
🟡 Branches 69.59% 4093/5882
🟡 Functions 71.74% 2178/3036
🟡 Lines 73.38% 7937/10816

Test suite run success

1890 tests passing in 857 suites.

Report generated by 🧪jest coverage report action from 5767a23

@karreiro karreiro merged commit 36d4b97 into stable/3.67 Sep 30, 2024
37 checks passed
@karreiro karreiro deleted the fix-theme-sync-3.67 branch September 30, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants