qunitx-cli 0.1.1 → 0.5.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.
Files changed (44) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.env +1 -0
  3. package/Makefile +35 -0
  4. package/README.md +120 -49
  5. package/cli.js +1 -1
  6. package/cliff.toml +23 -0
  7. package/demo/demo.gif +0 -0
  8. package/demo/demo.tape +59 -0
  9. package/demo/example-test.js +53 -0
  10. package/demo/failing-test.js +22 -0
  11. package/flake.lock +4 -4
  12. package/flake.nix +33 -4
  13. package/lib/boilerplates/default-project-config-values.js +2 -2
  14. package/lib/boilerplates/test.js +5 -4
  15. package/lib/commands/generate.js +6 -8
  16. package/lib/commands/help.js +8 -8
  17. package/lib/commands/init.js +35 -25
  18. package/lib/commands/run/tests-in-browser.js +97 -67
  19. package/lib/commands/run.js +165 -55
  20. package/lib/servers/http.js +53 -42
  21. package/lib/setup/bind-server-to-port.js +3 -12
  22. package/lib/setup/browser.js +26 -18
  23. package/lib/setup/config.js +8 -10
  24. package/lib/setup/file-watcher.js +23 -6
  25. package/lib/setup/fs-tree.js +29 -27
  26. package/lib/setup/keyboard-events.js +7 -4
  27. package/lib/setup/test-file-paths.js +25 -23
  28. package/lib/setup/web-server.js +87 -61
  29. package/lib/setup/write-output-static-files.js +4 -1
  30. package/lib/tap/display-final-result.js +2 -2
  31. package/lib/tap/display-test-result.js +32 -14
  32. package/lib/utils/find-chrome.js +16 -0
  33. package/lib/utils/find-internal-assets-from-html.js +7 -5
  34. package/lib/utils/find-project-root.js +1 -2
  35. package/lib/utils/indent-string.js +6 -6
  36. package/lib/utils/listen-to-keyboard-key.js +6 -2
  37. package/lib/utils/parse-cli-flags.js +34 -31
  38. package/lib/utils/resolve-port-number-for.js +3 -3
  39. package/lib/utils/run-user-module.js +5 -3
  40. package/lib/utils/search-in-parent-directories.js +4 -1
  41. package/lib/utils/time-counter.js +2 -2
  42. package/package.json +21 -36
  43. package/vendor/qunit.css +7 -7
  44. package/vendor/qunit.js +3772 -3324
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qunitx-cli",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.5.0",
5
5
  "description": "Browser runner for QUnitx: run your qunitx tests in google-chrome",
6
6
  "main": "cli.js",
7
7
  "author": "Izel Nakri",
@@ -16,20 +16,19 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "bin": "chmod +x cli.js && ./cli.js",
19
+ "lint": "prettier --check \"lib/**/*.js\" \"test/**/*.js\" \"*.js\" \"package.json\" \".github/**/*.yml\"",
20
+ "lint:fix": "prettier --write \"lib/**/*.js\" \"test/**/*.js\" \"*.js\" \"package.json\" \".github/**/*.yml\"",
19
21
  "build": "node build.js",
20
- "changelog:unreleased": "node_modules/.bin/auto-changelog --stdout --commit-limit false --package --unreleased-only --hide-credit --sort-commits date-desc",
21
- "changelog:preview": "node_modules/.bin/auto-changelog --stdout --commit-limit false --package -u --sort-commits date-desc",
22
- "changelog:update": "node_modules/.bin/auto-changelog --commit-limit false --package --sort-commits date-desc",
22
+ "changelog:unreleased": "git-cliff --unreleased --strip all",
23
+ "changelog:preview": "git-cliff",
24
+ "changelog:update": "git-cliff --output CHANGELOG.md",
23
25
  "prepack": "npm run build",
24
- "release:alpha": "node_modules/.bin/release-it --preRelease=alpha --no-git.requireUpstream",
25
- "release:beta": "node_modules/.bin/release-it --preRelease=beta --no-git.requireUpstream",
26
- "release": "node_modules/.bin/release-it",
27
- "test": "node --test test/index.js",
26
+ "test": "node test/setup.js && node --test test/**/*-test.js",
28
27
  "test:sanity-first": "./cli.js test/helpers/failing-tests.js test/helpers/failing-tests.ts",
29
28
  "test:sanity-second": "./cli.js test/helpers/passing-tests.js test/helpers/passing-tests.ts"
30
29
  },
31
30
  "engines": {
32
- "node": ">=20.3.0"
31
+ "node": ">=24.0.0"
33
32
  },
34
33
  "bin": {
35
34
  "qunitx": "cli.js"
@@ -39,43 +38,29 @@
39
38
  "url": "https://github.com/izelnakri/qunitx-cli.git"
40
39
  },
41
40
  "dependencies": {
42
- "cheerio": "^1.0.0-rc.10",
43
- "chokidar": "^3.5.3",
44
- "esbuild": "^0.18.14",
45
- "js-yaml": "^4.1.0",
46
- "jsdom": "^22.0.0",
41
+ "cheerio": "^1.2.0",
42
+ "chokidar": "^5.0.0",
43
+ "esbuild": "^0.27.3",
44
+ "js-yaml": "^4.1.1",
47
45
  "kleur": "^4.1.5",
48
- "picomatch": "^2.3.1",
49
- "puppeteer": "20.9.0",
46
+ "picomatch": "^4.0.3",
47
+ "puppeteer": "^24.38.0",
50
48
  "recursive-lookup": "1.1.0",
51
- "ws": "^8.13.0"
49
+ "ws": "^8.19.0"
52
50
  },
53
51
  "devDependencies": {
54
- "auto-changelog": "^2.4.0",
55
- "cors": "^2.8.5",
56
- "express": "^4.17.3",
57
- "prettier": "^3.0.0",
58
- "qunit": "^2.19.4",
59
- "qunitx": "^0.9.1",
60
- "release-it": "^16.1.2"
52
+ "cors": "^2.8.6",
53
+ "express": "^5.2.1",
54
+ "prettier": "^3.8.1",
55
+ "qunit": "^2.25.0",
56
+ "qunitx": "^0.9.3"
61
57
  },
62
58
  "volta": {
63
- "node": "20.4.0"
59
+ "node": "24.14.0"
64
60
  },
65
61
  "prettier": {
66
62
  "printWidth": 100,
67
63
  "singleQuote": true,
68
64
  "arrowParens": "always"
69
- },
70
- "release-it": {
71
- "git": {
72
- "changelog": "npm run changelog:unreleased"
73
- },
74
- "github": {
75
- "release": true
76
- },
77
- "hooks": {
78
- "after:bump": "npm run changelog:update"
79
- }
80
65
  }
81
66
  }
package/vendor/qunit.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * QUnit 2.19.4
2
+ * QUnit 2.25.0
3
3
  * https://qunitjs.com/
4
4
  *
5
5
  * Copyright OpenJS Foundation and other contributors
@@ -45,10 +45,10 @@
45
45
  @media (min-height: 500px) {
46
46
  #qunit {
47
47
  position: fixed;
48
- left: 0px;
49
- right: 0px;
50
- top: 0px;
51
- bottom: 0px;
48
+ left: 0;
49
+ right: 0;
50
+ top: 0;
51
+ bottom: 0;
52
52
  padding: 8px;
53
53
  display: -webkit-box;
54
54
  display: flex;
@@ -329,11 +329,11 @@
329
329
  margin: 0;
330
330
  }
331
331
 
332
- #qunit-tests li strong {
332
+ #qunit-tests li .qunit-test-name {
333
333
  cursor: pointer;
334
334
  }
335
335
 
336
- #qunit-tests li.skipped strong {
336
+ #qunit-tests li.skipped .qunit-test-name {
337
337
  cursor: default;
338
338
  }
339
339