Skip to content

Keep theme file lookups in the theme directory that they name - #1404

Merged
charlespwd merged 1 commit into
mainfrom
osdp-36-theme-file-lookups
Nov 18, 2026
Merged

charlespwd merged 1 commit into
mainfrom
osdp-36-theme-file-lookups

Conversation

@lucyxiang

Copy link
Copy Markdown
Contributor

Checks that look up a theme file by a name from theme content now look only in the directory that the path names (assets, blocks, sections, snippets). A name that leaves that directory gets the same result whether or not a file exists there, and the check does not read the file system for it. This covers MissingAsset, ValidStaticBlockType, JSONMissingSection, MissingTemplate, JSONMissingBlock, ValidBlockTarget, AssetSizeJavaScript and AssetSizeCSS.

The Rust port gets the same change, so both implementations pass the new shared spec cases. A percent-encoded name with backslashes escapes only on Windows, so only the Windows CI job covers that case.

  • pnpm vitest run packages/theme-check-common packages/theme-check-node: 5961 passed.
  • cargo test -p theme-check --test specs: specs/checks 1839 of 1839 passing.

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

lgtm

@charlespwd
charlespwd marked this pull request as ready for review November 18, 2026 15:31
@charlespwd
charlespwd requested a review from a team as a code owner November 18, 2026 15:31
@charlespwd
charlespwd merged commit f8e75c0 into main Nov 18, 2026
8 of 9 checks passed
@charlespwd
charlespwd deleted the osdp-36-theme-file-lookups branch November 18, 2026 15:31
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.

2 participants