Skip to content

Commit ea65f31

Browse files
authored
Merge branch 'develop' into tgriesser/build/root-yarn-install
2 parents f39d314 + fc6131c commit ea65f31

File tree

21 files changed

+127
-38
lines changed

21 files changed

+127
-38
lines changed

npm/create-cypress-tests/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [create-cypress-tests-v1.2.0](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.1.3...create-cypress-tests-v1.2.0) (2021-11-10)
2+
3+
4+
### Features
5+
6+
* **deps:** update dependency electron to v15 🌟 ([#18317](https://github.com/cypress-io/cypress/issues/18317)) ([3095d73](https://github.com/cypress-io/cypress/commit/3095d733e92527ffd67344c6899211e058ceefa3))
7+
18
# [create-cypress-tests-v1.1.3](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.1.2...create-cypress-tests-v1.1.3) (2021-10-29)
29

310

npm/cypress-schematic/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/schematic-v1.6.0](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.3...@cypress/schematic-v1.6.0) (2021-11-10)
2+
3+
4+
### Features
5+
6+
* **deps:** update dependency electron to v15 🌟 ([#18317](https://github.com/cypress-io/cypress/issues/18317)) ([3095d73](https://github.com/cypress-io/cypress/commit/3095d733e92527ffd67344c6899211e058ceefa3))
7+
18
# [@cypress/schematic-v1.5.3](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.2...@cypress/schematic-v1.5.3) (2021-10-29)
29

310

npm/vite-dev-server/tsconfig.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"compilerOptions": {
33
/* Basic Options */
4-
"target": "ESNEXT" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
4+
"target": "ES2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
55
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
66
"moduleResolution": "node",
77
"skipLibCheck": true,
8-
"lib": [
9-
"es2015",
10-
"dom"
11-
] /* Specify library files to be included in the compilation: */,
8+
"lib": ["es2019", "es2020.bigint", "es2020.string", "es2020.symbol.wellknown"] /* Specify library files to be included in the compilation: */,
129
"allowJs": true /* Allow javascript files to be compiled. */,
1310
// "checkJs": true, /* Report errors in .js files. */
1411
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */

npm/vue/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/vue-v3.0.5](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.0.4...@cypress/vue-v3.0.5) (2021-11-10)
2+
3+
4+
### Bug Fixes
5+
6+
* remove outdated npm registry links ([#18727](https://github.com/cypress-io/cypress/issues/18727)) ([4ded6c9](https://github.com/cypress-io/cypress/commit/4ded6c9624134fe6203f5377d62d62809cd27cda))
7+
18
# [@cypress/vue-v3.0.4](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.0.3...@cypress/vue-v3.0.4) (2021-10-29)
29

310

npm/webpack-preprocessor/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [@cypress/webpack-preprocessor-v5.10.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.9.1...@cypress/webpack-preprocessor-v5.10.0) (2021-11-10)
2+
3+
4+
### Bug Fixes
5+
6+
* remove outdated npm registry links ([#18727](https://github.com/cypress-io/cypress/issues/18727)) ([4ded6c9](https://github.com/cypress-io/cypress/commit/4ded6c9624134fe6203f5377d62d62809cd27cda))
7+
8+
9+
### Features
10+
11+
* **deps:** update dependency electron to v15 🌟 ([#18317](https://github.com/cypress-io/cypress/issues/18317)) ([3095d73](https://github.com/cypress-io/cypress/commit/3095d733e92527ffd67344c6899211e058ceefa3))
12+
113
# [@cypress/webpack-preprocessor-v5.9.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.9.0...@cypress/webpack-preprocessor-v5.9.1) (2021-06-24)
214

315

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"terminal-banner": "1.1.0",
186186
"through": "2.3.8",
187187
"ts-node": "8.3.0",
188-
"typescript": "^4.2.3",
188+
"typescript": "^4.4.4",
189189
"yarn-deduplicate": "3.1.0"
190190
},
191191
"engines": {

packages/driver/cypress/integration/cy/snapshot_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('driver/src/cy/snapshots', () => {
9999

100100
cy.createSnapshot(null, this.$el)
101101

102-
expect(attr).to.be.calledWith('data-cypress-el', true)
102+
expect(attr).to.be.calledWith('data-cypress-el', 'true')
103103
})
104104

105105
it('removes data-cypress-el attr', function () {

packages/driver/src/cy/commands/agents.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ const onInvoke = function (Cypress, obj, args) {
4646
const { agent } = obj
4747
const agentName = agent._cyName
4848

49-
// bail if we've turned off logging this agent
50-
if (agent._log === false) {
51-
return
52-
}
53-
5449
// fakes are children of the agent created with `withArgs`
5550
const fakes = agent.matchingFakes(args)
5651

@@ -59,6 +54,11 @@ const onInvoke = function (Cypress, obj, args) {
5954
fake._cyLog.set('callCount', fake.callCount)
6055
}
6156

57+
// bail if we've turned off logging this agent
58+
if (agent._log === false) {
59+
return
60+
}
61+
6262
const logProps = {
6363
name: agentName,
6464
message: obj.message,

packages/driver/src/cy/snapshots.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ export const create = ($$, state) => {
144144
const isJqueryElement = $dom.isElement($elToHighlight) && $dom.isJquery($elToHighlight)
145145

146146
if (isJqueryElement) {
147-
// JQuery.attr doesn't support `true` as a value.
148-
// @ts-ignore
149-
($elToHighlight as JQuery<HTMLElement>).attr(HIGHLIGHT_ATTR, true)
147+
($elToHighlight as JQuery<HTMLElement>).attr(HIGHLIGHT_ATTR, 'true')
150148
}
151149

152150
// TODO: throw error here if cy is undefined!

packages/driver/src/cy/testConfigOverrides.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function setConfig (testConfigList: Array<TestConfig>, config, localConfigOverri
3737

3838
try {
3939
config(testConfigOverride)
40-
} catch (e) {
40+
} catch (e: any) {
4141
let err = $errUtils.errByPath('config.invalid_test_override', {
4242
errMsg: e.message,
4343
})

packages/network/lib/client-certificates.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function loadClientCertificateConfig (config) {
218218

219219
try {
220220
pki.certificateFromPem(caRaw)
221-
} catch (error) {
221+
} catch (error: any) {
222222
throw new Error(`Cannot parse CA cert: ${error.message}`)
223223
}
224224

@@ -251,7 +251,7 @@ export function loadClientCertificateConfig (config) {
251251

252252
try {
253253
pemParsed = pki.certificateFromPem(pemRaw)
254-
} catch (error) {
254+
} catch (error: any) {
255255
throw new Error(`Cannot parse PEM cert: ${error.message}`)
256256
}
257257

@@ -279,7 +279,7 @@ export function loadClientCertificateConfig (config) {
279279
throw new Error('Cannot load PEM key')
280280
}
281281
}
282-
} catch (error) {
282+
} catch (error: any) {
283283
throw new Error(`Cannot parse PEM key: ${error.message}`)
284284
}
285285

@@ -332,7 +332,7 @@ export function loadClientCertificateConfig (config) {
332332
`loaded client certificates for ${clientCertificateStore.getCertCount()} URL(s)`,
333333
)
334334
}
335-
} catch (e) {
335+
} catch (e: any) {
336336
debug(
337337
`Failed to load client certificate for clientCertificates[${index}]: ${e.message} ${e.stack}`,
338338
)
@@ -363,7 +363,7 @@ function extractSubjectFromPem (pem): string {
363363
return pem.subject.attributes
364364
.map((attr) => [attr.shortName, attr.value].join('='))
365365
.join(', ')
366-
} catch (e) {
366+
} catch (e: any) {
367367
throw new Error(`Unable to extract subject from PEM file: ${e.message}`)
368368
}
369369
}
@@ -377,7 +377,7 @@ function loadPfx (pfx: Buffer, passphrase: string | undefined) {
377377
const certAsn1 = asn1.fromDer(certDer)
378378

379379
return pkcs12.pkcs12FromAsn1(certAsn1, passphrase)
380-
} catch (e) {
380+
} catch (e: any) {
381381
debug(`loadPfx fail: ${e.message} ${e.stackTrace}`)
382382
throw new Error(`Unable to load PFX file: ${e.message}`)
383383
}
@@ -391,7 +391,7 @@ function extractSubjectFromPfx (pfx) {
391391
const certs = pfx.getBags({ bagType: pki.oids.certBag })[pki.oids.certBag].map((item) => item.cert)
392392

393393
return certs[0].subject.attributes.map((attr) => [attr.shortName, attr.value].join('=')).join(', ')
394-
} catch (e) {
394+
} catch (e: any) {
395395
throw new Error(`Unable to extract subject from PFX file: ${e.message}`)
396396
}
397397
}

packages/proxy/lib/http/response-middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const PatchExpressSetHeader: ResponseMiddleware = function () {
200200
// set the header manually. this way we can retain Node's original error behavior
201201
try {
202202
return originalSetHeader.call(this, name, value)
203-
} catch (err) {
203+
} catch (err: any) {
204204
if (err.code !== 'ERR_INVALID_CHAR') {
205205
throw err
206206
}

packages/rewriter/lib/js.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function _rewriteJsUnsafe (url: string, js: string, deferSourceMapRewrite
5252

5353
try {
5454
astTypes.visit(ast, jsRules)
55-
} catch (err) {
55+
} catch (err: any) {
5656
// if visiting fails, it points to a bug in our rewriting logic, so raise the error to the driver
5757
return _generateDriverError(url, err)
5858
}

packages/rewriter/lib/threads/worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ parentPort!.on('message', async (req: RewriteRequest) => {
6161
const output = await _getOutput()
6262

6363
_reply({ output, threadMs: _getThreadMs() })
64-
} catch (error) {
64+
} catch (error: any) {
6565
_reply({ error, threadMs: _getThreadMs() })
6666
}
6767

packages/runner-shared/src/header/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ export class Header extends Component<HeaderProps> {
262262

263263
if (!this._studioNeedsUrl) return
264264

265+
// Note: changes in TypeScript 4.4.4 made the code below fail the type check.
266+
// ts interprets visitUrl below as (url: null | undefined) => never
267+
// TODO: studio/studio-recorder.js should be converted to ts. And add proper type.
268+
// @ts-ignore
265269
studioRecorder.visitUrl(this.urlInput)
266270

267271
this.urlInput = ''
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
it('test', () => {
2+
const obj = {
3+
foo () {},
4+
}
5+
const stub = cy.stub(obj, 'foo').log(false).as('foo')
6+
7+
obj.foo('foo', 'bar')
8+
expect(stub).to.be.called
9+
})
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const helpers = require('../../support/helpers')
2+
3+
const { createCypress } = helpers
4+
const { runIsolatedCypress } = createCypress()
5+
6+
// https://github.com/cypress-io/cypress/issues/18042
7+
describe('issue 18042', () => {
8+
beforeEach(function () {
9+
return runIsolatedCypress(`cypress/fixtures/issues/issue-18042.js`)
10+
})
11+
12+
it('Call count is shown even if cy.stub().log(false)', function () {
13+
cy.contains('Spies / Stubs (1)').click()
14+
cy.get('.call-count').eq(1).should('have.text', '1')
15+
})
16+
})

packages/server/lib/util/file-opener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const openFile = (fileDetails) => {
1111
if (openerId === 'computer') {
1212
try {
1313
require('electron').shell.showItemInFolder(fileDetails.file)
14-
} catch (err) {
14+
} catch (err: any) {
1515
debug('error opening file: %s', err.stack)
1616
}
1717

packages/web-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@babel/preset-react": "7.9.4",
1212
"@babel/preset-typescript": "7.9.0",
1313
"@babel/register": "7.9.0",
14-
"@types/jsdom": "12.2.4",
14+
"@types/jsdom": "16.2.13",
1515
"@types/mock-require": "2.0.0",
1616
"@types/webpack": "4.41.0",
1717
"@types/webpack-dev-server": "^4.0.0",

patches/react-vtree+3.0.0-beta.1.patch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,30 @@ index bb27d60..a4f244f 100644
100100
+// getRecordData: (index: number) => TNodePublicState;
101101
+// treeData: any;
102102
+// }>) => string;
103+
diff --git a/node_modules/react-vtree/dist/lib/utils.d.ts b/node_modules/react-vtree/dist/lib/utils.d.ts
104+
index bb27d60..d5ac63c 100644
105+
--- a/node_modules/react-vtree/dist/lib/utils.d.ts
106+
+++ b/node_modules/react-vtree/dist/lib/utils.d.ts
107+
@@ -12,14 +12,14 @@ export declare type RequestIdleCallbackDeadline = Readonly<{
108+
didTimeout: boolean;
109+
timeRemaining: () => number;
110+
}>;
111+
-declare global {
112+
- const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle;
113+
- const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void;
114+
- interface Window {
115+
- requestIdleCallback: typeof requestIdleCallback;
116+
- cancelIdleCallback: typeof cancelIdleCallback;
117+
- }
118+
-}
119+
+// declare global {
120+
+// const requestIdleCallback: (callback: (deadline: RequestIdleCallbackDeadline) => void, opts?: RequestIdleCallbackOptions) => RequestIdleCallbackHandle;
121+
+// const cancelIdleCallback: (handle: RequestIdleCallbackHandle) => void;
122+
+// interface Window {
123+
+// requestIdleCallback: typeof requestIdleCallback;
124+
+// cancelIdleCallback: typeof cancelIdleCallback;
125+
+// }
126+
+// }
127+
export declare type DefaultTreeProps = TreeProps<NodeData, NodePublicState<NodeData>, FixedSizeList>;
128+
export declare type DefaultTreeState = TreeState<NodeData, NodePublicState<NodeData>, FixedSizeList>;
129+
export declare type DefaultTreeCreatorOptions = TreeCreatorOptions<NodeData, NodePublicState<NodeData>, DefaultTreeState>;

yarn.lock

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7862,9 +7862,9 @@
78627862
"@types/serve-static" "*"
78637863

78647864
"@types/filesystem@*":
7865-
version "0.0.29"
7866-
resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.29.tgz#ee3748eb5be140dcf980c3bd35f11aec5f7a3748"
7867-
integrity sha512-85/1KfRedmfPGsbK8YzeaQUyV1FQAvMPMTuWFQ5EkLd2w7szhNO96bk3Rh/SKmOfd9co2rCLf0Voy4o7ECBOvw==
7865+
version "0.0.32"
7866+
resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.32.tgz#307df7cc084a2293c3c1a31151b178063e0a8edf"
7867+
integrity sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==
78687868
dependencies:
78697869
"@types/filewriter" "*"
78707870

@@ -7993,14 +7993,14 @@
79937993
dependencies:
79947994
"@types/sizzle" "*"
79957995

7996-
"@types/jsdom@12.2.4":
7997-
version "12.2.4"
7998-
resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-12.2.4.tgz#845cd4d43f95b8406d9b724ec30c03edadcd9528"
7999-
integrity sha512-q+De3S/Ri6U9uPx89YA1XuC+QIBgndIfvBaaJG0pRT8Oqa75k4Mr7G9CRZjIvlbLGIukO/31DFGFJYlQBmXf/A==
7996+
"@types/jsdom@16.2.13":
7997+
version "16.2.13"
7998+
resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.13.tgz#126c8b7441b159d6234610a48de77b6066f1823f"
7999+
integrity sha512-8JQCjdeAidptSsOcRWk2iTm9wCcwn9l+kRG6k5bzUacrnm1ezV4forq0kWjUih/tumAeoG+OspOvQEbbRucBTw==
80008000
dependencies:
80018001
"@types/node" "*"
8002+
"@types/parse5" "*"
80028003
"@types/tough-cookie" "*"
8003-
parse5 "^4.0.0"
80048004

80058005
"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8":
80068006
version "7.0.9"
@@ -29973,7 +29973,7 @@ parse5-sax-parser@^6.0.1:
2997329973
dependencies:
2997429974
parse5 "^6.0.1"
2997529975

29976-
[email protected], parse5@^4.0.0:
29976+
2997729977
version "4.0.0"
2997829978
resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
2997929979
integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==
@@ -38503,7 +38503,7 @@ [email protected]:
3850338503
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
3850438504
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
3850538505

38506-
[email protected], typescript@^4.2.3, typescript@~4.2.4:
38506+
[email protected], typescript@~4.2.4:
3850738507
version "4.2.4"
3850838508
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
3850938509
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
@@ -38513,6 +38513,11 @@ typescript@^3.9.7:
3851338513
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674"
3851438514
integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==
3851538515

38516+
typescript@^4.2.3, typescript@^4.4.4:
38517+
version "4.4.4"
38518+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
38519+
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==
38520+
3851638521
[email protected], ua-parser-js@^0.7.18:
3851738522
version "0.7.24"
3851838523
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.24.tgz#8d3ecea46ed4f1f1d63ec25f17d8568105dc027c"

0 commit comments

Comments
 (0)