| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
✅ Action performed
Review finished.
|
Sorry, something went wrong.
WalkthroughAdds npm v3 lockfile target-level dependency scoping. Workspace build targets are mapped to root-relative lockfile paths, scoped graphs prune unrelated entries, and linked workspace stubs expand to linked workspace dependencies. Unit and integration tests cover workspace selection, cross-workspace links, nameless roots, and complete repository graphs. Documentation and the changelog describe v3 scoping support. 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
Comment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agentsVerify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@integration-test/Analysis/NpmLockV3WorkspaceSpec.hs`: - Around line 86-111: Strengthen the dependency assertions in the tests around apiGraph, cliGraph, sharedGraph, webGraph, and wholeGraph so they require every expected dependency, not merely allow subsets. Add membership checks for each workspace’s complete expected dependency set while preserving the exclusions and linked-workspace version checks, and assert the whole repository graph matches the full expected dependency set rather than only containing a partial list. In `@src/Strategy/Node.hs`: - Around line 333-340: Update manifestToWorkspacePath to propagate the Nothing result from stripProperPrefix rootDir manifestDir instead of converting it to an empty path. Preserve the rootDir case and separator normalization for valid descendants, while ensuring manifests outside the workspace root are excluded rather than assigned the root workspace key.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: e914eac3-43e4-474e-8ed8-2b322f35b584
📥 CommitsReviewing files that changed from the base of the PR and between c45a34a and 36f86b8.
⛔ Files ignored due to path filters (1)
Sorry, something went wrong.
Thread FoundTargets into the package-lock.json v3 analyzer so --only-target / --exclude-target scope the dependency graph to the selected workspaces, following workspace link entries so sibling workspace deps are attributed with real versions. When all targets are selected (the default) the unscoped whole-repo graph is preserved exactly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Apply two semantics-preserving hlint suggestions in Strategy.Node.Npm.PackageLockV3: move mapMaybe inside concatMap in resolveDirectDeps, and fuse concatMap/map in expandLinks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A --only-target selection that matched zero root/workspace entries in a v3 lockfile silently fell back to the whole unscoped graph. Honor the user's filter instead (matching v1/v2 behavior): produce an empty graph and emit a warning naming the unmatched targets. The selection logic is lifted into a pure scopedSelection helper shared by buildGraph and analyze; analyze gains a Logger constraint, threaded from its caller in Strategy.Node. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-workspace link resolution Replace matching build target names against lockfile entries' "name" fields with resolving target names to root-relative workspace paths via package.json manifests (resolveNpmV3WorkspacePaths, adopted from #1734) and matching the lockfile's top-level path keys. npm omits a workspace entry's "name" when the folder basename equals the package name, so name matching silently failed there; path matching does not. Kept from this branch: cross-workspace link expansion (expandLinks), all-selected == unscoped equivalence, and empty graph + warning when the filter matches no root/workspace entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Overview
Scopes package-lock.json v3 results per workspace for --only-target/--exclude-target. Previously the v3 path ignored targets, so every workspace in an npm-workspaces monorepo returned the same blended whole-repo inventory.
Acceptance criteria
fossa analyze --only-target 'npm@./:<workspace-name>' on an npm workspaces monorepo with a v3 root lockfile reports only that workspace's dependencies; default analysis output is unchanged.
Testing plan
Risks
Dev/prod labeling of shared installs is not re-derived per workspace (dev flags in a v3 lockfile are global to the install); scoping only restricts which packages are reported.
Metrics
N/A
References
Path-based workspace resolution adopted from #1734.
Checklist
🤖 Generated with Claude Code