sumlyzer 0.2.0 → 0.2.1

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 (2) hide show
  1. package/README.md +10 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -54,6 +54,8 @@ Options:
54
54
 
55
55
  Exit code is `1` if any workspace fails (or if the project has no
56
56
  workspaces), `0` otherwise — wire it straight into CI without extra parsing.
57
+ This also applies when `--junit` can't write its report (e.g. an invalid
58
+ `<path>`): the exit code is `1` even if every workspace's tests passed.
57
59
 
58
60
  ## Example
59
61
 
@@ -86,7 +88,6 @@ running gitlab
86
88
  ✓ gitlab 4.3s (8/8 tests)
87
89
 
88
90
  Summary
89
-
90
91
  ┌─────────┬────────────────┬──────────┬────────────┬────────────────┬─────────┬────────┬────────┐
91
92
  │ (index) │ workspace │ status │ duration │ testsDuration │ tests │ pass │ fail │
92
93
  ├─────────┼────────────────┼──────────┼────────────┼────────────────┼─────────┼────────┼────────┤
@@ -110,7 +111,7 @@ Summary
110
111
 
111
112
  ### On failure
112
113
 
113
- Only the failing workspace prints its detail; passing ones stay collapsed to a single line.
114
+ Only the failing workspace prints its detail and passing ones stay collapsed to a single line.
114
115
 
115
116
  ```
116
117
  running contact
@@ -134,7 +135,6 @@ running flags
134
135
  ✓ flags 1.1s (9/9 tests)
135
136
 
136
137
  Summary
137
-
138
138
  ┌─────────┬────────────┬──────────┬────────────┬────────────────┬─────────┬────────┬────────┐
139
139
  │ (index) │ workspace │ status │ duration │ testsDuration │ tests │ pass │ fail │
140
140
  ├─────────┼────────────┼──────────┼────────────┼────────────────┼─────────┼────────┼────────┤
@@ -171,13 +171,17 @@ npx sumlyzer --junit reports/ # writes reports/junit.xml
171
171
  </testsuites>
172
172
  ```
173
173
 
174
+ A workspace whose script never produces a junit file (for example,
175
+ `--script` points at something that isn't `node:test`, or the workspace crashed
176
+ before it could write one) is left out of the aggregated report and sumlyzer
177
+ prints a warning naming it.
178
+
174
179
  ## Why
175
180
 
176
181
  `npm run test --workspaces --if-present` runs every workspace but gives you
177
182
  no aggregated summary and no way to fail fast early. An early failure just
178
- scrolls off screen once later workspaces print their own output. Turborepo
179
- has the [same open issue](https://github.com/vercel/turborepo/issues/1368).
180
- sumlyzer is a small, dependency-free tool that solves just this.
183
+ scrolls off screen once later workspaces print their own output. sumlyzer is
184
+ a small, dependency-free tool that solves just this.
181
185
 
182
186
  ## Contributing
183
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumlyzer",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Run every npm workspace's test script, only show output for the ones that fail, and finish with an aggregated pass/fail summary.",
5
5
  "type": "module",
6
6
  "bin": {