fix(docs-mcp-server): resolve package path on Windows startup#2474
fix(docs-mcp-server): resolve package path on Windows startup#2474colinaaa merged 2 commits intolynx-family:mainfrom
Conversation
Resolve package.json lookup from file URL using fileURLToPath/dirname and add an explicit guard when package discovery fails, preventing startup crashes from readFile(undefined). Made-with: Cursor
🦋 Changeset detectedLatest commit: 97de09a 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe change updates package.json discovery in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
Signed-off-by: Qingyu Wang <40660121+colinaaa@users.noreply.github.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merging this PR will improve performance by 16.77%
Performance Changes
Comparing Footnotes
|
React External#529 Bundle Size — 580.35KiB (0%).97de09a(current) vs 3118b10 main#524(baseline) Bundle metrics
|
| Current #529 |
Baseline #524 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch JohnieXu:fix/docs-mcp-windows-pk... Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#545 Bundle Size — 193.94KiB (0%).97de09a(current) vs 3118b10 main#540(baseline) Bundle metrics
|
| Current #545 |
Baseline #540 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
173 |
173 |
|
66 |
66 |
|
43.94% |
43.94% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #545 |
Baseline #540 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
82.71KiB |
82.71KiB |
Bundle analysis report Branch JohnieXu:fix/docs-mcp-windows-pk... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#8986 Bundle Size — 898.09KiB (-0.03%).97de09a(current) vs 3118b10 main#8981(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch JohnieXu:fix/docs-mcp-windows-pk... Project dashboard Generated by RelativeCI Documentation Report issue |
React Example#7412 Bundle Size — 223.33KiB (0%).97de09a(current) vs 3118b10 main#7407(baseline) Bundle metrics
|
| Current #7412 |
Baseline #7407 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
179 |
179 |
|
69 |
69 |
|
44.48% |
44.48% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #7412 |
Baseline #7407 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
77.58KiB |
77.58KiB |
Bundle analysis report Branch JohnieXu:fix/docs-mcp-windows-pk... Project dashboard
Generated by RelativeCI Documentation Report issue
Summary
fileURLToPath(import.meta.url)+dirname(...)before package discoveryfindPackage.up(...)cannot resolvepackage.jsonreadFile(undefined, 'utf-8')on WindowsTest plan
packages/mcp-servers/docs-mcp-server/main.ts^22 || ^24, current env is Nodev20.19.0)Summary by CodeRabbit
Bug Fixes
Chores