This repository was archived by the owner on Jan 26, 2026. It is now read-only.
fix: handle bun and npm workspaces without --yarn-workspaces flag#6
Merged
zedrdave merged 1 commit intoqualisero:mainfrom Jan 7, 2026
Merged
fix: handle bun and npm workspaces without --yarn-workspaces flag#6zedrdave merged 1 commit intoqualisero:mainfrom
zedrdave merged 1 commit intoqualisero:mainfrom
Conversation
When a project has 'workspaces' in package.json but uses bun or npm as the packageManager, passing --yarn-workspaces to scip-typescript would cause failures because: 1. --yarn-workspaces triggers 'yarn workspaces info' internally 2. corepack intercepts and fails due to packageManager mismatch 3. scip-typescript exits with code 1 This fix checks the packageManager field before deciding on workspace flags: - bun@* → return [] (no flags, use root tsconfig with includes) - npm@* → return [] (scip-typescript lacks --npm-workspaces anyway) - yarn@* or unset → return ['--yarn-workspaces'] (existing behavior) Also: - Add scip_reindex tool for manual index regeneration - Add output truncation (2000 lines / 50KB limit) matching other pi extensions - Add comprehensive tests for workspace detection Fixes indexing for bun monorepos and npm workspaces.
zedrdave
approved these changes
Jan 7, 2026
Member
zedrdave
left a comment
There was a problem hiding this comment.
Looks good and merging, but might want to look into outsourcing truncation to an external package…
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problems
1. Bun/npm workspace detection fails
When a project has
workspacesin package.json but uses bun or npm as thepackageManager, passing--yarn-workspacesto scip-typescript causes failures because:--yarn-workspacestriggersyarn workspaces infointernally2. Untruncated output causes context overflow
Large codebases would return massive SCIP results, causing:
Solutions
Workspace fix
Check the
packageManagerfield before deciding on workspace flags:bun@*→ return[](no flags, use root tsconfig with includes)npm@*→ return[](scip-typescript lacks--npm-workspacesanyway)yarn@*or unset → return['--yarn-workspaces'](existing behavior)Output truncation
All tools now truncate output to 2000 lines / 50KB (whichever is hit first), matching other pi extensions like osgrep, fd, ast-grep, etc.
Additional Changes
Testing
All 67 tests pass.