headlamp 0.1.35 → 0.1.57
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 +61 -52
- package/bin/darwin-arm64/headlamp +0 -0
- package/bin/darwin-x64/headlamp +0 -0
- package/bin/linux-arm64-gnu/headlamp +0 -0
- package/bin/linux-arm64-musl/headlamp +0 -0
- package/bin/linux-x64-gnu/headlamp +0 -0
- package/bin/linux-x64-musl/headlamp +0 -0
- package/bin/win32-x64/headlamp.exe +0 -0
- package/package.json +1 -1
- package/bin/.gitkeep +0 -4
package/README.md
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
# Headlamp
|
|
2
2
|
|
|
3
|
-
Headlamp is a **Rust-powered test UX CLI**: smarter test selection, cleaner output, and a unified workflow across **jest**, **cargo test**,
|
|
3
|
+
Headlamp is a **Rust-powered test UX CLI**: smarter test selection, cleaner output, and a unified workflow across **jest**, **cargo test**, **cargo nextest**, and **pytest**.
|
|
4
4
|
|
|
5
5
|
Headlamp is useful when you want a consistent way to run tests across different projects and keep feedback fast as your repo grows. It can select tests based on what changed, surface failures in a readable format, and keep common defaults (like runner args and coverage settings) in a single config file so your team doesn’t have to remember a long list of flags.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Why Headlamp
|
|
8
8
|
|
|
9
|
-
- **One CLI, many runners**: `--runner=jest|cargo-nextest|cargo-test`
|
|
9
|
+
- **One CLI, many runners**: `--runner=jest|cargo-nextest|cargo-test|pytest`
|
|
10
10
|
- **Selection that scales**: run what changed (`--changed`) and what’s related (dependency-graph driven)
|
|
11
11
|
- **Coverage-first UX**: coverage output you can actually read
|
|
12
12
|
- **Fast**: Rust core + caching
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Installation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
### npm (Node.js projects)
|
|
17
17
|
|
|
18
18
|
Requirements:
|
|
19
19
|
|
|
20
20
|
- Node **>= 18**
|
|
21
|
-
- A GitHub Release for your version tag (see “Releases” below)
|
|
22
21
|
|
|
23
22
|
Install:
|
|
24
23
|
|
|
@@ -32,15 +31,29 @@ Run:
|
|
|
32
31
|
npx headlamp --help
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
### Cargo (Rust projects)
|
|
35
|
+
|
|
36
|
+
Install from crates.io:
|
|
36
37
|
|
|
37
38
|
```bash
|
|
38
|
-
cargo install
|
|
39
|
+
cargo install headlamp
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
###
|
|
42
|
+
### Python (pytest projects)
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
Install:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install headlamp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
headlamp --runner=pytest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
### Jest
|
|
44
57
|
|
|
45
58
|
```bash
|
|
46
59
|
npx headlamp --runner=jest
|
|
@@ -52,47 +65,29 @@ Forward runner args after `--` (unknown args are forwarded):
|
|
|
52
65
|
npx headlamp --runner=jest -- --runInBand
|
|
53
66
|
```
|
|
54
67
|
|
|
55
|
-
|
|
68
|
+
### Cargo nextest / cargo test
|
|
56
69
|
|
|
57
70
|
```bash
|
|
58
71
|
headlamp --runner=cargo-nextest
|
|
59
72
|
headlamp --runner=cargo-test
|
|
60
73
|
```
|
|
61
74
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
headlamp
|
|
68
|
-
|
|
69
|
-
Usage:
|
|
70
|
-
headlamp [--runner=<jest|vitest|pytest|cargo-nextest|cargo-test>] [--coverage] [--changed[=<mode>]] [args...]
|
|
71
|
-
|
|
72
|
-
Flags:
|
|
73
|
-
--runner <runner> Select runner (default: jest)
|
|
74
|
-
--coverage Enable coverage collection (runner-specific)
|
|
75
|
-
--coverage-ui=jest|both Coverage output mode
|
|
76
|
-
--coverage.abortOnFailure Exit on test failures without printing coverage
|
|
77
|
-
--watch Re-run on file changes (runner-agnostic polling watch)
|
|
78
|
-
--ci CI mode (disable interactive UI and set CI=1)
|
|
79
|
-
--verbose More Headlamp diagnostics
|
|
80
|
-
--no-cache Disable Headlamp caches (and runner caches when possible)
|
|
81
|
-
--onlyFailures Show only failing tests during live output
|
|
82
|
-
--showLogs Show full logs under failing tests
|
|
83
|
-
--sequential Serialize execution (maps to jest --runInBand)
|
|
84
|
-
--bootstrapCommand <cmd> Run once before tests (npm script name or shell cmd)
|
|
85
|
-
--changed[=all|staged|unstaged|branch|lastCommit]
|
|
86
|
-
--changed.depth=<n>
|
|
87
|
-
|
|
88
|
-
Notes:
|
|
89
|
-
Unknown args are forwarded to the runner.
|
|
90
|
-
```
|
|
75
|
+
## CLI
|
|
76
|
+
|
|
77
|
+
Run `headlamp --help` to see the up-to-date flags list.
|
|
78
|
+
|
|
79
|
+
Highlights:
|
|
91
80
|
|
|
92
|
-
|
|
81
|
+
- **runners**: `--runner=jest|pytest|cargo-nextest|cargo-test`
|
|
82
|
+
- **changed selection**: `--changed=all|staged|unstaged|branch|lastCommit|lastRelease`
|
|
83
|
+
- `lastRelease` selects changes since the previous stable SemVer release tag
|
|
84
|
+
- **coverage**: `--coverage` plus `--coverage-ui`, `--coverage.detail`, thresholds, etc.
|
|
85
|
+
|
|
86
|
+
## Configuration
|
|
93
87
|
|
|
94
88
|
Headlamp discovers config from your repo root. Supported file names:
|
|
95
89
|
|
|
90
|
+
- `headlamp.toml` (highest precedence)
|
|
96
91
|
- `headlamp.config.ts`
|
|
97
92
|
- `headlamp.config.js`
|
|
98
93
|
- `headlamp.config.mjs`
|
|
@@ -104,7 +99,27 @@ Headlamp discovers config from your repo root. Supported file names:
|
|
|
104
99
|
- `headlamp.config.yml`
|
|
105
100
|
- `.headlamprc` plus `.headlamprc.*` variants (`.json`, `.json5`, `.jsonc`, `.yaml`, `.yml`, `.js`, `.cjs`, `.mjs`, `.ts`)
|
|
106
101
|
|
|
107
|
-
|
|
102
|
+
Headlamp also supports embedded TOML config (lower precedence than explicit config files):
|
|
103
|
+
|
|
104
|
+
- `pyproject.toml` under `[tool.headlamp]`
|
|
105
|
+
- `Cargo.toml` under `[package.metadata.headlamp]`
|
|
106
|
+
|
|
107
|
+
### Example: `headlamp.toml` (recommended for Rust + Python)
|
|
108
|
+
|
|
109
|
+
```toml
|
|
110
|
+
# Run tests sequentially (useful for very heavy integration tests)
|
|
111
|
+
sequential = true
|
|
112
|
+
|
|
113
|
+
[coverage]
|
|
114
|
+
abort_on_failure = true
|
|
115
|
+
mode = "auto"
|
|
116
|
+
page_fit = true
|
|
117
|
+
|
|
118
|
+
[changed]
|
|
119
|
+
depth = 20
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Example: `headlamp.config.ts`
|
|
108
123
|
|
|
109
124
|
Rules:
|
|
110
125
|
|
|
@@ -138,20 +153,14 @@ export default {
|
|
|
138
153
|
};
|
|
139
154
|
```
|
|
140
155
|
|
|
141
|
-
|
|
156
|
+
## Contributing
|
|
142
157
|
|
|
143
158
|
Pull requests are welcome. For large changes, open an issue first to align on direction.
|
|
144
159
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
cargo test
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Support
|
|
160
|
+
## Support
|
|
152
161
|
|
|
153
162
|
- Bug reports and feature requests: GitHub Issues
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
## License
|
|
156
165
|
|
|
157
166
|
MIT — see `LICENSE`.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/bin/.gitkeep
DELETED