Skip to content

chore: Proxy mode without experimental tag#147

Merged
Sahilb315 merged 4 commits intomainfrom
chore/proxy-mode-without-experimental-flag
Feb 2, 2026
Merged

chore: Proxy mode without experimental tag#147
Sahilb315 merged 4 commits intomainfrom
chore/proxy-mode-without-experimental-flag

Conversation

@abhisek
Copy link
Member

@abhisek abhisek commented Jan 31, 2026

@abhisek abhisek requested review from a team and Copilot and removed request for Copilot January 31, 2026 06:05
@safedep
Copy link

safedep bot commented Jan 31, 2026

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2026

Codecov Report

❌ Patch coverage is 23.52941% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.38%. Comparing base (4600ab0) to head (ecfd008).

Files with missing lines Patch % Lines
config/config.go 50.00% 3 Missing and 1 partial ⚠️
config/cobra.go 0.00% 3 Missing ⚠️
cmd/executors/npx.go 0.00% 1 Missing ⚠️
cmd/executors/pnpx.go 0.00% 1 Missing ⚠️
cmd/npm/bun.go 0.00% 1 Missing ⚠️
cmd/npm/npm.go 0.00% 1 Missing ⚠️
cmd/npm/pnpm.go 0.00% 1 Missing ⚠️
cmd/npm/yarn.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

Copilot AI review requested due to automatic review settings January 31, 2026 06:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-mode CLI flag and proxy_mode config key while keeping --experimental-proxy-mode hidden 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.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 lodash or sets proxy_mode: true in config, the pmg setup info command will show Proxy Mode: false.
  • Expected: Should show Proxy Mode: true when either proxy_mode or experimental_proxy_mode is 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.

Open in Devin Review

@Sahilb315 Sahilb315 merged commit b5696f9 into main Feb 2, 2026
14 checks passed
@Sahilb315 Sahilb315 deleted the chore/proxy-mode-without-experimental-flag branch February 2, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants