qunitx-cli 0.17.5 → 0.17.6

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.
Files changed (2) hide show
  1. package/dist/cli.js +22 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -107,7 +107,27 @@ async function preLaunchChrome(chromePath, args, headless = true) {
107
107
  });
108
108
  if (proc.exitCode === null) killProcessGroup(proc.pid);
109
109
  await closed;
110
- await rm(userDataDir, { recursive: true, force: true }).catch(() => {
110
+ await rm(userDataDir, { recursive: true, force: true }).catch(async () => {
111
+ const pgid = proc.pid;
112
+ const warnTimer = setTimeout(
113
+ () => process.stderr.write(
114
+ `# [qunitx] warning: Chrome process group ${pgid} still alive 500ms after SIGKILL, waiting...
115
+ `
116
+ ),
117
+ 500
118
+ );
119
+ warnTimer.unref();
120
+ while (true) {
121
+ try {
122
+ process.kill(-pgid, 0);
123
+ } catch {
124
+ break;
125
+ }
126
+ await new Promise((r) => setTimeout(r, 20));
127
+ }
128
+ clearTimeout(warnTimer);
129
+ await rm(userDataDir, { recursive: true, force: true }).catch(() => {
130
+ });
111
131
  });
112
132
  }
113
133
  }
@@ -2121,7 +2141,7 @@ init_color();
2121
2141
  var package_default = {
2122
2142
  name: "qunitx-cli",
2123
2143
  type: "module",
2124
- version: "0.17.5",
2144
+ version: "0.17.6",
2125
2145
  description: "Browser runner for QUnitx: run your qunitx tests in google-chrome",
2126
2146
  author: "Izel Nakri",
2127
2147
  license: "MIT",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qunitx-cli",
3
3
  "type": "module",
4
- "version": "0.17.5",
4
+ "version": "0.17.6",
5
5
  "description": "Browser runner for QUnitx: run your qunitx tests in google-chrome",
6
6
  "author": "Izel Nakri",
7
7
  "license": "MIT",