fix: recursively resolve ** glob segments in workspace patterns - #163
Open
branks wants to merge 1 commit into
Open
fix: recursively resolve ** glob segments in workspace patterns#163branks wants to merge 1 commit into
** glob segments in workspace patterns#163branks wants to merge 1 commit into
Conversation
Previously, `packages/**` and `packages/**/*` only expanded a single directory level, so packages nested more than one level deep under a `**` segment (e.g. `packages/level2/level2`, `packages/level3/level3/level3`) were silently skipped and never checked by any rule. `**` now mirrors pnpm's own behavior: if a directory doesn't contain a `package.json`, its subdirectories are traversed recursively, at any depth, until one is found. This is implemented via a new `find_nested_packages` helper used for both the `dir/**` and `dir/**/*` patterns. Also de-duplicates packages discovered via multiple (potentially overlapping) glob patterns, so mixing e.g. `packages/**` and `packages/**/*` in the same workspace config doesn't produce duplicate issues for the same package. Fixes QuiiBz#161 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Previously,
packages/**andpackages/**/*only expanded a single directory level, so packages nested more than one level deep under a**segment (e.g.packages/level2/level2,packages/level3/level3/level3) were silently skipped and never checked by any rule.**now mirrors pnpm's own behavior: if a directory doesn't contain apackage.json, its subdirectories are traversed recursively, at any depth, until one is found. This is implemented via a newfind_nested_packageshelper used for both thedir/**anddir/**/*patterns.Also de-duplicates packages discovered via multiple (potentially overlapping) glob patterns, so mixing e.g.
packages/**andpackages/**/*in the same workspace config doesn't produce duplicate issues for the same package.Fixes #161