@@ -13,7 +13,6 @@ import {
1313import { outputContent , outputDebug , outputInfo , outputToken , outputWarn } from './output.js'
1414import { cwd , moduleDirectory , sniffForPath } from './path.js'
1515import { exec , isCI } from './system.js'
16- import { renderConfirmationPrompt } from './ui.js'
1716import { isPreReleaseVersion } from './version.js'
1817import { getAutoUpgradeEnabled , setAutoUpgradeEnabled , runAtMinimumInterval } from '../../private/node/conf-store.js'
1918import { CLI_KIT_VERSION } from '../common/version.js'
@@ -81,7 +80,7 @@ export async function runCLIUpgrade(): Promise<void> {
8180
8281/**
8382 * Returns the version to auto-upgrade to, or undefined if auto-upgrade should be skipped.
84- * Auto-upgrade is disabled by default and must be enabled via `shopify upgrade `.
83+ * Auto-upgrade is enabled by default and can be disabled via `setAutoUpgradeEnabled(false) `.
8584 * Also skips for CI, pre-release versions, or when no newer version is available.
8685 *
8786 * @returns The version string to upgrade to, or undefined if no upgrade should happen.
@@ -154,24 +153,6 @@ export function getOutputUpdateCLIReminder(version: string, isMajor = false): st
154153 return base
155154}
156155
157- /**
158- * Prompts the user to enable or disable automatic upgrades, then persists their choice.
159- *
160- * @returns Whether the user chose to enable auto-upgrade.
161- */
162- export async function promptAutoUpgrade ( ) : Promise < boolean > {
163- const current = getAutoUpgradeEnabled ( )
164- if ( current !== undefined ) return current
165-
166- const enabled = await renderConfirmationPrompt ( {
167- message : 'Enable automatic updates for Shopify CLI?' ,
168- confirmationMessage : 'Yes, automatically update' ,
169- cancellationMessage : "No, I'll update manually" ,
170- } )
171- setAutoUpgradeEnabled ( enabled )
172- return enabled
173- }
174-
175156async function upgradeLocalShopify ( projectDir : string , currentVersion : string ) {
176157 const packageJson = ( await findUpAndReadPackageJson ( projectDir ) ) . content
177158 const packageJsonDependencies = packageJson . dependencies ?? { }
0 commit comments