Rob--W / proxy-from-env

A Node.js library to get the proxy URL for a given URL based on standard environment variables (http_proxy, no_proxy, ...).
MIT License
52 stars 18 forks source link

Add programmatic API for customization NO_PROXY #12

Closed Zekfad closed 4 years ago

Zekfad commented 4 years ago
coveralls commented 4 years ago

Coverage Status

Coverage increased (+1.7%) to 100.0% when pulling a0a6401bca02df66743249528dae12382adb51a2 on Zekfad:master into 96d01f8fcfdccfb776735751132930bbf79c4a3a on Rob--W:master.

Zekfad commented 4 years ago

@Rob--W because I used ES2015 syntax for feature implementation this will limit support version for at least >6, in cfd5566c6f8c7c600ea77f41db0409e7758c0f37 you drop non LTS versions in CI, so untested environment could cause unknown behavior. As result I bumped minimum engine to minimum LTS version (v10 as for today), which is also satisfies dev dependencies. Also, because this is breaking change, I bumped minimum version to 2.0.0 to avoid possible errors on really outdated environments. As another possible solution I can add rollup and babel tolling in order to transpile it into ES5 and ECMA duo packed module. What's your thoughts on it?

Rob--W commented 4 years ago

The primary purpose of this library is to offer a "standard" way to determine the proxy URL. Offering options to customize the behavior encourages library consumers to behave in "non-standard" ways, which goes against the goal of this project.

While I can see that some may benefit from the functionality offered in this PR, I'm not going to merge it because it's outside the scope of this library. Thanks for your willingness to make a contribution though!