Skip to content

Remove HOSTED_APPS env var, make extension-only template the default#7197

Open
elanalynn wants to merge 1 commit intomainfrom
remove-hosted-apps-env-var
Open

Remove HOSTED_APPS env var, make extension-only template the default#7197
elanalynn wants to merge 1 commit intomainfrom
remove-hosted-apps-env-var

Conversation

@elanalynn
Copy link
Copy Markdown
Contributor

@elanalynn elanalynn commented Apr 3, 2026

Closes https://github.com/shop/issues-admin-extensibility/issues/2391

Summary

  • Removes the HOSTED_APPS environment variable gate introduced in Switch app init template to hosted app when HOSTED_APPS env var is set #7096
  • Makes the shopify-app-template-extension-only template the default for the "none" (extension-only) option in shopify app init, without requiring any env var
  • Removes isHostedAppsMode() helper and hostedApps constant from cli-kit since they're no longer needed

Test plan

  • Run 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 from shopify-app-template-extension-only
  • Verify no env var is needed

🤖 Generated with Claude Code

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>
@elanalynn elanalynn requested a review from a team as a code owner April 3, 2026 23:19
Copilot AI review requested due to automatic review settings April 3, 2026 23:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_APPS entry from environmentVariables.
  • Updated shopify app init to always use shopify-app-template-extension-only (label + URL) for the none option, 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Differences in type declarations

We 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:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants