chore: Proxy mode without experimental tag#147
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 37.35% 37.38% +0.02%
==========================================
Files 84 84
Lines 5102 5107 +5
==========================================
+ Hits 1906 1909 +3
- Misses 3018 3021 +3
+ Partials 178 177 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates proxy mode to be enabled via non-experimental user-facing config/flags while retaining backward compatibility with the previous experimental flag/config key.
Changes:
- Introduces
--proxy-modeCLI flag andproxy_modeconfig key while keeping--experimental-proxy-modehidden for compatibility. - Adds a runtime helper (
IsProxyModeEnabled) to treat old/new toggles equivalently. - Updates docs and config template examples to use the new flag/config key.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/proxy-mode.md | Updates usage/config docs from experimental flag/key to --proxy-mode / proxy_mode. |
| config/config.template.yml | Renames the template key from experimental_proxy_mode to proxy_mode. |
| config/config.go | Adds ProxyMode field and IsProxyModeEnabled() helper; renames internal config constants. |
| config/cobra.go | Adds --proxy-mode flag and hides --experimental-proxy-mode. |
| cmd/npm/yarn.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
| cmd/npm/pnpm.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
| cmd/npm/npm.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
| cmd/npm/bun.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
| cmd/executors/pnpx.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
| cmd/executors/npx.go | Switches proxy-mode gating to IsProxyModeEnabled(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🟡 1 issue in files not directly in the diff
🟡 Info command shows incorrect proxy mode status when using new --proxy-mode flag (cmd/setup/info.go:38)
The pmg setup info command displays incorrect proxy mode status after this PR's changes.
Click to expand
Issue
The PR introduces a new --proxy-mode flag and proxy_mode config option alongside the deprecated --experimental-proxy-mode. The PR correctly updates all executor files to use the new config.IsProxyModeEnabled() helper method which checks both flags.
However, the info display at cmd/setup/info.go:38 was not updated and still only checks ExperimentalProxyMode:
configEntries["Proxy Mode"] = strconv.FormatBool(cfg.Config.ExperimentalProxyMode)Actual vs Expected
- Actual: When a user runs
pmg --proxy-mode npm install lodashor setsproxy_mode: truein config, thepmg setup infocommand will showProxy Mode: false. - Expected: Should show
Proxy Mode: truewhen eitherproxy_modeorexperimental_proxy_modeis enabled.
Impact
Users enabling proxy mode via the new recommended flag will see misleading information in the setup info output, causing confusion about whether proxy mode is actually enabled.
Recommendation: Update line 38 to use the new helper method: configEntries["Proxy Mode"] = strconv.FormatBool(cfg.IsProxyModeEnabled())
View issue and 6 additional flags in Devin Review.
Uh oh!
There was an error while loading. Please reload this page.