Remove HOSTED_APPS env var, make extension-only template the default#7197
Remove HOSTED_APPS env var, make extension-only template the default#7197
Conversation
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>
|
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.
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@@ -34,7 +34,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).
|
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 varisHostedAppsMode()helper andhostedAppsconstant from cli-kit since they're no longer neededTest plan
shopify app init— the second option should read "Build an extension-only app (Shopify-hosted Preact app home and extensions, no back-end)" and scaffold fromshopify-app-template-extension-only🤖 Generated with Claude Code