From a23023e0770df6b3dc87290c000c6eeffd3c7a0c Mon Sep 17 00:00:00 2001 From: Nick Wesselman <27013789+nickwesselman@users.noreply.github.com> Date: Wed, 6 May 2026 10:56:37 -0400 Subject: [PATCH] Use consistent label for extension-only template in app init The HOSTED_APPS env var should only change the template URL, not the displayed label. Co-Authored-By: Claude Opus 4.7 --- packages/app/src/cli/prompts/init/init.test.ts | 6 ++---- packages/app/src/cli/prompts/init/init.ts | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/app/src/cli/prompts/init/init.test.ts b/packages/app/src/cli/prompts/init/init.test.ts index 3ed06a32d3e..af3ee97d026 100644 --- a/packages/app/src/cli/prompts/init/init.test.ts +++ b/packages/app/src/cli/prompts/init/init.test.ts @@ -50,7 +50,7 @@ describe('init', () => { }) describe('buildNoneTemplate', () => { - test('returns hosted app label and URL when HOSTED_APPS is enabled', () => { + test('returns extension-only template URL when HOSTED_APPS is enabled', () => { // Given vi.mocked(isHostedAppsMode).mockReturnValue(true) @@ -58,11 +58,10 @@ describe('init', () => { const got = buildNoneTemplate() // Then - expect(got.label).toBe('Build an extension-only app (Shopify-hosted Preact app home and extensions, no back-end)') expect(got.url).toBe('https://github.com/Shopify/shopify-app-template-extension-only') }) - test('returns default label and URL when HOSTED_APPS is not set', () => { + test('returns default template URL when HOSTED_APPS is not set', () => { // Given vi.mocked(isHostedAppsMode).mockReturnValue(false) @@ -70,7 +69,6 @@ describe('init', () => { const got = buildNoneTemplate() // Then - expect(got.label).toBe('Build an extension-only app') expect(got.url).toBe('https://github.com/Shopify/shopify-app-template-none') }) }) diff --git a/packages/app/src/cli/prompts/init/init.ts b/packages/app/src/cli/prompts/init/init.ts index 00d1c3339d9..5b840ba0059 100644 --- a/packages/app/src/cli/prompts/init/init.ts +++ b/packages/app/src/cli/prompts/init/init.ts @@ -30,14 +30,11 @@ interface Template { } export function buildNoneTemplate(): Template { - const hostedAppsEnabled = isHostedAppsMode() return { - url: hostedAppsEnabled + url: isHostedAppsMode() ? 'https://github.com/Shopify/shopify-app-template-extension-only' : 'https://github.com/Shopify/shopify-app-template-none', - label: hostedAppsEnabled - ? 'Build an extension-only app (Shopify-hosted Preact app home and extensions, no back-end)' - : 'Build an extension-only app', + label: 'Build an extension-only app', visible: true, } }