Repository navigation
Fix: Workspace License Issues - #3
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughThe pull request updates dependency resolution strategy by introducing a multi-path resolution mechanism for locating package.json files, adds license file detection to package metadata retrieval, and refactors npm audit execution to automatically detect and use pnpm or npm based on lock file presence. Changes
Sequence DiagramssequenceDiagram
participant Aggregator as Aggregator
participant Utils as Utils<br/>(resolvePackageJsonPath)
participant FS as Filesystem
participant LicenseHelper as License Helper<br/>(findLicenseFile)
Aggregator->>Utils: resolvePackageJsonPath(pkgName, resolvePaths)
Utils->>FS: Check multiple resolve paths
FS-->>Utils: Return found path or undefined
alt Path found
Aggregator->>Utils: readLicenseFromPackageJson(pkgName, resolvePaths)
Utils->>FS: Read package.json
FS-->>Utils: Package metadata
Utils->>LicenseHelper: findLicenseFile(directory)
LicenseHelper->>FS: Search for license files
FS-->>LicenseHelper: License file name or undefined
LicenseHelper-->>Utils: Return license file
Utils-->>Aggregator: {license, licenseFile}
else Path not found
Utils-->>Aggregator: undefined
end
sequenceDiagram
participant Runner as npmAudit Runner
participant Detector as Lock File<br/>Detector
participant FS as Filesystem
participant Tool as Execution<br/>Tool
Runner->>Detector: findLockDir(projectPath)
Detector->>FS: Check for pnpm-lock.yaml
FS-->>Detector: Found or not found
alt pnpm lock found
Detector->>FS: Confirm pnpm-lock.yaml exists
FS-->>Detector: true
Detector-->>Runner: lockDir, use pnpm
else pnpm not found
Detector->>FS: Check for npm locks
FS-->>Detector: npm-lock or shrinkwrap found
Detector-->>Runner: lockDir, use npm
else no locks found
Detector-->>Runner: undefined, use npm (fallback)
end
Runner->>Tool: Execute audit (selected tool, cwd)
Tool-->>Runner: Parse JSON or capture output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
This was referenced Feb 3, 2026
Merged
Merged
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.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.