qunitx-cli 0.9.3 → 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.
Files changed (43) hide show
  1. package/bin/qunitx.js +71 -0
  2. package/dist/cli.js +2009 -0
  3. package/package.json +16 -8
  4. package/cli.ts +0 -39
  5. package/deno.json +0 -18
  6. package/deno.lock +0 -648
  7. package/lib/commands/generate.ts +0 -33
  8. package/lib/commands/help.ts +0 -37
  9. package/lib/commands/init.ts +0 -77
  10. package/lib/commands/run/tests-in-browser.ts +0 -221
  11. package/lib/commands/run.ts +0 -279
  12. package/lib/servers/http.ts +0 -321
  13. package/lib/setup/bind-server-to-port.ts +0 -14
  14. package/lib/setup/browser.ts +0 -101
  15. package/lib/setup/config.ts +0 -55
  16. package/lib/setup/default-project-config-values.ts +0 -9
  17. package/lib/setup/file-watcher.ts +0 -134
  18. package/lib/setup/fs-tree.ts +0 -64
  19. package/lib/setup/keyboard-events.ts +0 -38
  20. package/lib/setup/test-file-paths.ts +0 -92
  21. package/lib/setup/web-server.ts +0 -274
  22. package/lib/setup/write-output-static-files.ts +0 -33
  23. package/lib/tap/display-final-result.ts +0 -25
  24. package/lib/tap/display-test-result.ts +0 -109
  25. package/lib/tap/dump-yaml.ts +0 -84
  26. package/lib/types.ts +0 -61
  27. package/lib/utils/chromium-args.ts +0 -18
  28. package/lib/utils/color.ts +0 -66
  29. package/lib/utils/early-chrome.ts +0 -39
  30. package/lib/utils/find-chrome.ts +0 -38
  31. package/lib/utils/find-internal-assets-from-html.ts +0 -18
  32. package/lib/utils/find-project-root.ts +0 -20
  33. package/lib/utils/indent-string.ts +0 -24
  34. package/lib/utils/listen-to-keyboard-key.ts +0 -57
  35. package/lib/utils/parse-cli-flags.ts +0 -95
  36. package/lib/utils/path-exists.ts +0 -21
  37. package/lib/utils/perf-logger.ts +0 -25
  38. package/lib/utils/pre-launch-chrome.ts +0 -45
  39. package/lib/utils/read-boilerplate.ts +0 -15
  40. package/lib/utils/resolve-port-number-for.ts +0 -29
  41. package/lib/utils/run-user-module.ts +0 -28
  42. package/lib/utils/search-in-parent-directories.ts +0 -25
  43. 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.3",
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
- "format": "prettier --check \"lib/**/*.ts\" \"test/**/*.ts\" \"*.ts\" \"package.json\" \".github/**/*.yml\"",
20
- "format:fix": "prettier --write \"lib/**/*.ts\" \"test/**/*.ts\" \"*.ts\" \"package.json\" \".github/**/*.yml\"",
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": "cli.ts"
44
+ "qunitx": "bin/qunitx.js"
39
45
  },
40
46
  "repository": {
41
47
  "type": "git",
@@ -43,7 +49,6 @@
43
49
  },
44
50
  "dependencies": {
45
51
  "esbuild": "^0.27.3",
46
- "picomatch": "^4.0.4",
47
52
  "playwright-core": "^1.58.2",
48
53
  "ws": "^8.20.0"
49
54
  },
@@ -52,8 +57,8 @@
52
57
  "express": "^5.2.1",
53
58
  "js-yaml": "^4.1.1",
54
59
  "prettier": "^3.8.1",
55
- "qunitx": "^1.0.4",
56
- "typescript": "^5.0.0"
60
+ "qunitx": "^1.1.2",
61
+ "typescript": "^6.0.2"
57
62
  },
58
63
  "volta": {
59
64
  "node": "24.14.0"
@@ -62,5 +67,8 @@
62
67
  "printWidth": 100,
63
68
  "singleQuote": true,
64
69
  "arrowParens": "always"
70
+ },
71
+ "optionalDependencies": {
72
+ "qunitx-cli-linux-x64": "*"
65
73
  }
66
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
- }