Skip to content

[stable/5.2] Build release notes from the fixed version group only - #9208

Merged
dmerand merged 2 commits into
stable/5.2from
dmerand/release-notes-fixed-group-stable-5.2
Dec 4, 2026
Merged

dmerand merged 2 commits into
stable/5.2from
dmerand/release-notes-fixed-group-stable-5.2

Conversation

@dmerand

@dmerand dmerand commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

What

.github/scripts/release-notes.js builds the GitHub release notes only from the packages in the fixed group of .changeset/config.json. release-notes.test.mjs tests it.

Why

The script read every package's changelog section for the release's version. @shopify/ui-extensions-server-kit versions 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 fixed group 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, and node .github/scripts/release-notes.js 5.2.0 on stable/5.2 prints the 5.2.0 notes without the stale entries.

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.
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Dec 2, 2026
@dmerand
dmerand marked this pull request as ready for review December 2, 2026 21:42
@dmerand
dmerand requested a review from a team as a code owner December 2, 2026 21:42
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
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/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.
  *

@dmerand
dmerand merged commit 9327657 into stable/5.2 Dec 4, 2026
34 of 36 checks passed
@dmerand
dmerand deleted the dmerand/release-notes-fixed-group-stable-5.2 branch December 4, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants