Repository navigation
fix(scripts): recognize npm-shrinkwrap.json - #3820
Conversation
ECC Tools / Security EvidenceCommit: Security evidence gate passed (success) No security-sensitive scanner-evidence gap detected. Mode: enforce Scanned 2 changed file(s). No missing scanner-evidence signal was detected. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 1 PR taxonomy bucket(s): CI/CD Recommendation. Scanned 2 changed file(s). Roadmap taxonomy buckets: CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 2 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 2 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shrinkwrap detection and precedence scripts/lib/package-manager.js, tests/lib/package-manager.test.js |
The npm configuration recognizes npm-shrinkwrap.json as a lock-file alias. Tests verify direct detection, selection over a saved pnpm preference, and precedence of an explicit packageManager field. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- affaan-m/ECC#3806: Adds isolated-home tests for saved package-manager preferences in the same test area.
Suggested reviewers: affaan-m
Merge Risk: 
Minimal · up to f8b9a
-
The change is mergeable with no supported current-head risk identified.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
[Medium impact] Safe to merge within the reviewed scope. Shrinkwrap selects npm ahead of a global preference without overriding explicit project settings.
|
|
Thanks for the reviews. Here's how I've handled each automated report on
I re-ran |
|
Thank you for contributing fix(scripts): recognize npm-shrinkwrap.json. Your complete reviewed head is preserved with attribution in maintainer integration #3945. The delivered main commit now passes CI, CodeQL and a fresh Supply-Chain Watch after the focused coverage-report and dependency recovery in #3947. We appreciate your patience and your help improving ECC. |
What Changed
Recognize
npm-shrinkwrap.jsonthrough npm's existinglockFileAliasessupport.Why This Change
A project can use
npm-shrinkwrap.jsoninstead ofpackage-lock.json. ECC currently misses that lockfile, so a global pnpm preference causes it to select pnpm and recommendpnpm installfor an npm project.This makes shrinkwrap follow the same detection priority as
package-lock.json. Explicit project configuration still takes precedence.Testing Done
packageManagerfield.npm shrinkwrap --ignore-scripts --offlinecommand in an isolated project; ECC selects npm from the lockfile both before and after conversion.npm test: 8,294 passed, 0 failed across 456 files.Type of Change
fix:Bug fixSecurity & Quality Checklist