Repository navigation
[stable/5.2] Build release notes from the fixed version group only - #9208
Merged
Merged
Conversation
release-notes.js read every package's changelog section for the release's version. @shopify/ui-extensions-server-kit versions on its own and has old sections for 5.2.0 through 5.5.1, so the 5.2.0 release notes listed two entries from 2023. Read only the packages in .changeset/config.json's fixed group.
dmerand
marked this pull request as ready for review
December 2, 2026 21:42
craigmichaelmartin
approved these changes
Dec 4, 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/public/common/version.d.ts@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "5.2.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "5.2.1";
\ No newline at end of file
packages/cli-kit/dist/private/node/session.d.ts@@ -61,53 +61,21 @@ export interface OAuthSession {
appManagement?: string;
userId: string;
}
-/**
- * What a command analytics user ID identifies:
- *
- * - `account`: a Shopify account UUID.
- * - `store_admin_user`: the numeric ID of a user of a store's admin.
- * - `preview_store_shop`: the shop ID that a preview store created without an account reports.
- * - `credential`: a pseudonym derived from a token or a password.
- */
-export type UserIdKind = 'account' | 'store_admin_user' | 'preview_store_shop' | 'credential';
-/** A command analytics user ID and what it identifies. `kind` is `undefined` when that is not known. */
-interface AnalyticsUserId {
- id: string;
- kind: UserIdKind | undefined;
-}
type AuthMethod = 'partners_token' | 'service_account_token' | 'device_auth' | 'theme_access_token' | 'custom_app_token' | 'none';
/**
- * Retrieves a stable user identifier for analytics, and what it identifies, from one decision, so that the kind always
- * describes the ID that is returned.
+ * Retrieves a stable user identifier for analytics, or `'unknown'` if none applies.
*
* Evaluation order:
- * 1. If an automation token or theme token variable is set, returns a deterministic UUID derived from that secret, of
- * kind `credential`.
- * 2. Otherwise, if `setLastSeenUserIdAfterAuth` was called (e.g. after OAuth), returns that ID and the kind recorded
- * with it.
- * 3. Otherwise, if a persisted CLI session ID is available, returns it, of kind `account`.
- * 4. Otherwise returns `'unknown'`, of no kind.
- *
- * @returns A Promise that resolves to the user ID and its kind.
- */
-export declare function getLastSeenUserIdWithKindAfterAuth(): Promise<AnalyticsUserId>;
-/**
- * Retrieves a stable user identifier for analytics, or `'unknown'` if none applies. The ID is the one that
- * `getLastSeenUserIdWithKindAfterAuth` returns, in the same evaluation order.
+ * 1. If an app automation token or theme token is used, returns a deterministic UUID
+ * derived from that secret.
+ * 2. Otherwise, if `setLastSeenUserIdAfterAuth` was called (e.g. after OAuth), returns that value.
+ * 3. Otherwise, if a persisted CLI session id is available, returns it.
+ * 4. Otherwise returns `'unknown'`.
*
* @returns A Promise that resolves to the user ID as a string.
*/
export declare function getLastSeenUserIdAfterAuth(): Promise<string>;
-/**
- * Records the user ID of the command analytics event and what that ID identifies.
- *
- * `getLastSeenUserIdWithKindAfterAuth` returns the kind only together with this ID. A token variable takes precedence
- * over both, so that the kind never describes an ID that the event does not report.
- *
- * @param id - The user ID.
- * @param kind - What the user ID identifies. `undefined` records that it is not known.
- */
-export declare function setLastSeenUserIdAfterAuth(id: string, kind: UserIdKind | undefined): void;
+export declare function setLastSeenUserIdAfterAuth(id: string): void;
/**
* Retrieves the last seen authentication method used in the current session.
*
packages/cli-kit/dist/public/node/base-command.d.ts@@ -15,14 +15,6 @@ declare abstract class BaseCommand extends Command {
static descriptionWithMarkdown?: string;
static jsonOutputSchema?: JsonOutputSchema;
static get requiresSyncAnalytics(): boolean;
- /**
- * Whether the command's error messages are left out of the analytics event sent to the event collector, because they
- * can quote flag values that hold user data. The value is read before the flags are parsed, so it also covers an
- * error raised by flag parsing.
- *
- * @returns `true` to leave the command's error messages out.
- */
- static get withholdsErrorMessageFromAnalytics(): boolean;
static nonTTYFlagRequirements(_flags: FlagOutput): NonTTYFlagRequirement[];
static descriptionForHelp(): string | undefined;
/** @deprecated Use descriptionForHelp instead. */
packages/cli-kit/dist/public/node/metadata.d.ts@@ -43,13 +43,6 @@ declare const coreData: RuntimeMetadataManager<CmdFieldsFromMonorail, {
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
@@ -72,13 +65,6 @@ export declare const getAllPublicMetadata: () => Partial<CmdFieldsFromMonorail>,
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
@@ -100,13 +86,6 @@ export declare const getAllPublicMetadata: () => Partial<CmdFieldsFromMonorail>,
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
packages/cli-kit/dist/public/node/session.d.ts@@ -20,11 +20,8 @@ export type AccountInfo = UserAccountInfo | ServiceAccountInfo | UnknownAccountI
* Records the user ID that should be attached to command analytics for this process.
*
* @param userId - User identifier to report on the command analytics event.
- * @param kind - What the user ID identifies: a Shopify account UUID (`account`), the numeric ID of a user of a store's
- * admin (`store_admin_user`), the shop ID that a preview store created without an account reports
- * (`preview_store_shop`), or a pseudonym derived from a token or a password (`credential`). Omit it when it is not known.
*/
-export declare function setLastSeenUserId(userId: string, kind?: 'account' | 'store_admin_user' | 'preview_store_shop' | 'credential'): void;
+export declare function setLastSeenUserId(userId: string): void;
/**
* Finds a stored Shopify account session by alias without changing the current session.
*
packages/cli-kit/dist/public/node/store-auth-session.d.ts@@ -103,17 +103,6 @@ export declare function clearStoredStoreAppSession(store: string, userIdOrStorag
* @returns An Admin session, or undefined when no usable session is cached.
*/
export declare function getStoreAuthAdminSession(store: string, storage?: LocalStorage<StoreAuthSessionSchema>): AdminSession | undefined;
-/**
- * What the user ID of a stored store auth session identifies, for command analytics.
- *
- * - A standard session's user ID is the numeric ID of a user of the store's admin.
- * - A preview store created without an account reports its shop ID as the user ID.
- * - A preview store created with a placeholder account reports that account's UUID.
- *
- * @param session - The stored store auth session.
- * @returns The kind of the session's user ID.
- */
-export declare function storedSessionUserIdKind(session: StoredStoreAppSession): 'account' | 'store_admin_user' | 'preview_store_shop';
/**
* Check whether a stored store auth session is expired, including the refresh margin.
*
|
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.
What
.github/scripts/release-notes.jsbuilds the GitHub release notes only from the packages in thefixedgroup of.changeset/config.json.release-notes.test.mjstests it.Why
The script read every package's changelog section for the release's version.
@shopify/ui-extensions-server-kitversions on its own, and its changelog has old sections for 5.2.0 through 5.5.1. So the 5.2.0 release listed two entries from 2023 ("Increase minimum Node version to 18" and "Versioned app config support") until it was edited by hand. Releases 5.2.1 through 5.5.1 would get the same stale entries.A missing
fixedgroup or config file now fails the script instead of printing partial notes.Testing
From the repository root:
node --test .github/scripts/release-notes.test.mjs, andnode .github/scripts/release-notes.js 5.2.0onstable/5.2prints the 5.2.0 notes without the stale entries.