fix(tanstack): add missing ".js" extension for relative imports#641
Conversation
📝 WalkthroughWalkthroughImport statements across four files in the tanstack-query client package were updated to include explicit Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
|
Claude finished @ymc9's task —— View job Code Review for Tanstack Query Import FixesReviewing the addition of ".js" extensions for relative imports in the TanStack Query package. Review Tasks:
✅ Overall Assessment: EXCELLENTThis is a well-executed fix that correctly addresses ESM module resolution requirements. Code Quality & Best Practices ✅Strengths:
Pattern Verification:
Technical Correctness ✅
Performance & Security ✅
Potential IssuesNone identified. This is a straightforward, necessary fix. Test CoverageNo additional tests needed - this is a build/module resolution fix that existing tests will validate. Recommendations
|
|
fixes #607 |
There was a problem hiding this comment.
Pull request overview
This PR fixes module resolution issues by adding .js extensions to relative imports in the tanstack-query package. This change is required for proper ESM module resolution, as the package uses "type": "module" in package.json and TypeScript's verbatimModuleSyntax option.
Changes:
- Added
.jsextensions to all relative imports across React, Vue, and Svelte adapters - Updated imports in the shared common utilities module
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/clients/tanstack-query/src/vue.ts | Added .js extensions to 4 relative imports from common modules |
| packages/clients/tanstack-query/src/svelte/index.svelte.ts | Added .js extensions to 4 relative imports from common modules |
| packages/clients/tanstack-query/src/react.ts | Added .js extensions to 4 relative imports from common modules |
| packages/clients/tanstack-query/src/common/client.ts | Added .js extension to 1 relative import from query-key module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
fixes #607 |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.