Skip to content

Commit b8f1b4f

Browse files
committed
Merge remote-tracking branch 'origin/develop' into issue-19403-perf-reporter-changes
2 parents 0d834bc + 52ed6ed commit b8f1b4f

File tree

10 files changed

+35
-68
lines changed

10 files changed

+35
-68
lines changed

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"postinstall-postinstall": "2.1.0",
9494
"proxyquire": "2.1.3",
9595
"resolve-pkg": "2.0.0",
96-
"shelljs": "0.8.4",
96+
"shelljs": "0.8.5",
9797
"sinon": "7.2.2",
9898
"snap-shot-it": "7.9.6",
9999
"spawn-mock": "1.0.0",

npm/eslint-plugin-dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"chalk": "^2.4.2",
1515
"eslint-rule-composer": "^0.3.0",
1616
"lodash": "^4.17.15",
17-
"shelljs": "^0.8.3"
17+
"shelljs": "0.8.5"
1818
},
1919
"devDependencies": {
2020
"eslint": "^7.22.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
"semantic-release": "17.2.3",
176176
"semantic-release-monorepo": "7.0.3",
177177
"semver": "7.3.2",
178-
"shelljs": "0.8.3",
178+
"shelljs": "0.8.5",
179179
"shx": "0.3.3",
180180
"sinon": "7.3.2",
181181
"snap-shot-it": "7.9.3",

packages/example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@
3535
"gulp-rev-all": "2.0.2",
3636
"mocha": "2.5.3",
3737
"resolve-pkg": "2.0.0",
38-
"shelljs": "0.8.4"
38+
"shelljs": "0.8.5"
3939
}
4040
}

packages/launcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"chai-as-promised": "7.1.1",
2727
"cross-env": "6.0.3",
2828
"mocha": "3.5.3",
29-
"shelljs": "0.8.3",
29+
"shelljs": "0.8.5",
3030
"sinon": "^10.0.0",
3131
"sinon-chai": "3.4.0",
3232
"typescript": "^4.2.3"

packages/server/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163
"eventsource": "1.0.7",
164164
"express-session": "1.16.1",
165165
"express-useragent": "1.0.15",
166-
"http-mitm-proxy": "0.7.0",
167166
"https-proxy-agent": "3.0.1",
168167
"istanbul": "0.4.5",
169168
"mocha": "7.1.0",

system-tests/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"fluent-ffmpeg": "2.1.2",
5151
"fs-extra": "8.1.0",
5252
"glob": "7.2.0",
53-
"http-mitm-proxy": "0.7.0",
5453
"https-proxy-agent": "3.0.1",
5554
"human-interval": "1.0.0",
5655
"image-size": "0.8.3",

system-tests/test/network_error_handling_spec.js

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const _ = require('lodash')
22
const express = require('express')
3-
const http = require('http')
4-
const https = require('https')
53
const path = require('path')
64
const debug = require('debug')('cypress:server:network-error-handling-spec')
75
const Promise = require('bluebird')
@@ -12,7 +10,6 @@ const chrome = require('@packages/server/lib/browsers/chrome')
1210
const systemTests = require('../lib/system-tests').default
1311
const random = require('@packages/server/lib/util/random')
1412
const Fixtures = require('../lib/fixtures')
15-
let mitmProxy = require('http-mitm-proxy')
1613

1714
const PORT = 13370
1815
const PROXY_PORT = 13371
@@ -348,19 +345,19 @@ describe('e2e network error handling', function () {
348345
})
349346

350347
context('Cypress', () => {
348+
let debugProxy
349+
351350
beforeEach(() => {
352351
delete process.env.HTTP_PROXY
353352
delete process.env.HTTPS_PROXY
354353

355-
return delete process.env.NO_PROXY
354+
delete process.env.NO_PROXY
356355
})
357356

358-
afterEach(function () {
359-
if (this.debugProxy) {
360-
return this.debugProxy.stop()
361-
.then(() => {
362-
this.debugProxy = null
363-
})
357+
afterEach(async function () {
358+
if (debugProxy) {
359+
await debugProxy.stop()
360+
debugProxy = null
364361
}
365362
})
366363

@@ -415,11 +412,11 @@ describe('e2e network error handling', function () {
415412
return true
416413
})
417414

418-
this.debugProxy = new DebugProxy({
415+
debugProxy = new DebugProxy({
419416
onConnect,
420417
})
421418

422-
return this.debugProxy
419+
return debugProxy
423420
.start(PROXY_PORT)
424421
.then(() => {
425422
process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}`
@@ -465,9 +462,9 @@ describe('e2e network error handling', function () {
465462
})
466463

467464
it('behind a proxy', function () {
468-
this.debugProxy = new DebugProxy()
465+
debugProxy = new DebugProxy()
469466

470-
return this.debugProxy
467+
return debugProxy
471468
.start(PROXY_PORT)
472469
.then(() => {
473470
process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}`
@@ -485,27 +482,22 @@ describe('e2e network error handling', function () {
485482
})
486483
})
487484

488-
it('behind a proxy with transfer-encoding: chunked', function () {
489-
mitmProxy = mitmProxy()
490-
491-
mitmProxy.onRequest((ctx, callback) => {
492-
return callback()
493-
})
494-
495-
mitmProxy.listen({
496-
host: '127.0.0.1',
497-
port: PROXY_PORT,
498-
keepAlive: true,
499-
httpAgent: http.globalAgent,
500-
httpsAgent: https.globalAgent,
501-
forceSNI: false,
502-
forceChunkedRequest: true,
485+
it('behind a proxy with transfer-encoding: chunked', async function () {
486+
debugProxy = new DebugProxy({
487+
onRequest: (reqUrl, req, res) => {
488+
expect(req.headers).to.have.property('content-length')
489+
// delete content-length to force te: chunked
490+
delete req.headers['content-length']
491+
debugProxy._onRequest(reqUrl, req, res)
492+
},
503493
})
504494

505495
process.env.HTTP_PROXY = `http://localhost:${PROXY_PORT}`
506496
process.env.NO_PROXY = ''
507497

508-
return systemTests.exec(this, {
498+
await debugProxy.start(PROXY_PORT)
499+
500+
await systemTests.exec(this, {
509501
spec: 'network_error_304_handling_spec.js',
510502
video: false,
511503
config: {

yarn.lock

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10983,7 +10983,7 @@ async@>=0.2.9, async@^3.2.0:
1098310983
resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720"
1098410984
integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==
1098510985

10986-
async@^2.1.4, async@^2.4.1, async@^2.5.0, async@^2.6.2:
10986+
async@^2.1.4, async@^2.4.1, async@^2.6.2:
1098710987
version "2.6.3"
1098810988
resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
1098910989
integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==
@@ -21991,19 +21991,6 @@ http-errors@~1.6.2:
2199121991
setprototypeof "1.1.0"
2199221992
statuses ">= 1.4.0 < 2"
2199321993

21994-
21995-
version "0.7.0"
21996-
resolved "https://registry.yarnpkg.com/http-mitm-proxy/-/http-mitm-proxy-0.7.0.tgz#82933137ae1c06713961afe50f38ca84cf80bb0c"
21997-
integrity sha512-rRMRfQCVwEO31Q6GFiQHfECdMn3Z0ddWWLNgmeyIUDMf0gr/Ek+lhZ17gWzKL4NXZkMc1h982BYl8blRXv7/og==
21998-
dependencies:
21999-
async "^2.5.0"
22000-
debug "^4.1.0"
22001-
mkdirp "^0.5.1"
22002-
node-forge "^0.8.0"
22003-
optimist "^0.6.1"
22004-
semaphore "^1.1.0"
22005-
ws "^3.2.0"
22006-
2200721994
http-parser-js@>=0.5.1:
2200821995
version "0.5.3"
2200921996
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9"
@@ -28361,11 +28348,6 @@ node-forge@^0.10.0:
2836128348
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3"
2836228349
integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==
2836328350

28364-
node-forge@^0.8.0:
28365-
version "0.8.5"
28366-
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.5.tgz#57906f07614dc72762c84cef442f427c0e1b86ee"
28367-
integrity sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q==
28368-
2836928351
node-gyp@^5.0.2, node-gyp@^5.1.0:
2837028352
version "5.1.1"
2837128353
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e"
@@ -35188,7 +35170,7 @@ [email protected]:
3518835170
signale "^1.2.1"
3518935171
yargs "^16.2.0"
3519035172

35191-
[email protected], semaphore@^1.1.0:
35173+
3519235174
version "1.1.0"
3519335175
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa"
3519435176
integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==
@@ -35577,16 +35559,16 @@ [email protected], shell-quote@^1.4.2, shell-quote@^1.6.1:
3557735559
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
3557835560
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
3557935561

35580-
35581-
version "0.8.3"
35582-
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
35583-
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
35562+
35563+
version "0.8.5"
35564+
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c"
35565+
integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==
3558435566
dependencies:
3558535567
glob "^7.0.0"
3558635568
interpret "^1.0.0"
3558735569
rechoir "^0.6.2"
3558835570

35589-
shelljs@0.8.4, shelljs@^0.8.3, shelljs@^0.8.4:
35571+
shelljs@^0.8.4:
3559035572
version "0.8.4"
3559135573
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2"
3559235574
integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==
@@ -41508,7 +41490,7 @@ [email protected]:
4150841490
dependencies:
4150941491
mkdirp "^0.5.1"
4151041492

41511-
[email protected], ws@^3.2.0:
41493+
4151241494
version "3.3.3"
4151341495
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
4151441496
integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==

0 commit comments

Comments
 (0)