Remove HOSTED_APPS env var, make extension-only template the default#7197
Remove HOSTED_APPS env var, make extension-only template the default#7197elanalynn wants to merge 2 commits into
Conversation
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
There was a problem hiding this comment.
Pull request overview
This PR removes the internal HOSTED_APPS feature gate and makes the extension-only (Shopify-hosted Preact app home + extensions, no back-end) template the default “none” option in shopify app init.
Changes:
- Deleted the
isHostedAppsMode()helper and its unit tests from@shopify/cli-kit. - Removed the
HOSTED_APPSentry fromenvironmentVariables. - Updated
shopify app initto always useshopify-app-template-extension-only(label + URL) for thenoneoption, and updated tests accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli-kit/src/public/node/context/local.ts | Removes isHostedAppsMode() since the env-var gate is no longer used. |
| packages/cli-kit/src/public/node/context/local.test.ts | Removes unit tests that validated HOSTED_APPS behavior. |
| packages/cli-kit/src/private/node/constants.ts | Removes environmentVariables.hostedApps constant. |
| packages/app/src/cli/prompts/init/init.ts | Makes none always point to shopify-app-template-extension-only and updates the prompt label accordingly. |
| packages/app/src/cli/prompts/init/init.test.ts | Updates expectations to match the new default template URL/label and removes buildNoneTemplate tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Closing this in favour of this change - #7477 |
|
Closed incorrectly, we will need this after we go live. |
dc172ce to
c17a9b5
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c17a9b5 to
1729091
Compare
The new shopify-app-template-extension-only template was previously gated behind the HOSTED_APPS env var (PR #7096). This removes the env var entirely and makes the hosted app template the default for the "none" (extension-only) option in `shopify app init`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1729091 to
0313f7b
Compare
0313f7b to
81af9eb
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/private/node/constants.d.ts@@ -35,7 +35,6 @@ export declare const environmentVariables: {
skipNetworkLevelRetry: string;
maxRequestTimeForNetworkCalls: string;
disableImportScanning: string;
- hostedApps: string;
};
export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/public/node/context/local.d.ts@@ -25,13 +25,6 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
* @returns True if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed.
*/
export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
-/**
- * Returns true if the hosted apps mode is enabled.
- *
- * @param env - The environment variables from the environment of the current process.
- * @returns True if HOSTED_APPS is truthy.
- */
-export declare function isHostedAppsMode(env?: NodeJS.ProcessEnv): boolean;
/**
* Returns true if the environment in which the CLI is running is either
* a local environment (where dev is present).
|

Hold on merging until we are ready to go live with the new template!
Closes https://github.com/shop/issues-admin-extensibility/issues/2391
Summary
HOSTED_APPSenvironment variable gate introduced in Switch app init template to hosted app when HOSTED_APPS env var is set #7096shopify-app-template-extension-onlytemplate the default for the "none" (extension-only) option inshopify app init, without requiring any env varTest plan
pnpm run shopify app init(noHOSTED_APPSenv var is needed)🤖 Generated with Claude Code