Skip to content

Commit

Permalink
Merge branch 'develop' into issue-8361-fix-mjs-support
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Aug 24, 2020
2 parents f1ecbaf + eac7859 commit 4e97994
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 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/proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"common-tags": "1.8.0",
"debug": "4.1.1",
"grapheme-splitter": "1.0.4",
"iconv-lite": "0.5.0",
"iconv-lite": "0.6.2",
"lodash": "4.17.19",
"pumpify": "1.5.1",
"through": "2.3.8",
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
16 changes: 7 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14255,14 +14255,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.5:
dependencies:
safer-buffer ">= 2.1.2 < 3"

iconv-lite@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.5.0.tgz#59cdde0a2a297cc2aeb0c6445a195ee89f127550"
integrity sha512-NnEhI9hIEKHOzJ4f697DMz9IQEXr/MMJ5w64vN2/4Ai+wRnvV7SBrL0KLoRlwaKVghOc7LQ5YkPLuX146b6Ydw==
dependencies:
safer-buffer ">= 2.1.2 < 3"

iconv-lite@^0.6.2:
iconv-lite@0.6.2, iconv-lite@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01"
integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==
Expand Down Expand Up @@ -20430,7 +20423,12 @@ proxy-addr@~2.0.5:
forwarded "~0.1.2"
ipaddr.js "1.9.1"

proxy-from-env@1.1.0, proxy-from-env@^1.0.0:
proxy-from-env@1.0.0:
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 4e97994

Please sign in to comment.