Conversation
- Fix run_script to accept cwd parameter instead of using std::env::current_dir() - Add ping command to check npm registry connectivity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @elrrrrrrr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new ping command, which is a great addition for diagnosing registry issues. The refactoring of the configuration logic into config_file.rs and user_config.rs is a significant improvement for code clarity and maintainability. I also appreciate the automatic detection of registry semver support, which enhances the tool's intelligence. The changes are well-implemented, and I have only a couple of minor suggestions for improvement.
crates/pm/src/util/user_config.rs
Outdated
| .cloned() | ||
| .unwrap_or_default(); | ||
| entries.push(new_entry); | ||
| let _ = config.set_array("supports-semver", entries, true); |
There was a problem hiding this comment.
The Result from config.set_array is being ignored. If saving the configuration fails (e.g., due to file permissions), the error will be silently swallowed. This would cause the application to re-run the network probe on every execution, which is inefficient. It's better to handle this Result, at least by logging a warning if it fails.
| let _ = config.set_array("supports-semver", entries, true); | |
| if let Err(e) = config.set_array("supports-semver", entries, true) { | |
| tracing::warn!("Failed to save semver support to config: {}", e); | |
| } |
014304d to
746e7c9
Compare
746e7c9 to
128e2b3
Compare
utoo pingcommand - similar tonpm ping, it displays registry latency and returns whether semver is supported.config_file.rsuser_config.rsconfig.toml