flake: skip npm ci in default shell when lockfile already installed#176
Conversation
The default devShell ran npm ci on every entry whenever package.json was present, wiping and reinstalling node_modules even when it already matched the lockfile. Compare ./package-lock.json to the copy npm writes into ./node_modules/.package-lock.json after a successful install, and skip when they match. First entry (or any entry after the lockfile changes) still runs npm ci. Closes #175 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesDev Shell Optimization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
|
Tip For best results, initiate chat on the files or code changes. SIZE=S |
Summary
defaultdevShell rannpm ci --ignore-scriptson every shell entry whenever apackage.jsonwas present, wiping and reinstallingnode_moduleseven when it already matched the lockfile. Painful for ad-hocnix develop -c <cmd>invocations../package-lock.jsonto the copy npm writes into./node_modules/.package-lock.jsonafter a successful install, and skipnpm ciwhen they match.npm ci.Closes #175
Test plan
nix developin a repo with apackage.json+package-lock.jsontriggersnpm cion first entry, then is a no-op on subsequent entries.package-lock.json, the nextnix developentry re-runsnpm ci.nix developin a repo withoutpackage.jsonremains a no-op.🤖 Generated with Claude Code
Summary by CodeRabbit