Repository navigation
Apply ignore patterns when the theme root is inside a dot-directory - #1375
Open
diogochaves wants to merge 1 commit into
Open
diogochaves wants to merge 1 commit into
diogochaves wants to merge 1 commit into
Conversation
Relative ignore patterns become "**/<pattern>" and are matched against the file's absolute URI. minimatch's "**" does not cross path segments that start with a dot unless `dot: true` is set, so a theme checked out under .worktrees/, ~/.cache/ or any other dot-directory had every relative ignore pattern silently skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
I have signed the CLA! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you adding in this PR?
Fixes #1374
Relative
ignorepatterns in.theme-check.ymlare rewritten to**/<pattern>and matched against the file's absolute URI. minimatch's**does not cross path segments that start with a dot unlessdot: trueis set, so when the theme root is under.worktrees/,~/.cache/or any other dot-directory, every relative pattern (per-check and global) was silently skipped.This passes
{ dot: true }tominimatchinisIgnored. Patterns starting with/were already fine, because the root is substituted literally.What's next? Any followup issues?
None planned.
Tophatting
ignore.spec.tswith the root atfile:/path/.worktrees/theme: per-check and global relative patterns failed before the change and pass after; the root-anchored and no-match cases pass either way.theme-check-node'scheck()built from this branch, on a real theme copied under a dot-directory: before the change 1JSONMissingBlockthat.theme-check.ymlignores fortemplates/product.json(126 offenses); after it 0 (125 offenses). The 125 offenses are identical to a run on the same files in a directory without a dot.vitestfortheme-check-commonandtheme-check-node(5829 tests),pnpm type-checkandprettier --checkpass.Before you deploy
changeset