perf: bundle only the semver functions that stale uses - #323
Conversation
🦋 Changeset detectedLatest commit: 1c2976a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe staleness checks now import individual semver functions instead of using the default import. The classification and normalization behavior remains unchanged. A patch changeset records the import change and smaller bundle. ChangesStaleness semver imports
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The staleness check continues to use the same semver operations and behavior. The change is limited to imports and a release note, with no identified merge risk. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
View your CI Pipeline Execution ↗ for commit 1c2976a
☁️ Nx Cloud last updated this comment at |
commit: |
🎯 Changes
intent staleis the only command that usessemver, and it uses six functions:coerce,diff,eq,gt,parse, andvalid. The default import loaded the package index, which requires all 45 modules, so the whole library went into the staleness chunk.semver/functions/<name>.js), which is the same code that the index re-exports.semvercode goes from 45 modules to 13.stalebenchmarks are unchanged, and a coldintent staleprocess is 1 to 2 ms faster because it loads fewer modules.✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact
Summary by CodeRabbit
intent stalewithout changing its behavior.