fix: support shared package manager commands - #12
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe package-manager tabs transformation now accepts shared, unprefixed package commands. It stores shared commands under the empty framework key and merges them into named framework groups. Tests and documentation cover ordering, whitespace, install modes, and special characters. ChangesPackage-manager tab transformation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Package-manager tabs now support shared unprefixed commands while preserving framework-specific command behavior. The resulting metadata ordering and command handling are documented and covered across supported install modes, with no current merge-blocking risk identified. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant TabsBlock
participant transformPackageManagerTabs
participant PackageManagerMeta
TabsBlock->>transformPackageManagerTabs: provide shared and framework-specific package lines
transformPackageManagerTabs->>PackageManagerMeta: emit shared and framework command groups
🚥 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 1 functions across 2 files. (2 skipped: 2 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 |
Description
Package-manager tabs currently ignore lines without a framework prefix. Accept those lines as shared commands so framework-independent tools do not need the same commands repeated for each framework. Each source line remains a separate command group:
Shared groups use the empty key in the existing
packagesByFrameworkmetadata and precede named groups. Named groups include shared lines in source order. This works with tanstack.com's existing native package-manager component and fallback selection; no new public attribute or framework name is required.The change preserves existing prefixed commands, prefix whitespace handling, and install modes. Regression coverage includes mixed shared/framework lines and literal arguments inside fenced text. The docs describe the authoring syntax and renderer contract.
Companion website PR: TanStack/tanstack.com#1225. It remains draft until this fix is released and the website dependency is updated.
Verification
pnpm run verifypassed: 133 tests, typecheck, build, docs and skill checks, conformance, size measurements, benchmarks, and package dry run.node --import tsx scripts/audit-external-corpus.tspassed: 10,517 Markdown files audited and 813 MDX files inventoried across 20 pinned repositories.