Skip to content

Merge main fixes #5709

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

Merged
merged 3 commits into from
Apr 28, 2025
Merged

Merge main fixes #5709

merged 3 commits into from
Apr 28, 2025

Conversation

vividviolet
Copy link
Member

@vividviolet vividviolet commented Apr 25, 2025

WHAT is this pull request doing?

Merge fixes from this PR

How to test your changes?

Follow testing steps from this PR

Post-release steps

We need to release a patch

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@vividviolet vividviolet requested review from a team as code owners April 25, 2025 17:45
@vividviolet vividviolet added the includes-post-release-steps PRs including this label require additional steps after releasing label Apr 25, 2025
Copy link
Contributor

github-actions bot commented Apr 25, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.65% 9465/12349
🟡 Branches 71.76% 4646/6474
🟡 Functions 76.44% 2456/3213
🟡 Lines 77.18% 8951/11597

Test suite run success

2191 tests passing in 958 suites.

Report generated by 🧪jest coverage report action from 0e6c5c4

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/public/common/array.d.ts
@@ -45,17 +45,4 @@ export declare function uniqBy<T>(array: List<T> | null | undefined, iteratee: V
  * @param values - The arrays of values to exclude.
  * @returns Returns the new array of filtered values.
  */
-export declare function difference<T>(array: List<T> | null | undefined, ...values: List<T>[]): T[];
-/**
- * Converts an array of anything into a human friendly list.
- *
- * Returns a new array that contains the items separated by commas,
- * except for the last item, which is separated by "and".
- * This is useful for creating human-friendly sentences.
- *
- * @param items - Token[].
- * @returns Token[].
- * @example
- * 
- */
-export declare function asHumanFriendlyArray<T>(items: T[]): (T | string)[];
\ No newline at end of file
+export declare function difference<T>(array: List<T> | null | undefined, ...values: List<T>[]): T[];
\ No newline at end of file
packages/cli-kit/dist/public/common/object.d.ts
@@ -1,4 +1,4 @@
-import { Dictionary, ObjectIterator, PropertyPath, ValueKeyIteratee } from 'lodash';
+import { Dictionary, ObjectIterator, ValueKeyIteratee } from 'lodash';
 /**
  * Deep merges the two objects and returns a new object with the merge result.
  *
@@ -53,7 +53,7 @@ export declare function deepDifference(one: object, two: object): [object, objec
  * @param path - The path of the property to get.
  * @returns - Returns the resolved value.
  */
-export declare function getPathValue<T = object>(object: object, path: PropertyPath): T | undefined;
+export declare function getPathValue<T = object>(object: object, path: string): T | undefined;
 /**
  * Sets the value at path of object. If a portion of path doesn't exist, it's create.
  *
@@ -62,15 +62,7 @@ export declare function getPathValue<T = object>(object: object, path: PropertyP
  * @param value - The value to set.
  * @returns - Returns object.
  */
-export declare function setPathValue(object: object, path: PropertyPath, value?: unknown): object;
-/**
- * Removes the property at path of object.
- *
- * @param object - The object to modify.
- * @param path - The path of the property to unset.
- * @returns - Returns true if the property is deleted or not found, else false.
- */
-export declare function unsetPathValue(object: object, path: PropertyPath): boolean;
+export declare function setPathValue(object: object, path: string, value?: unknown): object;
 /**
  * Checks if value is an empty object, collection, map, or set.
  *
packages/cli-kit/dist/public/common/version.d.ts
@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "3.78.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.78.1";
\ No newline at end of file
packages/cli-kit/dist/public/node/api/business-platform.d.ts
@@ -40,6 +40,6 @@ export declare function businessPlatformOrganizationsRequest<T>(query: string, t
  * @param variables - GraphQL variables to pass to the query.
  * @returns The response of the query of generic type <T>.
  */
-export declare function businessPlatformOrganizationsRequestDoc<TResult, TVariables extends Variables>(query: TypedDocumentNode<TResult, TVariables> | TypedDocumentNode<TResult, Exact<{
+export declare function businessPlatformOrganizationsRequestDoc<TResult>(query: TypedDocumentNode<TResult, GraphQLVariables> | TypedDocumentNode<TResult, Exact<{
     [key: string]: never;
-}>>, token: string, organizationId: string, variables?: TVariables): Promise<TResult>;
\ No newline at end of file
+}>>, token: string, organizationId: string, variables?: GraphQLVariables): Promise<TResult>;
\ No newline at end of file
packages/cli-kit/dist/public/node/context/local.d.ts
@@ -25,6 +25,13 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
  * @returns True if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed.
  */
 export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
+/**
+ * It returns true if the App Management API is disabled.
+ * This should only be relevant when using a Partners token.
+ *
+ * @returns True if the App Management API is disabled.
+ */
+export declare function isAppManagementDisabled(): boolean;
 /**
  * Returns true if the environment in which the CLI is running is either
  * a local environment (where dev is present) or a cloud environment (spin).
packages/cli-kit/dist/private/node/session/exchange.d.ts
@@ -26,33 +26,15 @@ export declare function exchangeAccessForApplicationTokens(identityToken: Identi
  */
 export declare function refreshAccessToken(currentToken: IdentityToken): Promise<IdentityToken>;
 /**
- * Given a custom CLI token passed as ENV variable, request a valid Partners API token
+ * Given a custom CLI token passed as ENV variable, request a valid partners API token
  * This token does not accept extra scopes, just the cli one.
- * @param token - The CLI token passed as ENV variable 
+ * @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;
 }>;
-/**
- * Given a custom CLI token passed as ENV variable, request a valid App Management API token
- * @param token - The CLI token passed as ENV variable 
- * @returns An instance with the application access tokens.
- */
-export declare function exchangeCliTokenForAppManagementAccessToken(token: string): Promise<{
-    accessToken: string;
-    userId: string;
-}>;
-/**
- * Given a custom CLI token passed as ENV variable, request a valid Business Platform API token
- * @param token - The CLI token passed as ENV variable 
- * @returns An instance with the application access tokens.
- */
-export declare function exchangeCliTokenForBusinessPlatformAccessToken(token: string): Promise<{
-    accessToken: string;
-    userId: string;
-}>;
 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/private/node/session/scopes.d.ts
@@ -13,10 +13,4 @@ export declare function allDefaultScopes(extraScopes?: string[]): string[];
  * @param extraScopes - custom user-defined scopes
  * @returns Array of scopes
  */
-export declare function apiScopes(api: API, extraScopes?: string[]): string[];
-/**
- * Returns specific scopes required for token exchange with the given API.
- * @param api - API to get the scopes for
- * @returns Array of transformed scopes
- */
-export declare function tokenExchangeScopes(api: API): string[];
\ No newline at end of file
+export declare function apiScopes(api: API, extraScopes?: string[]): string[];
\ No newline at end of file

@vividviolet vividviolet merged commit a314543 into stable/3.78 Apr 28, 2025
28 checks passed
@vividviolet vividviolet deleted the merge-main-fixes branch April 28, 2025 13:44
@gonzaloriestra gonzaloriestra removed the includes-post-release-steps PRs including this label require additional steps after releasing label May 2, 2025
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.

3 participants