Skip to content

Fix warning when running theme commands in valid theme directories#8092

Open
karreiro wants to merge 1 commit into
mainfrom
fix-dev-warning
Open

Fix warning when running theme commands in valid theme directories#8092
karreiro wants to merge 1 commit into
mainfrom
fix-dev-warning

Conversation

@karreiro

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fix warning when running theme commands in valid theme directories.

WHAT is this pull request doing?

Updating the list of required directories.

Post-release steps

N/A

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copilot AI review requested due to automatic review settings July 15, 2026 12:35
@karreiro karreiro requested review from a team as code owners July 15, 2026 12:35
@github-actions github-actions Bot added the Area: @shopify/theme @shopify/theme package issues label Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts the heuristic used by the theme CLI to decide whether a working directory “looks like” a theme directory, to avoid showing a warning when running theme commands in certain valid theme setups.

Changes:

  • Loosen hasRequiredThemeDirectories by removing sections from the required directory list.
  • Add a unit test covering the relaxed “minimum required directories” behavior.
  • Add a patch changeset for @shopify/theme.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/theme/src/cli/utilities/theme-fs.ts Updates the directory heuristic for detecting theme directories.
packages/theme/src/cli/utilities/theme-fs.test.ts Adds test coverage for the updated heuristic.
.changeset/fix-theme-directory-warning.md Adds a patch changeset documenting the user-facing warning fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/theme/src/cli/utilities/theme-fs.ts
Comment thread packages/theme/src/cli/utilities/theme-fs.test.ts
'@shopify/theme': patch
---

Fix warning when running theme commands in valid theme directories

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No need for changeset here, since it is already included in the other branch, we don't want to show it again in the next minor.

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

Labels

Area: @shopify/theme @shopify/theme package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants