From 6cb484fa46a54581d407a991218c331299920a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Mon, 27 Apr 2026 13:04:08 +0200 Subject: [PATCH] Hide deprecated remix template from app init help text (shop/issues-develop#21581) The `remix` template was still listed in the `--template` help text and validation error message even though it was removed from the interactive `shopify app init` menu in favor of React Router. Mark `remix` as `visible: false` (matching the existing pattern for `node` and `ruby`) so it is no longer advertised, while keeping it as a valid alias for backwards compatibility. --- .changeset/hide-deprecated-remix-template.md | 5 +++++ .../commands/interfaces/app-init.interface.ts | 2 +- docs-shopify.dev/generated/generated_docs_data.json | 4 ++-- .../generated/generated_docs_data_v2.json | 4 ++-- packages/app/src/cli/prompts/init/init.test.ts | 12 +++++++++++- packages/app/src/cli/prompts/init/init.ts | 4 +++- packages/cli/README.md | 2 +- packages/cli/oclif.manifest.json | 2 +- packages/create-app/oclif.manifest.json | 2 +- 9 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 .changeset/hide-deprecated-remix-template.md diff --git a/.changeset/hide-deprecated-remix-template.md b/.changeset/hide-deprecated-remix-template.md new file mode 100644 index 00000000000..f39eca1393f --- /dev/null +++ b/.changeset/hide-deprecated-remix-template.md @@ -0,0 +1,5 @@ +--- +'@shopify/app': patch +--- + +Hide the deprecated `remix` template from `shopify app init --template` help text and validation messages. The React Router template has replaced Remix as the supported choice. Passing `--template remix` continues to work for backwards compatibility. diff --git a/docs-shopify.dev/commands/interfaces/app-init.interface.ts b/docs-shopify.dev/commands/interfaces/app-init.interface.ts index e05279935c4..5a894ab5af6 100644 --- a/docs-shopify.dev/commands/interfaces/app-init.interface.ts +++ b/docs-shopify.dev/commands/interfaces/app-init.interface.ts @@ -48,7 +48,7 @@ export interface appinit { /** * The app template. Accepts one of the following: - - + - - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch] * @environment SHOPIFY_FLAG_TEMPLATE */ diff --git a/docs-shopify.dev/generated/generated_docs_data.json b/docs-shopify.dev/generated/generated_docs_data.json index 7f9685fd0ed..847227501ff 100644 --- a/docs-shopify.dev/generated/generated_docs_data.json +++ b/docs-shopify.dev/generated/generated_docs_data.json @@ -2814,7 +2814,7 @@ "syntaxKind": "PropertySignature", "name": "--template ", "value": "string", - "description": "The app template. Accepts one of the following: - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", + "description": "The app template. Accepts one of the following: - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", "isOptional": true, "environmentValue": "SHOPIFY_FLAG_TEMPLATE" }, @@ -2855,7 +2855,7 @@ "environmentValue": "SHOPIFY_FLAG_PATH" } ], - "value": "export interface appinit {\n /**\n * The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.\n * @environment SHOPIFY_FLAG_CLIENT_ID\n */\n '--client-id '?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor '?: string\n\n /**\n * The name for the new app. When provided, skips the app selection prompt and creates a new app with this name.\n * @environment SHOPIFY_FLAG_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path '?: string\n\n /**\n * The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface appinit {\n /**\n * The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.\n * @environment SHOPIFY_FLAG_CLIENT_ID\n */\n '--client-id '?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor '?: string\n\n /**\n * The name for the new app. When provided, skips the app selection prompt and creates a new app with this name.\n * @environment SHOPIFY_FLAG_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path '?: string\n\n /**\n * The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } } } diff --git a/docs-shopify.dev/generated/generated_docs_data_v2.json b/docs-shopify.dev/generated/generated_docs_data_v2.json index 399d9637bda..71326e7eca9 100644 --- a/docs-shopify.dev/generated/generated_docs_data_v2.json +++ b/docs-shopify.dev/generated/generated_docs_data_v2.json @@ -2128,7 +2128,7 @@ "syntaxKind": "PropertySignature", "name": "--template ", "value": "string", - "description": "The app template. Accepts one of the following: - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", + "description": "The app template. Accepts one of the following: - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", "isOptional": true, "environmentValue": "SHOPIFY_FLAG_TEMPLATE" }, @@ -2169,7 +2169,7 @@ "environmentValue": "SHOPIFY_FLAG_PATH" } ], - "value": "export interface appinit {\n /**\n * The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.\n * @environment SHOPIFY_FLAG_CLIENT_ID\n */\n '--client-id '?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor '?: string\n\n /**\n * The name for the new app. When provided, skips the app selection prompt and creates a new app with this name.\n * @environment SHOPIFY_FLAG_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path '?: string\n\n /**\n * The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + "value": "export interface appinit {\n /**\n * The Client ID of your app. Use this to automatically link your new project to an existing app. Using this flag avoids the app selection prompt.\n * @environment SHOPIFY_FLAG_CLIENT_ID\n */\n '--client-id '?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor '?: string\n\n /**\n * The name for the new app. When provided, skips the app selection prompt and creates a new app with this name.\n * @environment SHOPIFY_FLAG_NAME\n */\n '-n, --name '?: string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager '?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path '?: string\n\n /**\n * The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" } }, "applogssources": { diff --git a/packages/app/src/cli/prompts/init/init.test.ts b/packages/app/src/cli/prompts/init/init.test.ts index bba278daa75..3ed06a32d3e 100644 --- a/packages/app/src/cli/prompts/init/init.test.ts +++ b/packages/app/src/cli/prompts/init/init.test.ts @@ -1,4 +1,4 @@ -import init, {buildNoneTemplate, InitOptions} from './init.js' +import init, {buildNoneTemplate, InitOptions, visibleTemplates} from './init.js' import {describe, expect, vi, test, beforeEach} from 'vitest' import {renderSelectPrompt} from '@shopify/cli-kit/node/ui' import {installGlobalCLIPrompt} from '@shopify/cli-kit/node/is-global' @@ -39,6 +39,16 @@ describe('init', () => { expect(got).toEqual({...options, ...answers, templateType: 'none', globalCLIResult}) }) + describe('visibleTemplates', () => { + test('omits the deprecated remix template so it is not advertised in --template help text', () => { + expect(visibleTemplates).not.toContain('remix') + }) + + test('exposes only the templates that are still actively offered', () => { + expect(visibleTemplates).toEqual(['reactRouter', 'none']) + }) + }) + describe('buildNoneTemplate', () => { test('returns hosted app label and URL when HOSTED_APPS is enabled', () => { // Given diff --git a/packages/app/src/cli/prompts/init/init.ts b/packages/app/src/cli/prompts/init/init.ts index aa375b92447..00d1c3339d9 100644 --- a/packages/app/src/cli/prompts/init/init.ts +++ b/packages/app/src/cli/prompts/init/init.ts @@ -60,7 +60,9 @@ export const templates = { remix: { url: 'https://github.com/Shopify/shopify-app-template-remix', label: 'Build a Remix app', - visible: true, + // The remix template is deprecated: kept accessible via `--template remix` for back-compat, + // but hidden from help text and the interactive prompt. Use `reactRouter` instead. + visible: false, branches: { prompt: 'For your Remix template, which language do you want?', options: { diff --git a/packages/cli/README.md b/packages/cli/README.md index 54f76ab3515..24866f3a032 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -856,7 +856,7 @@ FLAGS --organization-id= [env: SHOPIFY_FLAG_ORGANIZATION_ID] The organization ID. Your organization ID can be found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/ --template= [env: SHOPIFY_FLAG_TEMPLATE] The app template. Accepts one of the following: - - + - - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch] --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 53cacad27c1..b44ecc21b27 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -2605,7 +2605,7 @@ "type": "option" }, "template": { - "description": "The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", + "description": "The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", "env": "SHOPIFY_FLAG_TEMPLATE", "hasDynamicHelp": false, "multiple": false, diff --git a/packages/create-app/oclif.manifest.json b/packages/create-app/oclif.manifest.json index 92bb4203ead..8c5913cf43f 100644 --- a/packages/create-app/oclif.manifest.json +++ b/packages/create-app/oclif.manifest.json @@ -90,7 +90,7 @@ "type": "option" }, "template": { - "description": "The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", + "description": "The app template. Accepts one of the following:\n - \n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify//[subpath]#[branch]", "env": "SHOPIFY_FLAG_TEMPLATE", "hasDynamicHelp": false, "multiple": false,