Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where theme check would fail for theme app extensions #861

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

graygilmore
Copy link
Contributor

What are you adding in this PR?

This bug only surfaces when a developer would manually run the theme check against a theme app extension from the CLI. Inside the VSCode extension we were already doing the right thing so you wouldn't notice it there and the Shopify CLI hardcodes the check when you build your app so you wouldn't notice it there either.

This adds some logic to where we load the config to check if we're inside of an app by looking for two app-like config files. If so, we use theme-check:theme-app-extension as our default checks rather than the recommended. This ensures that our context is appropriately set as 'app' instead of 'theme' and removes false positives when running the check.

This bug only surfaces when a developer would manually run the theme
check against a theme app extension from the CLI. Inside the VSCode
extension we were already doing the right thing so you wouldn't notice
it there and the Shopify CLI hardcodes the check when you build your app
so you wouldn't notice it there either.

This adds some logic to where we load the config to check if we're
inside of an app by looking for two app-like config files. If so, we use
`theme-check:theme-app-extension` as our default checks rather than the
recommended. This ensures that our context is appropriately set as 'app'
instead of 'theme' and removes false positives when running the check.
@graygilmore graygilmore marked this pull request as ready for review March 19, 2025 22:07
@graygilmore graygilmore requested a review from a team as a code owner March 19, 2025 22:07
Copy link
Contributor

@charlespwd charlespwd left a comment

Choose a reason for hiding this comment

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

TY :D

@graygilmore graygilmore merged commit ea80152 into main Mar 20, 2025
7 checks passed
@graygilmore graygilmore deleted the gg-fix-app-ext-theme-check branch March 20, 2025 16:41
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.

[BUG]: MissingSchema error for app extension while build Shopify app
3 participants