qunitx-cli 0.9.4 → 0.9.7
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/bin/qunitx.js +71 -0
- package/dist/cli.js +2009 -0
- package/package.json +16 -7
- package/cli.ts +0 -39
- package/deno.json +0 -18
- package/deno.lock +0 -646
- package/lib/commands/generate.ts +0 -33
- package/lib/commands/help.ts +0 -37
- package/lib/commands/init.ts +0 -77
- package/lib/commands/run/tests-in-browser.ts +0 -221
- package/lib/commands/run.ts +0 -279
- package/lib/servers/http.ts +0 -321
- package/lib/setup/bind-server-to-port.ts +0 -14
- package/lib/setup/browser.ts +0 -101
- package/lib/setup/config.ts +0 -55
- package/lib/setup/default-project-config-values.ts +0 -9
- package/lib/setup/file-watcher.ts +0 -134
- package/lib/setup/fs-tree.ts +0 -60
- package/lib/setup/keyboard-events.ts +0 -38
- package/lib/setup/test-file-paths.ts +0 -74
- package/lib/setup/web-server.ts +0 -274
- package/lib/setup/write-output-static-files.ts +0 -33
- package/lib/tap/display-final-result.ts +0 -25
- package/lib/tap/display-test-result.ts +0 -109
- package/lib/tap/dump-yaml.ts +0 -84
- package/lib/types.ts +0 -61
- package/lib/utils/chromium-args.ts +0 -18
- package/lib/utils/color.ts +0 -66
- package/lib/utils/early-chrome.ts +0 -39
- package/lib/utils/find-chrome.ts +0 -38
- package/lib/utils/find-internal-assets-from-html.ts +0 -18
- package/lib/utils/find-project-root.ts +0 -20
- package/lib/utils/indent-string.ts +0 -24
- package/lib/utils/listen-to-keyboard-key.ts +0 -57
- package/lib/utils/parse-cli-flags.ts +0 -95
- package/lib/utils/path-exists.ts +0 -21
- package/lib/utils/perf-logger.ts +0 -25
- package/lib/utils/pre-launch-chrome.ts +0 -45
- package/lib/utils/read-boilerplate.ts +0 -15
- package/lib/utils/resolve-port-number-for.ts +0 -29
- package/lib/utils/run-user-module.ts +0 -28
- package/lib/utils/search-in-parent-directories.ts +0 -25
- package/lib/utils/time-counter.ts +0 -19
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qunitx-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.7",
|
|
5
5
|
"description": "Browser runner for QUnitx: run your qunitx tests in google-chrome",
|
|
6
|
-
"main": "cli.ts",
|
|
7
6
|
"author": "Izel Nakri",
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"keywords": [
|
|
@@ -14,10 +13,17 @@
|
|
|
14
13
|
"qunit",
|
|
15
14
|
"qunitx"
|
|
16
15
|
],
|
|
16
|
+
"files": [
|
|
17
|
+
"bin/",
|
|
18
|
+
"dist/",
|
|
19
|
+
"templates/"
|
|
20
|
+
],
|
|
17
21
|
"scripts": {
|
|
22
|
+
"build": "node scripts/build-cli.js",
|
|
18
23
|
"bin": "chmod +x cli.ts && ./cli.ts",
|
|
19
|
-
"
|
|
20
|
-
"format
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"format": "prettier --check \"lib/**/*.ts\" \"test/**/*.ts\" \"scripts/**/*.js\" \"bin/**/*.js\" \"*.ts\" \"package.json\" \".github/**/*.yml\"",
|
|
26
|
+
"format:fix": "prettier --write \"lib/**/*.ts\" \"test/**/*.ts\" \"scripts/**/*.js\" \"bin/**/*.js\" \"*.ts\" \"package.json\" \".github/**/*.yml\"",
|
|
21
27
|
"lint": "deno lint lib/ cli.ts",
|
|
22
28
|
"lint:docs": "node scripts/lint-docs.js",
|
|
23
29
|
"docs": "deno doc --html --name=\"qunitx-cli\" --output=docs/lib 'lib/**/*.ts' README.md",
|
|
@@ -35,7 +41,7 @@
|
|
|
35
41
|
"deno": ">=2.7.0"
|
|
36
42
|
},
|
|
37
43
|
"bin": {
|
|
38
|
-
"qunitx": "
|
|
44
|
+
"qunitx": "bin/qunitx.js"
|
|
39
45
|
},
|
|
40
46
|
"repository": {
|
|
41
47
|
"type": "git",
|
|
@@ -51,8 +57,8 @@
|
|
|
51
57
|
"express": "^5.2.1",
|
|
52
58
|
"js-yaml": "^4.1.1",
|
|
53
59
|
"prettier": "^3.8.1",
|
|
54
|
-
"qunitx": "^1.
|
|
55
|
-
"typescript": "^
|
|
60
|
+
"qunitx": "^1.1.2",
|
|
61
|
+
"typescript": "^6.0.2"
|
|
56
62
|
},
|
|
57
63
|
"volta": {
|
|
58
64
|
"node": "24.14.0"
|
|
@@ -61,5 +67,8 @@
|
|
|
61
67
|
"printWidth": 100,
|
|
62
68
|
"singleQuote": true,
|
|
63
69
|
"arrowParens": "always"
|
|
70
|
+
},
|
|
71
|
+
"optionalDependencies": {
|
|
72
|
+
"qunitx-cli-linux-x64": "*"
|
|
64
73
|
}
|
|
65
74
|
}
|
package/cli.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --experimental-strip-types
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
import './lib/utils/early-chrome.ts';
|
|
4
|
-
import displayHelpOutput from './lib/commands/help.ts';
|
|
5
|
-
import initializeProject from './lib/commands/init.ts';
|
|
6
|
-
import generateTestFiles from './lib/commands/generate.ts';
|
|
7
|
-
import setupConfig from './lib/setup/config.ts';
|
|
8
|
-
|
|
9
|
-
process.title = 'qunitx';
|
|
10
|
-
|
|
11
|
-
(async () => {
|
|
12
|
-
if (!process.argv[2]) {
|
|
13
|
-
return await displayHelpOutput();
|
|
14
|
-
} else if (['help', 'h', 'p', 'print'].includes(process.argv[2])) {
|
|
15
|
-
return await displayHelpOutput();
|
|
16
|
-
} else if (['new', 'n', 'g', 'generate'].includes(process.argv[2])) {
|
|
17
|
-
return await generateTestFiles();
|
|
18
|
-
} else if (['init'].includes(process.argv[2])) {
|
|
19
|
-
return await initializeProject();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Lazy import: run.js (and its static imports like esbuild and playwright-core) are
|
|
23
|
-
// only loaded when actually running tests. Importing in parallel with setupConfig()
|
|
24
|
-
// lets playwright-core start loading while config is being assembled.
|
|
25
|
-
const [config, { default: run }] = await Promise.all([
|
|
26
|
-
setupConfig(),
|
|
27
|
-
import('./lib/commands/run.ts'),
|
|
28
|
-
]);
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
return await run(config);
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.error(error);
|
|
34
|
-
// Flush stdout before exit so any queued console.log writes (e.g. from WS testEnd
|
|
35
|
-
// handlers that fired before the exception) are not lost when process.exit() runs.
|
|
36
|
-
process.exitCode = 1;
|
|
37
|
-
process.stdout.write('\n', () => process.exit(1));
|
|
38
|
-
}
|
|
39
|
-
})();
|
package/deno.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"nodeModulesDir": "auto",
|
|
3
|
-
"imports": {
|
|
4
|
-
"esbuild": "npm:esbuild",
|
|
5
|
-
"picomatch": "npm:picomatch",
|
|
6
|
-
"ws": "npm:ws"
|
|
7
|
-
},
|
|
8
|
-
"tasks": {
|
|
9
|
-
"bench": "deno bench --allow-all benches/esbuild.bench.ts benches/server.bench.ts benches/tap.bench.ts benches/e2e.bench.ts",
|
|
10
|
-
"bench:check": "deno bench --allow-all --json benches/esbuild.bench.ts benches/server.bench.ts benches/tap.bench.ts benches/e2e.bench.ts | deno run --allow-all scripts/check-benchmarks.ts",
|
|
11
|
-
"bench:update": "deno bench --allow-all --json benches/esbuild.bench.ts benches/server.bench.ts benches/tap.bench.ts benches/e2e.bench.ts | deno run --allow-all scripts/check-benchmarks.ts --save"
|
|
12
|
-
},
|
|
13
|
-
"lint": {
|
|
14
|
-
"rules": {
|
|
15
|
-
"exclude": ["no-process-global", "no-node-globals", "no-window"]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|