Skip to content

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

Open
elanalynn wants to merge 2 commits into
mainfrom
remove-hosted-apps-env-var
Open

Remove HOSTED_APPS env var, make extension-only template the default#7197
elanalynn wants to merge 2 commits into
mainfrom
remove-hosted-apps-env-var

Conversation

@elanalynn
Copy link
Copy Markdown
Contributor

@elanalynn elanalynn commented Apr 3, 2026

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

Test plan

  • On in this branch in the CLI, run pnpm run shopify app init (no HOSTED_APPS env var is needed)
  • Choose extension-only option
  • Open the generated app and confirm that you have the app home extension

🤖 Generated with Claude Code

@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.

@melissaluu
Copy link
Copy Markdown
Contributor

Closing this in favour of this change - #7477

@melissaluu melissaluu closed this May 7, 2026
@melissaluu
Copy link
Copy Markdown
Contributor

Closed incorrectly, we will need this after we go live.

@melissaluu melissaluu reopened this May 7, 2026
@elanalynn elanalynn force-pushed the remove-hosted-apps-env-var branch from dc172ce to c17a9b5 Compare May 15, 2026 18:52
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label May 15, 2026
@elanalynn elanalynn force-pushed the remove-hosted-apps-env-var branch from c17a9b5 to 1729091 Compare May 15, 2026 18:55
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 force-pushed the remove-hosted-apps-env-var branch from 1729091 to 0313f7b Compare May 15, 2026 21:49
@elanalynn elanalynn requested a review from a team as a code owner May 15, 2026 21:49
@github-actions github-actions Bot added Area: @shopify/cli @shopify/cli package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels May 15, 2026
@elanalynn elanalynn force-pushed the remove-hosted-apps-env-var branch from 0313f7b to 81af9eb Compare May 15, 2026 22:58
@github-actions
Copy link
Copy Markdown
Contributor

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
@@ -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).

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

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants