@wdio/local-runner 9.14.0 → 9.16.0

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/run.d.ts CHANGED
@@ -6,9 +6,5 @@ interface RunnerInterface extends NodeJS.EventEmitter {
6
6
  [key: string]: unknown;
7
7
  }
8
8
  export declare const runner: RunnerInterface;
9
- /**
10
- * catch sigint messages as they are handled by main process
11
- */
12
- export declare const exitHookFn: (callback: () => void) => void;
13
9
  export {};
14
10
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,YAAY;IACjD,eAAe,EAAE,OAAO,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAYD,eAAO,MAAM,MAAM,EAA8B,eAAe,CAAA;AA8BhE;;GAEG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,IAAI,SAQ9C,CAAA"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,YAAY;IACjD,eAAe,EAAE,OAAO,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAYD,eAAO,MAAM,MAAM,EAA8B,eAAe,CAAA"}
package/build/run.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/run.ts
2
- import exitHook from "async-exit-hook";
2
+ import exitHook from "exit-hook";
3
3
  import Runner from "@wdio/runner";
4
4
  import logger from "@wdio/logger";
5
5
 
@@ -47,16 +47,15 @@ process.on("message", (m) => {
47
47
  }
48
48
  );
49
49
  });
50
- var exitHookFn = (callback) => {
51
- if (!callback) {
52
- return;
53
- }
50
+ exitHook(() => {
54
51
  runner.sigintWasCalled = true;
55
52
  log.info(`Received SIGINT, giving process ${SHUTDOWN_TIMEOUT}ms to shutdown gracefully`);
56
- setTimeout(callback, SHUTDOWN_TIMEOUT);
57
- };
58
- exitHook(exitHookFn);
53
+ return new Promise((resolve) => {
54
+ setTimeout(() => {
55
+ resolve();
56
+ }, SHUTDOWN_TIMEOUT);
57
+ });
58
+ });
59
59
  export {
60
- exitHookFn,
61
60
  runner
62
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/local-runner",
3
- "version": "9.14.0",
3
+ "version": "9.16.0",
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",
@@ -37,20 +37,20 @@
37
37
  "typeScriptVersion": "3.8.3",
38
38
  "dependencies": {
39
39
  "@types/node": "^20.1.0",
40
- "@wdio/logger": "9.4.4",
40
+ "@wdio/logger": "9.15.0",
41
41
  "@wdio/repl": "9.4.4",
42
- "@wdio/runner": "9.14.0",
43
- "@wdio/types": "9.14.0",
44
- "async-exit-hook": "^2.0.1",
42
+ "@wdio/runner": "9.16.0",
43
+ "@wdio/types": "9.16.0",
44
+ "exit-hook": "^4.0.0",
45
+ "expect-webdriverio": "^5.3.2",
45
46
  "split2": "^4.1.0",
46
47
  "stream-buffers": "^3.0.2"
47
48
  },
48
49
  "devDependencies": {
49
- "@types/async-exit-hook": "^2.0.0",
50
50
  "@types/stream-buffers": "^3.0.4"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "f8e62f63eb087a06556e8c85e042403da0e4485e"
55
+ "gitHead": "a4539d01aeee8ab9580a99321a235088d69bd17a"
56
56
  }