Skip to content

Skip type-only peers in example imports - #1186

Open
jong-kyung wants to merge 2 commits into
TanStack:mainfrom
jong-kyung:fix/ignore-types-runtime-peers
Open

Skip type-only peers in example imports#1186
jong-kyung wants to merge 2 commits into
TanStack:mainfrom
jong-kyung:fix/ignore-types-runtime-peers

Conversation

@jong-kyung

@jong-kyung jong-kyung commented Aug 28, 2026

Copy link
Copy Markdown

Summary

While opening the Basic Use Table example, the preview failed with the following error:

Error: esm.sh returned invalid metadata for https://esm.sh/@types/react-dom@%5E19.2.4?meta
스크린샷 2026-08-28 오전 11 33 15

The import resolver treated @types/* peer dependencies as runtime packages and requested metadata from esm.sh. This PR excludes type-only peers from runtime peer resolution and adds regression coverage.

After the change, I confirmed that the example renders correctly.

스크린샷 2026-08-28 오전 11 42 22

Summary by CodeRabbit

  • Bug Fixes

    • TypeScript type-definition packages are no longer automatically included when resolving example workspace dependencies.
    • Runtime peer dependencies continue to resolve as expected.
  • Tests

    • Added coverage confirming type-only dependencies are excluded from package resolution.

@coderabbitai

coderabbitai Bot commented Aug 28, 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: Pro Plus

Run ID: 0725049f-22e8-42fc-88b3-337cba3c1536

📥 Commits

Reviewing files that changed from the base of the PR and between 51c17cd and 3d7f0b9.

📒 Files selected for processing (2)
  • src/utils/example-imports.ts
  • tests/example-imports.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Example Import Resolution

Layer / File(s) Summary
Filter type-only peers during resolution
src/utils/example-imports.ts, tests/example-imports.test.ts
The resolver excludes @types/* peer packages. The test confirms that runtime peers are resolved and type-only peers do not trigger metadata requests.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 3d7f0

The change excludes type-only peer packages from runtime example imports and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: tannerlinsley

🚥 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. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: excluding type-only peer dependencies from example import resolution.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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