Skip to content

fix: support shared package manager commands - #12

Open
LadyBluenotes wants to merge 1 commit into
mainfrom
fix/frameworkless-package-manager-tabs
Open

fix: support shared package manager commands#12
LadyBluenotes wants to merge 1 commit into
mainfrom
fix/frameworkless-package-manager-tabs

Conversation

@LadyBluenotes

@LadyBluenotes LadyBluenotes commented Sep 6, 2026

Copy link
Copy Markdown
Member

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:

<!-- ::start:tabs variant="package-manager" mode="local-install" -->

@tanstack/intent@latest list
@tanstack/intent@latest validate
@tanstack/intent@latest review

<!-- ::end:tabs -->

Shared groups use the empty key in the existing packagesByFramework metadata 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 verify passed: 133 tests, typecheck, build, docs and skill checks, conformance, size measurements, benchmarks, and package dry run.
  • node --import tsx scripts/audit-external-corpus.ts passed: 10,517 Markdown files audited and 813 MDX files inventoried across 20 pinned repositories.
  • Verified the locally packed parser with tanstack.com's native package-manager tabs: four package managers, eight framework/no-framework routes, three command lines per block, synchronized blocks, and persisted selection after reload.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 4efbdce4-323c-430d-9db5-8e7d2f4de527

📥 Commits

Reviewing files that changed from the base of the PR and between e56d191 and 8697aef.

📒 Files selected for processing (4)
  • docs/guides/docs-preset.md
  • docs/reference/extensions.md
  • src/extensions/tabs.ts
  • tests/docs-extensions.test.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Package-manager tab transformation

Layer / File(s) Summary
Parse and validate shared commands
src/extensions/tabs.ts, tests/docs-extensions.test.ts
The transformer parses shared commands, merges them with framework-specific commands, emits shared metadata, and validates ordering, whitespace, install modes, and special characters.
Document shared command behavior
docs/guides/docs-preset.md, docs/reference/extensions.md
The documentation describes shared command syntax, metadata structure, fallback behavior, source ordering, and fenced text blocks for literal Markdown characters.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 8697a

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: tannerlinsley

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
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for shared package manager commands.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/frameworkless-package-manager-tabs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant