Include release notes link in major version upgrade notification#7236
Open
alfonso-noriega wants to merge 3 commits intomainfrom
Open
Include release notes link in major version upgrade notification#7236alfonso-noriega wants to merge 3 commits intomainfrom
alfonso-noriega wants to merge 3 commits intomainfrom
Conversation
alfonso-noriega
commented
Apr 10, 2026
When isMajorVersionChange() is true, extend the notification to include a link to the GitHub release notes so users can review breaking changes before upgrading. Closes shop/issues-develop#22372
9d42ac3 to
765a715
Compare
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/node/upgrade.d.ts@@ -28,11 +28,14 @@ export declare function versionToAutoUpgrade(): string | undefined;
export declare function warnIfUpgradeAvailable(): Promise<void>;
/**
* Generates a message to remind the user to update the CLI.
+ * For major version bumps, appends a link to the GitHub release notes so users
+ * can review breaking changes before deciding to upgrade.
*
* @param version - The version to update to.
+ * @param isMajor - Whether the version bump is a major version change.
* @returns The message to remind the user to update the CLI.
*/
-export declare function getOutputUpdateCLIReminder(version: string): string;
+export declare function getOutputUpdateCLIReminder(version: string, isMajor?: boolean): string;
/**
* Prompts the user to enable or disable automatic upgrades, then persists their choice.
*
|
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.

Summary
Implements Option A from https://github.com/shop/issues-develop/issues/22372.
When
isMajorVersionChange()returns true, the upgrade notification now includes a link to the GitHub release notes so users can review breaking changes before deciding to upgrade.Before:
After:
Changes
packages/cli-kit/src/public/node/upgrade.ts— extendedgetOutputUpdateCLIReminder(version, isMajor = false)to append the GitHub release URL whenisMajoris truepackages/cli-kit/src/public/node/hooks/postrun.ts— passtrueasisMajortogetOutputUpdateCLIReminderwhen a major version change is detectedTest plan
getOutputUpdateCLIReminder: major version includes URL, minor/patch does notautoUpgradeIfNeededtest to assertgetOutputUpdateCLIReminderis called withisMajor: truefor major bumpspnpm nx type-check cli-kit)pnpm nx lint cli-kit)Closes https://github.com/shop/issues-develop/issues/22372