jevitate 0.1.0 → 0.2.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/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # jevitate
2
+
3
+ A bare-name alias for [`@jevitate/cli`](https://www.npmjs.com/package/@jevitate/cli), which does
4
+ autonomous browser testing that turns discovered bugs into deterministic regression tests.
5
+ Installing either package gives you the same `jevitate` command:
6
+
7
+ ```bash
8
+ npm install -g jevitate
9
+ ```
10
+
11
+ Documentation: https://github.com/matt-cochran/jevitate · https://jevitate.com
package/bin/jevitate.js CHANGED
@@ -17,6 +17,16 @@ const child = spawn(process.execPath, [cliBinPath, ...process.argv.slice(2)], {
17
17
  stdio: "inherit",
18
18
  });
19
19
 
20
+ // #220: a signal sent to THIS process (e.g. `timeout -s TERM`, or `kill -INT <pid>`) is forwarded
21
+ // to the CLI, which writes its partial result and exits 130/143 — this process then mirrors that
22
+ // exit. Without this the alias died on the signal and orphaned the still-running CLI, which
23
+ // printed nothing.
24
+ for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
25
+ process.on(signal, () => {
26
+ if (child.exitCode === null && child.signalCode === null) child.kill(signal);
27
+ });
28
+ }
29
+
20
30
  child.on("error", (err) => {
21
31
  process.stderr.write(`${String(err)}\n`);
22
32
  process.exitCode = 1;
@@ -24,6 +34,8 @@ child.on("error", (err) => {
24
34
 
25
35
  child.on("exit", (code, signal) => {
26
36
  if (signal) {
37
+ // Our forwarding listeners would swallow the re-raise: drop them so it terminates this process.
38
+ for (const s of ["SIGINT", "SIGTERM", "SIGHUP"]) process.removeAllListeners(s);
27
39
  process.kill(process.pid, signal);
28
40
  } else {
29
41
  process.exitCode = code ?? 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jevitate",
3
- "version": "0.1.0",
4
- "description": "Bare-name alias for @jevitate/cli — installs the `jevitate` command.",
3
+ "version": "0.2.0",
4
+ "description": "Bare-name alias for @jevitate/cli, autonomous browser testing that turns discovered bugs into deterministic regression tests. Installs the `jevitate` command.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -14,7 +14,9 @@
14
14
  "author": "Matt Cochran",
15
15
  "keywords": [
16
16
  "jevitate",
17
+ "browser-testing",
17
18
  "browser-automation",
19
+ "regression-testing",
18
20
  "testing",
19
21
  "cli"
20
22
  ],
@@ -31,6 +33,6 @@
31
33
  "access": "public"
32
34
  },
33
35
  "dependencies": {
34
- "@jevitate/cli": "0.1.0"
36
+ "@jevitate/cli": "0.2.0"
35
37
  }
36
38
  }