Skip to content

Commit

Permalink
Merge branch 'develop' into issue-8359-esmoduleinterop
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding authored Aug 24, 2020
2 parents 0ff11d2 + eac7859 commit add9883
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/https-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"fs-extra": "8.1.0",
"lodash": "4.17.19",
"node-forge": "0.9.0",
"proxy-from-env": "1.1.0",
"proxy-from-env": "1.0.0",
"semaphore": "1.1.0"
},
"devDependencies": {
Expand Down
7 changes: 6 additions & 1 deletion packages/https-proxy/test/integration/proxy_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,13 @@ describe('Proxy', () => {

context('with an upstream proxy', () => {
beforeEach(function () {
// PROXY vars should override npm_config vars, so set them to cause failures if they are used
// @see https://github.com/cypress-io/cypress/pull/8295
process.env.npm_config_proxy = process.env.npm_config_https_proxy = 'http://erroneously-used-npm-proxy.invalid'
process.env.npm_config_noproxy = 'just,some,nonsense'

process.env.NO_PROXY = ''
process.env.HTTP_PROXY = (process.env.HTTPS_PROXY = 'http://localhost:9001')
process.env.HTTP_PROXY = process.env.HTTPS_PROXY = 'http://localhost:9001'

this.upstream = new DebugProxy({
keepRequests: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"concat-stream": "1.6.2",
"debug": "4.1.1",
"lodash": "4.17.19",
"proxy-from-env": "1.1.0"
"proxy-from-env": "1.0.0"
},
"devDependencies": {
"@cypress/debugging-proxy": "2.0.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/network/test/unit/agent_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ describe('lib/agent', function () {
context(testCase.name, function () {
beforeEach(function () {
if (testCase.proxyUrl) {
// PROXY vars should override npm_config vars, so set them to cause failures if they are used
// @see https://github.com/cypress-io/cypress/pull/8295
process.env.npm_config_proxy = process.env.npm_config_https_proxy = 'http://erroneously-used-npm-proxy.invalid'
process.env.npm_config_noproxy = 'just,some,nonsense'

process.env.HTTP_PROXY = process.env.HTTPS_PROXY = testCase.proxyUrl
process.env.NO_PROXY = ''
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/util/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const loadSystemProxySettings = () => {
debug('found proxy environment variables %o', _.pick(process.env, [
'NO_PROXY', 'HTTP_PROXY', 'HTTPS_PROXY',
'no_proxy', 'http_proxy', 'https_proxy',
'npm_config_proxy', 'npm_config_https_proxy',
'npm_config_proxy', 'npm_config_https_proxy', 'npm_config_noproxy',
]))

;['NO_PROXY', 'HTTP_PROXY', 'HTTPS_PROXY'].forEach(copyLowercaseEnvToUppercase)
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20423,7 +20423,12 @@ proxy-addr@~2.0.5:
forwarded "~0.1.2"
ipaddr.js "1.9.1"

[email protected], proxy-from-env@^1.0.0:
[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=

proxy-from-env@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
Expand Down

0 comments on commit add9883

Please sign in to comment.