Skip to content

fix: recursively resolve ** glob segments in workspace patterns - #163

Open
branks wants to merge 1 commit into
QuiiBz:mainfrom
branks:fix/nested-workspace-glob-issue-161
Open

fix: recursively resolve ** glob segments in workspace patterns#163
branks wants to merge 1 commit into
QuiiBz:mainfrom
branks:fix/nested-workspace-glob-issue-161

Conversation

@branks

@branks branks commented Aug 25, 2026

Copy link
Copy Markdown

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 #161

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

Nested packages not found

1 participant