Skip to content

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

Merged
karreiro merged 2 commits into
mainfrom
fix-dev-warning
Jul 16, 2026
Merged

Fix warning when running theme commands in valid theme directories#8092
karreiro merged 2 commits 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
Comment thread .changeset/fix-theme-directory-warning.md Outdated
@github-actions github-actions Bot added no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. and removed Area: @shopify/theme @shopify/theme package issues labels Jul 16, 2026
@karreiro
karreiro added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit 0aae751 Jul 16, 2026
29 checks passed
@karreiro
karreiro deleted the fix-dev-warning branch July 16, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants