Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hide-deprecated-remix-template.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface appinit {

/**
* The app template. Accepts one of the following:
- <reactRouter|remix|none>
- <reactRouter|none>
- Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]
* @environment SHOPIFY_FLAG_TEMPLATE
*/
Expand Down
4 changes: 2 additions & 2 deletions docs-shopify.dev/generated/generated_docs_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@
"syntaxKind": "PropertySignature",
"name": "--template <value>",
"value": "string",
"description": "The app template. Accepts one of the following: - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"description": "The app template. Accepts one of the following: - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"isOptional": true,
"environmentValue": "SHOPIFY_FLAG_TEMPLATE"
},
Expand Down Expand Up @@ -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 <value>'?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor <value>'?: 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 <value>'?: 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/<organization-id>\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path <value>'?: string\n\n /**\n * The app template. Accepts one of the following:\n - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template <value>'?: 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 <value>'?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor <value>'?: 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 <value>'?: 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/<organization-id>\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path <value>'?: string\n\n /**\n * The app template. Accepts one of the following:\n - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template <value>'?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs-shopify.dev/generated/generated_docs_data_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,7 @@
"syntaxKind": "PropertySignature",
"name": "--template <value>",
"value": "string",
"description": "The app template. Accepts one of the following: - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"description": "The app template. Accepts one of the following: - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"isOptional": true,
"environmentValue": "SHOPIFY_FLAG_TEMPLATE"
},
Expand Down Expand Up @@ -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 <value>'?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor <value>'?: 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 <value>'?: 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/<organization-id>\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path <value>'?: string\n\n /**\n * The app template. Accepts one of the following:\n - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template <value>'?: 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 <value>'?: string\n\n /**\n * Which flavor of the given template to use.\n * @environment SHOPIFY_FLAG_TEMPLATE_FLAVOR\n */\n '--flavor <value>'?: 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 <value>'?: 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/<organization-id>\n * @environment SHOPIFY_FLAG_ORGANIZATION_ID\n */\n '--organization-id <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PACKAGE_MANAGER\n */\n '-d, --package-manager <value>'?: string\n\n /**\n * \n * @environment SHOPIFY_FLAG_PATH\n */\n '-p, --path <value>'?: string\n\n /**\n * The app template. Accepts one of the following:\n - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]\n * @environment SHOPIFY_FLAG_TEMPLATE\n */\n '--template <value>'?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
}
},
"applogssources": {
Expand Down
12 changes: 11 additions & 1 deletion packages/app/src/cli/prompts/init/init.test.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/cli/prompts/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ FLAGS
--organization-id=<value> [env: SHOPIFY_FLAG_ORGANIZATION_ID] The organization ID. Your organization ID can be
found in your Dev Dashboard URL: https://dev.shopify.com/dashboard/<organization-id>
--template=<value> [env: SHOPIFY_FLAG_TEMPLATE] The app template. Accepts one of the following:
- <reactRouter|remix|none>
- <reactRouter|none>
- Any GitHub repo with optional branch and subpath, e.g.,
https://github.com/Shopify/<repository>/[subpath]#[branch]
--verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output.
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@
"type": "option"
},
"template": {
"description": "The app template. Accepts one of the following:\n - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"description": "The app template. Accepts one of the following:\n - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"env": "SHOPIFY_FLAG_TEMPLATE",
"hasDynamicHelp": false,
"multiple": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"type": "option"
},
"template": {
"description": "The app template. Accepts one of the following:\n - <reactRouter|remix|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"description": "The app template. Accepts one of the following:\n - <reactRouter|none>\n - Any GitHub repo with optional branch and subpath, e.g., https://github.com/Shopify/<repository>/[subpath]#[branch]",
"env": "SHOPIFY_FLAG_TEMPLATE",
"hasDynamicHelp": false,
"multiple": false,
Expand Down
Loading