cypress 9.5.3 → 9.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exec/spawn.js +12 -2
- package/lib/tasks/state.js +1 -1
- package/package.json +3 -3
- package/types/cypress.d.ts +16 -1
package/lib/exec/spawn.js
CHANGED
@@ -26,8 +26,18 @@ const errors = require('../errors');
|
|
26
26
|
|
27
27
|
const isXlibOrLibudevRe = /^(?:Xlib|libudev)/;
|
28
28
|
const isHighSierraWarningRe = /\*\*\* WARNING/;
|
29
|
-
const isRenderWorkerRe = /\.RenderWorker-/;
|
30
|
-
|
29
|
+
const isRenderWorkerRe = /\.RenderWorker-/; // Chromium (which Electron uses) always makes several attempts to connect to the system dbus.
|
30
|
+
// This works fine in most desktop environments, but in a docker container, there is no dbus service
|
31
|
+
// and Chromium emits several error lines, similar to these:
|
32
|
+
// [1957:0406/160550.146820:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
|
33
|
+
// [1957:0406/160550.147994:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
|
34
|
+
// These warnings are absolutely harmless. Failure to connect to dbus means that electron won't be able to access the user's
|
35
|
+
// credential wallet (none exists in a docker container) and won't show up in the system tray (again, none exists).
|
36
|
+
// Failure to connect is expected and normal here, but users frequently misidentify these errors as the cause of their problems.
|
37
|
+
// https://github.com/cypress-io/cypress/issues/19299
|
38
|
+
|
39
|
+
const isDbusWarning = /Failed to connect to the bus:/;
|
40
|
+
const GARBAGE_WARNINGS = [isXlibOrLibudevRe, isHighSierraWarningRe, isRenderWorkerRe, isDbusWarning];
|
31
41
|
|
32
42
|
const isGarbageLineWarning = str => {
|
33
43
|
return _.some(GARBAGE_WARNINGS, re => {
|
package/lib/tasks/state.js
CHANGED
@@ -81,7 +81,7 @@ const getBinaryDir = (version = util.pkgVersion()) => {
|
|
81
81
|
|
82
82
|
const getVersionDir = (version = util.pkgVersion(), buildInfo = util.pkgBuildInfo()) => {
|
83
83
|
if (buildInfo && !buildInfo.stable) {
|
84
|
-
version = ['beta', version, buildInfo.commitBranch, buildInfo.commitSha].join('-');
|
84
|
+
version = ['beta', version, buildInfo.commitBranch, buildInfo.commitSha.slice(0, 8)].join('-');
|
85
85
|
}
|
86
86
|
|
87
87
|
return path.join(getCacheDir(), version);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "9.5.
|
3
|
+
"version": "9.5.4",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -66,8 +66,8 @@
|
|
66
66
|
"types": "types",
|
67
67
|
"buildInfo": {
|
68
68
|
"commitBranch": "develop",
|
69
|
-
"commitSha": "
|
70
|
-
"commitDate": "2022-
|
69
|
+
"commitSha": "6934c0398fea92cc05714b18f21f7f06645a0b70",
|
70
|
+
"commitDate": "2022-04-11T17:25:33.000Z",
|
71
71
|
"stable": true
|
72
72
|
},
|
73
73
|
"description": "Cypress.io end to end testing tool",
|
package/types/cypress.d.ts
CHANGED
@@ -24,9 +24,15 @@ declare namespace Cypress {
|
|
24
24
|
interface CommandFn<T extends keyof ChainableMethods> {
|
25
25
|
(this: Mocha.Context, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
|
26
26
|
}
|
27
|
+
interface CommandFns {
|
28
|
+
[name: string]: (this: Mocha.Context, ...args: any) => any
|
29
|
+
}
|
27
30
|
interface CommandFnWithSubject<T extends keyof ChainableMethods, S> {
|
28
31
|
(this: Mocha.Context, prevSubject: S, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
|
29
32
|
}
|
33
|
+
interface CommandFnsWithSubject<S> {
|
34
|
+
[name: string]: (this: Mocha.Context, prevSubject: S, ...args: any) => any
|
35
|
+
}
|
30
36
|
interface CommandOriginalFn<T extends keyof ChainableMethods> extends CallableFunction {
|
31
37
|
(...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]>
|
32
38
|
}
|
@@ -467,6 +473,14 @@ declare namespace Cypress {
|
|
467
473
|
add<T extends keyof Chainable, S extends PrevSubject>(
|
468
474
|
name: T, options: CommandOptions & { prevSubject: S[] }, fn: CommandFnWithSubject<T, PrevSubjectMap<void>[S]>,
|
469
475
|
): void
|
476
|
+
addAll<T extends keyof Chainable>(fns: CommandFns): void
|
477
|
+
addAll<T extends keyof Chainable>(options: CommandOptions & {prevSubject: false}, fns: CommandFns): void
|
478
|
+
addAll<T extends keyof Chainable, S extends PrevSubject>(
|
479
|
+
options: CommandOptions & { prevSubject: true | S | ['optional'] }, fns: CommandFnsWithSubject<PrevSubjectMap[S]>,
|
480
|
+
): void
|
481
|
+
addAll<T extends keyof Chainable, S extends PrevSubject>(
|
482
|
+
options: CommandOptions & { prevSubject: S[] }, fns: CommandFnsWithSubject<PrevSubjectMap<void>[S]>,
|
483
|
+
): void
|
470
484
|
overwrite<T extends keyof Chainable>(name: T, fn: CommandFnWithOriginalFn<T>): void
|
471
485
|
overwrite<T extends keyof Chainable, S extends PrevSubject>(name: T, fn: CommandFnWithOriginalFnAndSubject<T, PrevSubjectMap[S]>): void
|
472
486
|
}
|
@@ -2341,7 +2355,7 @@ declare namespace Cypress {
|
|
2341
2355
|
type Agent<T extends sinon.SinonSpy> = SinonSpyAgent<T> & T
|
2342
2356
|
|
2343
2357
|
interface CookieDefaults {
|
2344
|
-
preserve: string | string[] | RegExp | ((cookie:
|
2358
|
+
preserve: string | string[] | RegExp | ((cookie: Cookie) => boolean)
|
2345
2359
|
}
|
2346
2360
|
|
2347
2361
|
interface Failable {
|
@@ -5712,6 +5726,7 @@ declare namespace Cypress {
|
|
5712
5726
|
name: string
|
5713
5727
|
/** Override *name* for display purposes only */
|
5714
5728
|
displayName: string
|
5729
|
+
/** additional information to include in the log */
|
5715
5730
|
message: any
|
5716
5731
|
/** Set to false if you want to control the finishing of the command in the log yourself */
|
5717
5732
|
autoEnd: boolean
|