fix(devtools): proper XDG base dir support#1033
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDevtools now exports Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/devtools/src/utils/local-options.ts`:
- Around line 58-59: Update the filePath construction near getOptionsDir in the
local options utility to append only the hashed JSON filename, using the
directory returned by getOptionsDir directly. Keep the storage location
consistent with dev-auth.ts and avoid adding another .nuxt/devtools suffix.
- Around line 22-25: Update getOptionsDir so XDG_CONFIG_HOME values that are
empty strings use the existing $HOME/.config fallback; preserve configured
non-empty values and the final nuxt/devtools path construction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 15ecbdea-386b-4f57-9c6a-6f86f8f80f15
📒 Files selected for processing (2)
packages/devtools/src/dev-auth.tspackages/devtools/src/utils/local-options.ts
🔗 Linked issue
resolves #915
📚 Description
The problem with the current implementation is it fallback to the wrong place. Per the XDG specfication:
Also since the directory is now correctly set, we can remove the dot prefix following other convention