Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shadcn): use system proxy settings (#3869) #5952

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pomeh
Copy link

@pomeh pomeh commented Nov 28, 2024

Hello,

Here is a small PR in order to use system wide proxy settings for fetching the remote repository.

I used proxy-agent package, which is a "super package" on top of https-proxy-agent (among others).

The main benefit from this change is to use the correct proxy in all situations:

  • if you have defined HTTPS_PROXY (uppercase) instead of https_proxy (lowercase)
  • use http_proxy setting (no HTTPS), in case you've used REGISTRY_URL with an HTTP URL
  • use no_proxy setting whenever it's relevant1
  • add support for dynamic proxy settings (PAC file format)

Note: I've seen the same kind of code in packages/cli source command, but I've not updated it because of its deprecation notice.

Note: I'm not yet fluent with pnpm. There a quite a few changes inside its lock file, but the only 2 commands I ran was pnpm install proxy-agent and pnpm remove https-proxy-agent.

pnpm test are running successfully (on gitpod.io).

Notes:

  • 1: this was my main problem, since https_proxy is set on my env. for all outgoing requests, but no_proxy is configured with an exception for shadcn URL, and this exception was not use within the shadcn cli

Copy link

vercel bot commented Nov 28, 2024

@pomeh is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant