feat(cli): add config autoupgrade [on|off|status] commands#7328
feat(cli): add config autoupgrade [on|off|status] commands#7328alfonso-noriega wants to merge 5 commits intomainfrom
Conversation
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260416141350Caution After installing, validate the version by running |
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260416144658Caution After installing, validate the version by running |
1c1f0bb to
bd32cfd
Compare
|
|
||
| static descriptionWithMarkdown = `Enable automatic upgrades for Shopify CLI. | ||
|
|
||
| When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command. |
There was a problem hiding this comment.
What about explaining that it only happens once per day and that it skips major versions?
- Add shopify config autoupgrade on/off/status commands to manage the auto-upgrade preference without needing to run shopify upgrade first - Re-export getAutoUpgradeEnabled and setAutoUpgradeEnabled from the public @shopify/cli-kit/node/upgrade module - Skip the upgrade prompt in promptAutoUpgrade() when already configured, so shopify upgrade no longer re-prompts after the preference is set
- Add shopify config autoupgrade on/off/status commands to manage the auto-upgrade preference without needing to run shopify upgrade first - Re-export getAutoUpgradeEnabled and setAutoUpgradeEnabled from the public @shopify/cli-kit/node/upgrade module - Skip the upgrade prompt in promptAutoUpgrade() when already configured, so shopify upgrade no longer re-prompts after the preference is set
bd32cfd to
2540ab8
Compare
f1995d9 to
dde281e
Compare
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@@ -1,3 +1,5 @@
+import { getAutoUpgradeEnabled, setAutoUpgradeEnabled } from '../../private/node/conf-store.js';
+export { getAutoUpgradeEnabled, setAutoUpgradeEnabled };
/**
* Utility function for generating an install command for the user to run
* to install an updated version of Shopify CLI.
|

What
Adds
shopify config autoupgrade [on|off|status]commands so users can manage the auto-upgrade preference directly, without having to first runshopify upgrade.Why
Previously, the only way to configure auto-upgrade was through the interactive prompt that appears during
shopify upgrade. This is now a first-class config command, consistent with howconfig autocorrectworks.Changes
shopify config autoupgrade on— enables auto-upgradeshopify config autoupgrade off— disables auto-upgradeshopify config autoupgrade status— shows current state (on / off / not yet configured)Re-exports
getAutoUpgradeEnabledandsetAutoUpgradeEnabledfrom the public@shopify/cli-kit/node/upgrademodule so the new commands can consume them.Updates
promptAutoUpgrade()to skip the prompt when the preference is already set, soshopify upgradewon't re-prompt after the user configures it via these commands (or from a previous upgrade run).