headlamp 0.1.36 → 0.1.58
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 +65 -15
- 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/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
# Headlamp
|
|
2
2
|
|
|
3
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
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
|
|
|
@@ -31,7 +31,7 @@ Run:
|
|
|
31
31
|
npx headlamp --help
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
### Cargo (Rust projects)
|
|
35
35
|
|
|
36
36
|
Install from crates.io:
|
|
37
37
|
|
|
@@ -39,9 +39,21 @@ Install from crates.io:
|
|
|
39
39
|
cargo install headlamp
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
###
|
|
42
|
+
### Python (pytest projects)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Install:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install headlamp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
headlamp --runner=pytest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
### Jest
|
|
45
57
|
|
|
46
58
|
```bash
|
|
47
59
|
npx headlamp --runner=jest
|
|
@@ -53,14 +65,14 @@ Forward runner args after `--` (unknown args are forwarded):
|
|
|
53
65
|
npx headlamp --runner=jest -- --runInBand
|
|
54
66
|
```
|
|
55
67
|
|
|
56
|
-
|
|
68
|
+
### Cargo nextest / cargo test
|
|
57
69
|
|
|
58
70
|
```bash
|
|
59
71
|
headlamp --runner=cargo-nextest
|
|
60
72
|
headlamp --runner=cargo-test
|
|
61
73
|
```
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
## CLI
|
|
64
76
|
|
|
65
77
|
Run `headlamp --help` to see the up-to-date flags list.
|
|
66
78
|
|
|
@@ -69,12 +81,19 @@ Highlights:
|
|
|
69
81
|
- **runners**: `--runner=jest|pytest|cargo-nextest|cargo-test`
|
|
70
82
|
- **changed selection**: `--changed=all|staged|unstaged|branch|lastCommit|lastRelease`
|
|
71
83
|
- `lastRelease` selects changes since the previous stable SemVer release tag
|
|
72
|
-
- **coverage**: `--coverage` plus `--coverage-ui`, `--coverage
|
|
84
|
+
- **coverage**: `--coverage` plus `--coverage-ui`, `--coverage-detail`, thresholds, etc.
|
|
85
|
+
- **artifacts** (default: none): `--keep-artifacts` to keep runner artifacts on disk
|
|
86
|
+
|
|
87
|
+
Legacy aliases (still accepted, but not recommended):
|
|
88
|
+
|
|
89
|
+
- `--keepArtifacts`
|
|
90
|
+
- `--coverage.detail`
|
|
73
91
|
|
|
74
|
-
|
|
92
|
+
## Configuration
|
|
75
93
|
|
|
76
94
|
Headlamp discovers config from your repo root. Supported file names:
|
|
77
95
|
|
|
96
|
+
- `headlamp.toml` (highest precedence)
|
|
78
97
|
- `headlamp.config.ts`
|
|
79
98
|
- `headlamp.config.js`
|
|
80
99
|
- `headlamp.config.mjs`
|
|
@@ -86,7 +105,28 @@ Headlamp discovers config from your repo root. Supported file names:
|
|
|
86
105
|
- `headlamp.config.yml`
|
|
87
106
|
- `.headlamprc` plus `.headlamprc.*` variants (`.json`, `.json5`, `.jsonc`, `.yaml`, `.yml`, `.js`, `.cjs`, `.mjs`, `.ts`)
|
|
88
107
|
|
|
89
|
-
|
|
108
|
+
Headlamp also supports embedded TOML config (lower precedence than explicit config files):
|
|
109
|
+
|
|
110
|
+
- `pyproject.toml` under `[tool.headlamp]`
|
|
111
|
+
- `Cargo.toml` under `[package.metadata.headlamp]`
|
|
112
|
+
|
|
113
|
+
### Example: `headlamp.toml` (recommended for Rust + Python)
|
|
114
|
+
|
|
115
|
+
```toml
|
|
116
|
+
# Run tests sequentially (useful for very heavy integration tests)
|
|
117
|
+
sequential = true
|
|
118
|
+
|
|
119
|
+
[coverage]
|
|
120
|
+
abort_on_failure = true
|
|
121
|
+
mode = "auto"
|
|
122
|
+
page_fit = true
|
|
123
|
+
keep_artifacts = false
|
|
124
|
+
|
|
125
|
+
[changed]
|
|
126
|
+
depth = 20
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Example: `headlamp.config.ts`
|
|
90
130
|
|
|
91
131
|
Rules:
|
|
92
132
|
|
|
@@ -105,6 +145,7 @@ export default {
|
|
|
105
145
|
ci: false,
|
|
106
146
|
verbose: false,
|
|
107
147
|
noCache: false,
|
|
148
|
+
keepArtifacts: false,
|
|
108
149
|
|
|
109
150
|
// Coverage defaults
|
|
110
151
|
coverage: true,
|
|
@@ -120,14 +161,23 @@ export default {
|
|
|
120
161
|
};
|
|
121
162
|
```
|
|
122
163
|
|
|
123
|
-
|
|
164
|
+
## Artifacts (coverage, caches, temp files)
|
|
165
|
+
|
|
166
|
+
By default, headlamp runs **artifact-free**: it uses an ephemeral per-run workspace and **does not leave files behind** in your repo (e.g. `coverage/`, `.coverage`, `.pytest_cache`, `target/`) or OS temp.
|
|
167
|
+
|
|
168
|
+
If you need artifacts on disk (for example, to upload coverage reports in CI), opt out:
|
|
169
|
+
|
|
170
|
+
- CLI: `--keep-artifacts`
|
|
171
|
+
- Config: `keepArtifacts: true`
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
124
174
|
|
|
125
175
|
Pull requests are welcome. For large changes, open an issue first to align on direction.
|
|
126
176
|
|
|
127
|
-
|
|
177
|
+
## Support
|
|
128
178
|
|
|
129
179
|
- Bug reports and feature requests: GitHub Issues
|
|
130
180
|
|
|
131
|
-
|
|
181
|
+
## License
|
|
132
182
|
|
|
133
183
|
MIT — see `LICENSE`.
|
|
Binary file
|
package/bin/darwin-x64/headlamp
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|