@wdio/local-runner 9.0.0-alpha.115 → 9.0.0-alpha.321
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/build/worker.d.ts +3 -3
- package/build/worker.d.ts.map +1 -1
- package/build/worker.js +3 -18
- package/package.json +6 -6
package/build/worker.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import child from 'node:child_process';
|
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
5
|
import type { ChildProcess } from 'node:child_process';
|
|
6
6
|
import type { WritableStreamBuffer } from 'stream-buffers';
|
|
7
|
-
import type {
|
|
7
|
+
import type { Options, Workers } from '@wdio/types';
|
|
8
8
|
/**
|
|
9
9
|
* WorkerInstance
|
|
10
10
|
* responsible for spawning a sub process to run the framework in and handle its
|
|
@@ -14,8 +14,8 @@ export default class WorkerInstance extends EventEmitter implements Workers.Work
|
|
|
14
14
|
cid: string;
|
|
15
15
|
config: Options.Testrunner;
|
|
16
16
|
configFile: string;
|
|
17
|
-
caps: Capabilities
|
|
18
|
-
capabilities: Capabilities
|
|
17
|
+
caps: WebdriverIO.Capabilities;
|
|
18
|
+
capabilities: WebdriverIO.Capabilities;
|
|
19
19
|
specs: string[];
|
|
20
20
|
execArgv: string[];
|
|
21
21
|
retries: number;
|
package/build/worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"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OAAO,CAAC,KAAK,IAAI,CAAW;IAC3E,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,CAAW;IAE3E;;;;;;;;;OASG;gBAEC,MAAM,EAAE,OAAO,CAAC,UAAU,EAC1B,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,gBAAgB,EAC7E,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,oBAAoB;IAkBhC;;OAEG;IACH,YAAY;IA8DZ,OAAO,CAAC,cAAc;IAsDtB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,WAAW;IAkBnB;;;;OAIG;IACH,WAAW,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,aAAa,UAAQ,GAAG,IAAI;CA0B9F"}
|
package/build/worker.js
CHANGED
|
@@ -14,15 +14,6 @@ const stdOutStream = new RunnerStream();
|
|
|
14
14
|
const stdErrStream = new RunnerStream();
|
|
15
15
|
stdOutStream.pipe(process.stdout);
|
|
16
16
|
stdErrStream.pipe(process.stderr);
|
|
17
|
-
var NodeVersion;
|
|
18
|
-
(function (NodeVersion) {
|
|
19
|
-
NodeVersion[NodeVersion["major"] = 0] = "major";
|
|
20
|
-
NodeVersion[NodeVersion["minor"] = 1] = "minor";
|
|
21
|
-
NodeVersion[NodeVersion["patch"] = 2] = "patch";
|
|
22
|
-
})(NodeVersion || (NodeVersion = {}));
|
|
23
|
-
function nodeVersion(type) {
|
|
24
|
-
return process.versions.node.split('.').map(Number)[NodeVersion[type]];
|
|
25
|
-
}
|
|
26
17
|
/**
|
|
27
18
|
* WorkerInstance
|
|
28
19
|
* responsible for spawning a sub process to run the framework in and handle its
|
|
@@ -98,18 +89,12 @@ export default class WorkerInstance extends EventEmitter {
|
|
|
98
89
|
/**
|
|
99
90
|
* autoCompile feature is enabled
|
|
100
91
|
*/
|
|
101
|
-
process.env.
|
|
92
|
+
process.env.WDIO_LOAD_TSX === '1' &&
|
|
102
93
|
/**
|
|
103
94
|
* the `@wdio/cli` didn't already attached the loader to the environment
|
|
104
95
|
*/
|
|
105
|
-
!(process.env.NODE_OPTIONS || '').includes('--
|
|
106
|
-
runnerEnv.NODE_OPTIONS = (runnerEnv.NODE_OPTIONS || '') + ' --
|
|
107
|
-
if (nodeVersion('major') >= 20 || (nodeVersion('major') === 18 && nodeVersion('minor') >= 19)) {
|
|
108
|
-
// Changes in Node 18.19 (and up) and Node 20 affect how TS Node works with source maps, hence the need for this workaround. See:
|
|
109
|
-
// - https://github.com/webdriverio/webdriverio/issues/10901
|
|
110
|
-
// - https://github.com/TypeStrong/ts-node/issues/2053
|
|
111
|
-
runnerEnv.NODE_OPTIONS += ' -r ts-node/register';
|
|
112
|
-
}
|
|
96
|
+
!(process.env.NODE_OPTIONS || '').includes('--import tsx')) {
|
|
97
|
+
runnerEnv.NODE_OPTIONS = (runnerEnv.NODE_OPTIONS || '') + ' --import tsx';
|
|
113
98
|
}
|
|
114
99
|
log.info(`Start worker ${cid} with arg: ${argv}`);
|
|
115
100
|
const childProcess = this.childProcess = child.fork(path.join(__dirname, 'run.js'), argv, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/local-runner",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.321+63953a607",
|
|
4
4
|
"description": "A WebdriverIO runner to run tests locally",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-local-runner",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"typeScriptVersion": "3.8.3",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "^20.1.0",
|
|
34
|
-
"@wdio/logger": "9.0.0-alpha.
|
|
35
|
-
"@wdio/repl": "9.0.0-alpha.
|
|
36
|
-
"@wdio/runner": "9.0.0-alpha.
|
|
37
|
-
"@wdio/types": "9.0.0-alpha.
|
|
34
|
+
"@wdio/logger": "9.0.0-alpha.321+63953a607",
|
|
35
|
+
"@wdio/repl": "9.0.0-alpha.321+63953a607",
|
|
36
|
+
"@wdio/runner": "9.0.0-alpha.321+63953a607",
|
|
37
|
+
"@wdio/types": "9.0.0-alpha.321+63953a607",
|
|
38
38
|
"async-exit-hook": "^2.0.1",
|
|
39
39
|
"split2": "^4.1.0",
|
|
40
40
|
"stream-buffers": "^3.0.2"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "63953a6079023cb390a113fe5ce1c1b01b8e4bb6"
|
|
50
50
|
}
|