Skip to content

Fix Theme Check errors for unknown extended configs - #9114

Open
MillanWangShopify wants to merge 1 commit into
mainfrom
torrent/cli-8-show-a-clear-error-when-a-theme-check-co
Open

MillanWangShopify wants to merge 1 commit into
mainfrom
torrent/cli-8-show-a-clear-error-when-a-theme-check-co

Conversation

@MillanWangShopify

@MillanWangShopify MillanWangShopify commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

A .theme-check.yml file that extends theme-check:shopify makes shopify theme check fail with an unhandled ENOENT. A missing extended config file has the same problem, including when no --config flag is given.

WHAT is this pull request doing?

Show a handled error that names the missing config and lists the built-in configs. Verify missing file errors against config loading so unrelated Theme Check failures keep their original error. Add regression tests with real config files. Refresh the generated App Logs types to match the schema used by CI.

Before:

ENOENT: no such file or directory, open 'theme-check:shopify'

After:

Unknown Theme Check config: theme-check:shopify

Use a built-in config (theme-check:nothing, theme-check:recommended, theme-check:theme-app-extension, theme-check:all), or a path to an existing .theme-check.yml file. Check the extends values in your Theme Check config.

How to manually test your changes?

  1. In a local theme, set .theme-check.yml to extends: theme-check:shopify.
  2. Run pnpm shopify theme check --path /path/to/theme without --config. Confirm the error names theme-check:shopify and lists the built-in configs.
  3. Set extends: ./missing.yml and run the command again. Confirm the error names the missing config file.
  4. Set extends: theme-check:recommended and confirm Theme Check runs normally.

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 this bug fix) and added a changeset

@github-actions github-actions Bot added the Area: @shopify/theme @shopify/theme package issues label Nov 9, 2026
@MillanWangShopify
MillanWangShopify force-pushed the torrent/cli-8-show-a-clear-error-when-a-theme-check-co branch from 4fb1de6 to 5394ae8 Compare November 10, 2026 02:56
Handle missing extended configs without masking unrelated Theme Check failures. Recognize identifiers in Windows readFile paths and normalize missing extended config paths for consistent output.

Refresh generated App Logs types to match the live schema required by CI.

Co-authored-by: Millan Wang <millan.wang@shopify.com>
@MillanWangShopify
MillanWangShopify force-pushed the torrent/cli-8-show-a-clear-error-when-a-theme-check-co branch from 5394ae8 to 42fdd36 Compare November 10, 2026 03:06
@MillanWangShopify
MillanWangShopify marked this pull request as ready for review November 10, 2026 03:32
@MillanWangShopify
MillanWangShopify requested review from a team as code owners November 10, 2026 03:32

This branch has not been deployed

No deployments
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.

1 participant