faf-taf-git 2.4.1 → 2.4.3
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/CHANGELOG.md +24 -1
- package/README.md +1 -4
- package/dist/parsers/junit.d.ts.map +1 -1
- package/dist/parsers/junit.js +6 -0
- package/dist/parsers/junit.js.map +1 -1
- package/dist/receipt-push.d.ts +21 -0
- package/dist/receipt-push.d.ts.map +1 -0
- package/dist/receipt-push.js +44 -0
- package/dist/receipt-push.js.map +1 -0
- package/package.json +14 -1
- package/project.faf +2 -2
- package/.faf-dna +0 -95
- package/.fafignore +0 -41
- package/.github/dependabot.yml +0 -10
- package/.github/workflows/ci.yml +0 -53
- package/.github/workflows/claude-code-review.yml +0 -36
- package/.github/workflows/claude.yml +0 -39
- package/.github/workflows/homebrew.yml +0 -19
- package/.taf +0 -98
- package/CLAUDE.md +0 -30
- package/CODE_OF_CONDUCT.md +0 -21
- package/CONTRIBUTING.md +0 -289
- package/SECURITY.md +0 -19
- package/action.yml +0 -50
- package/agent.fafa +0 -53
- package/badge.svg +0 -21
- package/dist/bundle/index.js +0 -36554
- package/dist/index.js +0 -42827
- package/dist/index.js.map +0 -1
- package/dist/licenses.txt +0 -126
- package/dist/sourcemap-register.js +0 -1
- package/docs/RELEASE-NOTES.md +0 -200
- package/docs/USER-GUIDE.md +0 -301
- package/jest.config.js +0 -13
- package/src/badge.ts +0 -138
- package/src/cli.ts +0 -311
- package/src/index.ts +0 -201
- package/src/parsers/bun.ts +0 -103
- package/src/parsers/index.ts +0 -50
- package/src/parsers/jest.ts +0 -104
- package/src/parsers/junit.ts +0 -110
- package/src/parsers/vitest.ts +0 -65
- package/src/parsers/wjttc.ts +0 -160
- package/src/taf-core.ts +0 -139
- package/test-mcp.ts +0 -83
- package/test-standalone.ts +0 -87
- package/tests/action-bundle.test.ts +0 -34
- package/tests/action-parse-error.test.ts +0 -47
- package/tests/badge.test.ts +0 -260
- package/tests/bun-parser.test.ts +0 -173
- package/tests/cli-version.test.ts +0 -31
- package/tests/jest-parser.test.ts +0 -122
- package/tests/junit-parser.test.ts +0 -109
- package/tests/vitest-parser.test.ts +0 -112
- package/tests/wjttc-parser.test.ts +0 -116
- package/tests/wjttc-taf.test.ts +0 -470
- package/tsconfig.json +0 -18
package/CONTRIBUTING.md
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
<!-- faf: faf-taf-git | TypeScript | cli | A Test Receipt Printer for git -->
|
|
2
|
-
<!-- faf: doc=contributing | canonical=project.faf | family=TAF -->
|
|
3
|
-
|
|
4
|
-
# Contributing to FAF TAF Action
|
|
5
|
-
|
|
6
|
-
Thank you for considering contributing to the FAF TAF Action!
|
|
7
|
-
|
|
8
|
-
## Philosophy
|
|
9
|
-
|
|
10
|
-
We follow the **WJTTC (WolfeJam Technical & Testing Center)** philosophy:
|
|
11
|
-
|
|
12
|
-
> "We break things so others never know they were broken."
|
|
13
|
-
|
|
14
|
-
This means:
|
|
15
|
-
- Test everything
|
|
16
|
-
- Find bugs early
|
|
17
|
-
- Fix them immediately
|
|
18
|
-
- Maintain championship standards
|
|
19
|
-
|
|
20
|
-
## Code of Conduct
|
|
21
|
-
|
|
22
|
-
- Be professional
|
|
23
|
-
- Be respectful
|
|
24
|
-
- Focus on facts
|
|
25
|
-
- Trust is everything
|
|
26
|
-
- No BS - only verified claims
|
|
27
|
-
|
|
28
|
-
## Development Setup
|
|
29
|
-
|
|
30
|
-
### Prerequisites
|
|
31
|
-
|
|
32
|
-
- Node.js 20+
|
|
33
|
-
- npm or yarn
|
|
34
|
-
- Git
|
|
35
|
-
- TypeScript knowledge
|
|
36
|
-
|
|
37
|
-
### Getting Started
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# Clone the repository
|
|
41
|
-
git clone https://github.com/Wolfe-Jam/faf-taf-action.git
|
|
42
|
-
cd faf-taf-action
|
|
43
|
-
|
|
44
|
-
# Install dependencies
|
|
45
|
-
npm install
|
|
46
|
-
|
|
47
|
-
# Build the project
|
|
48
|
-
npm run build
|
|
49
|
-
|
|
50
|
-
# Run tests
|
|
51
|
-
npm test
|
|
52
|
-
|
|
53
|
-
# Run integration tests
|
|
54
|
-
npx tsx test-standalone.ts
|
|
55
|
-
npx tsx test-mcp.ts
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Project Structure
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
faf-taf-action/
|
|
62
|
-
├── src/
|
|
63
|
-
│ ├── index.ts # Main action entry point
|
|
64
|
-
│ ├── taf-core.ts # MCP-portable TAF operations
|
|
65
|
-
│ └── parsers/
|
|
66
|
-
│ └── jest.ts # Jest output parser
|
|
67
|
-
├── tests/
|
|
68
|
-
│ └── jest-parser.test.ts # Unit tests
|
|
69
|
-
├── docs/
|
|
70
|
-
│ ├── USER-GUIDE.md # User documentation
|
|
71
|
-
│ └── RELEASE-NOTES.md # Release history
|
|
72
|
-
├── action.yml # Action definition
|
|
73
|
-
└── package.json # Dependencies
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## How to Contribute
|
|
77
|
-
|
|
78
|
-
### 1. Report Bugs
|
|
79
|
-
|
|
80
|
-
Open an issue with:
|
|
81
|
-
- Clear description
|
|
82
|
-
- Steps to reproduce
|
|
83
|
-
- Expected vs actual behavior
|
|
84
|
-
- Environment details
|
|
85
|
-
- Minimal reproduction case
|
|
86
|
-
|
|
87
|
-
### 2. Suggest Features
|
|
88
|
-
|
|
89
|
-
Open an issue with:
|
|
90
|
-
- Use case description
|
|
91
|
-
- Why it's valuable
|
|
92
|
-
- Proposed implementation (optional)
|
|
93
|
-
- Alternatives considered
|
|
94
|
-
|
|
95
|
-
### 3. Submit Code
|
|
96
|
-
|
|
97
|
-
1. Fork the repository
|
|
98
|
-
2. Create a feature branch
|
|
99
|
-
3. Make your changes
|
|
100
|
-
4. Add tests
|
|
101
|
-
5. Update documentation
|
|
102
|
-
6. Submit a pull request
|
|
103
|
-
|
|
104
|
-
## Coding Standards
|
|
105
|
-
|
|
106
|
-
### TypeScript
|
|
107
|
-
|
|
108
|
-
- Use strict mode (already configured)
|
|
109
|
-
- Explicit types everywhere
|
|
110
|
-
- No `any` unless absolutely necessary
|
|
111
|
-
- Descriptive variable names
|
|
112
|
-
- Functions should be pure when possible
|
|
113
|
-
|
|
114
|
-
### Testing
|
|
115
|
-
|
|
116
|
-
- All new code must have tests
|
|
117
|
-
- Maintain 100% coverage for critical paths
|
|
118
|
-
- Use descriptive test names
|
|
119
|
-
- Test both success and failure cases
|
|
120
|
-
|
|
121
|
-
### Documentation
|
|
122
|
-
|
|
123
|
-
- Update README.md for user-facing changes
|
|
124
|
-
- Update USER-GUIDE.md for new features
|
|
125
|
-
- Add inline comments for complex logic
|
|
126
|
-
- Keep CLAUDE.md synchronized
|
|
127
|
-
|
|
128
|
-
### Commits
|
|
129
|
-
|
|
130
|
-
Follow our git protocol:
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
<type>: <what changed>
|
|
134
|
-
|
|
135
|
-
- <specific change 1>
|
|
136
|
-
- <specific change 2>
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Types:** `fix:` `feat:` `docs:` `refactor:` `chore:` `test:`
|
|
140
|
-
|
|
141
|
-
**Examples:**
|
|
142
|
-
```
|
|
143
|
-
fix: Handle Jest output with skipped tests
|
|
144
|
-
|
|
145
|
-
- Add skipped count parsing
|
|
146
|
-
- Update test result interface
|
|
147
|
-
- Add unit tests for skipped tests
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
feat: Add Mocha parser support
|
|
152
|
-
|
|
153
|
-
- Create mocha.ts parser
|
|
154
|
-
- Add Mocha output format detection
|
|
155
|
-
- Update documentation
|
|
156
|
-
- Add integration tests
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Never:**
|
|
160
|
-
- No exclamation marks
|
|
161
|
-
- No emotion or hype
|
|
162
|
-
- No "finally" or "at last"
|
|
163
|
-
- Keep it boring and professional
|
|
164
|
-
|
|
165
|
-
## Adding Test Framework Support
|
|
166
|
-
|
|
167
|
-
To add support for a new test framework:
|
|
168
|
-
|
|
169
|
-
### 1. Create Parser
|
|
170
|
-
|
|
171
|
-
Create `src/parsers/[framework].ts`:
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
export interface TestResults {
|
|
175
|
-
total: number;
|
|
176
|
-
passed: number;
|
|
177
|
-
failed: number;
|
|
178
|
-
skipped?: number;
|
|
179
|
-
result: 'PASSED' | 'FAILED' | 'IMPROVED' | 'DEGRADED';
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function parseFrameworkOutput(output: string): TestResults | null {
|
|
183
|
-
// Parse framework-specific output
|
|
184
|
-
// Return null if output doesn't match format
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### 2. Add Tests
|
|
189
|
-
|
|
190
|
-
Create `tests/[framework]-parser.test.ts`:
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
import { parseFrameworkOutput } from '../src/parsers/framework';
|
|
194
|
-
|
|
195
|
-
describe('Framework Parser', () => {
|
|
196
|
-
it('should parse all passing tests', () => {
|
|
197
|
-
const output = `...`;
|
|
198
|
-
const result = parseFrameworkOutput(output);
|
|
199
|
-
expect(result?.total).toBe(10);
|
|
200
|
-
// ... more assertions
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
// Test all output variations
|
|
204
|
-
});
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 3. Update Main Entry
|
|
208
|
-
|
|
209
|
-
Modify `src/index.ts` to detect and use the new parser.
|
|
210
|
-
|
|
211
|
-
### 4. Update Documentation
|
|
212
|
-
|
|
213
|
-
- Add to README.md supported frameworks list
|
|
214
|
-
- Add examples to USER-GUIDE.md
|
|
215
|
-
- Update RELEASE-NOTES.md
|
|
216
|
-
|
|
217
|
-
## Testing Requirements
|
|
218
|
-
|
|
219
|
-
Before submitting a PR:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# All unit tests must pass
|
|
223
|
-
npm test
|
|
224
|
-
|
|
225
|
-
# Build must succeed with no errors
|
|
226
|
-
npm run build
|
|
227
|
-
|
|
228
|
-
# Integration tests must pass
|
|
229
|
-
npx tsx test-standalone.ts
|
|
230
|
-
npx tsx test-mcp.ts
|
|
231
|
-
|
|
232
|
-
# TypeScript must compile with no errors
|
|
233
|
-
npx tsc --noEmit
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## Review Process
|
|
237
|
-
|
|
238
|
-
1. **Automated Checks**
|
|
239
|
-
- TypeScript compilation
|
|
240
|
-
- Test suite (must be 100%)
|
|
241
|
-
- Linting
|
|
242
|
-
|
|
243
|
-
2. **Code Review**
|
|
244
|
-
- Architecture fit
|
|
245
|
-
- Code quality
|
|
246
|
-
- Test coverage
|
|
247
|
-
- Documentation
|
|
248
|
-
|
|
249
|
-
3. **Testing**
|
|
250
|
-
- Manual testing if needed
|
|
251
|
-
- Integration verification
|
|
252
|
-
|
|
253
|
-
4. **Approval & Merge**
|
|
254
|
-
- Squash and merge
|
|
255
|
-
- Clean commit history
|
|
256
|
-
|
|
257
|
-
## Release Process
|
|
258
|
-
|
|
259
|
-
Releases follow semantic versioning:
|
|
260
|
-
|
|
261
|
-
- **Major** (v2.0.0): Breaking changes
|
|
262
|
-
- **Minor** (v1.1.0): New features, backward compatible
|
|
263
|
-
- **Patch** (v1.0.1): Bug fixes
|
|
264
|
-
|
|
265
|
-
Release checklist:
|
|
266
|
-
1. Update version in package.json
|
|
267
|
-
2. Update RELEASE-NOTES.md
|
|
268
|
-
3. Run full test suite
|
|
269
|
-
4. Build and verify dist/
|
|
270
|
-
5. Create git tag
|
|
271
|
-
6. Push to GitHub
|
|
272
|
-
7. Create GitHub release
|
|
273
|
-
8. Announce in discussions
|
|
274
|
-
|
|
275
|
-
## Championship Standards
|
|
276
|
-
|
|
277
|
-
We maintain F1-inspired engineering standards:
|
|
278
|
-
|
|
279
|
-
- **Methodical**: Not a race, do it right
|
|
280
|
-
- **Tested**: WJTTC certified
|
|
281
|
-
- **Professional**: Boring is good
|
|
282
|
-
- **Trusted**: Facts only, no hype
|
|
283
|
-
|
|
284
|
-
## Questions?
|
|
285
|
-
|
|
286
|
-
- GitHub Discussions: https://github.com/Wolfe-Jam/faf/discussions
|
|
287
|
-
- Email: team@faf.one
|
|
288
|
-
|
|
289
|
-
Thank you for contributing to the Golden Triangle!
|
package/SECURITY.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
We provide security updates for the latest released version. For older versions, please upgrade to the current release.
|
|
6
|
-
|
|
7
|
-
## Reporting a Vulnerability
|
|
8
|
-
|
|
9
|
-
If you discover a security vulnerability, please email **security@faf.one** directly.
|
|
10
|
-
|
|
11
|
-
**Please do not open a public GitHub issue for security reports.** Responsible disclosure gives us time to fix the issue before it's widely known.
|
|
12
|
-
|
|
13
|
-
When reporting, please include:
|
|
14
|
-
- A description of the vulnerability
|
|
15
|
-
- Steps to reproduce
|
|
16
|
-
- Affected versions (if known)
|
|
17
|
-
- Any suggested fix (optional)
|
|
18
|
-
|
|
19
|
-
We aim to respond within 7 days.
|
package/action.yml
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
name: 'TAF — Testing AI Format'
|
|
2
|
-
description: 'A Test Receipt Printer for git. Every CI run prints a receipt to .taf — append-only, timestamped, kept in git. Proof over time.'
|
|
3
|
-
author: 'wolfejam'
|
|
4
|
-
|
|
5
|
-
branding:
|
|
6
|
-
icon: 'check-circle'
|
|
7
|
-
color: 'green'
|
|
8
|
-
|
|
9
|
-
inputs:
|
|
10
|
-
test-output-file:
|
|
11
|
-
description: 'Path to file containing test output (created by previous step)'
|
|
12
|
-
required: true
|
|
13
|
-
|
|
14
|
-
auto-commit:
|
|
15
|
-
description: 'Automatically commit .taf updates (default: true)'
|
|
16
|
-
required: false
|
|
17
|
-
default: 'true'
|
|
18
|
-
|
|
19
|
-
commit-message:
|
|
20
|
-
description: 'Custom commit message for .taf updates'
|
|
21
|
-
required: false
|
|
22
|
-
default: 'chore(taf): update .taf receipt [skip ci]'
|
|
23
|
-
|
|
24
|
-
target-branch:
|
|
25
|
-
description: 'Push receipts to a dedicated branch (e.g. taf-receipts) instead of the current branch. Branch is created automatically on first run and seeded with existing .taf data.'
|
|
26
|
-
required: false
|
|
27
|
-
default: ''
|
|
28
|
-
|
|
29
|
-
outputs:
|
|
30
|
-
result:
|
|
31
|
-
description: 'Test result (PASSED, FAILED, IMPROVED, DEGRADED)'
|
|
32
|
-
|
|
33
|
-
passed:
|
|
34
|
-
description: 'Number of tests passed'
|
|
35
|
-
|
|
36
|
-
failed:
|
|
37
|
-
description: 'Number of tests failed'
|
|
38
|
-
|
|
39
|
-
total:
|
|
40
|
-
description: 'Total number of tests'
|
|
41
|
-
|
|
42
|
-
skipped:
|
|
43
|
-
description: 'Number of tests skipped'
|
|
44
|
-
|
|
45
|
-
taf-updated:
|
|
46
|
-
description: 'Whether .taf file was updated (true/false)'
|
|
47
|
-
|
|
48
|
-
runs:
|
|
49
|
-
using: 'node24'
|
|
50
|
-
main: 'dist/index.js'
|
package/agent.fafa
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
version: "1.0"
|
|
2
|
-
agent:
|
|
3
|
-
name: faf-taf-git
|
|
4
|
-
displayName: faf-taf-git
|
|
5
|
-
id: urn:air:faf.one:agent:faf-taf-git
|
|
6
|
-
version: 2.4.1
|
|
7
|
-
description: "A Test Receipt Printer for git: each CI run appends a receipt with the test counts and result to a .taf file kept in git."
|
|
8
|
-
homepage: https://faf.one
|
|
9
|
-
capabilities:
|
|
10
|
-
- name: Print a receipt
|
|
11
|
-
type: tool
|
|
12
|
-
description: Append one Test Receipt (timestamp, counts, result, trigger) to .taf on each CI run
|
|
13
|
-
tags:
|
|
14
|
-
- print a receipt
|
|
15
|
-
- name: Read test output
|
|
16
|
-
type: tool
|
|
17
|
-
description: Parse Jest, Vitest, Bun and WJTTC test output into passed, failed and total
|
|
18
|
-
tags:
|
|
19
|
-
- read test output
|
|
20
|
-
- name: Receipts branch
|
|
21
|
-
type: tool
|
|
22
|
-
description: Push receipts to a dedicated branch such as taf-receipts, created on the first run
|
|
23
|
-
tags:
|
|
24
|
-
- receipts branch
|
|
25
|
-
- name: Auto-commit
|
|
26
|
-
type: tool
|
|
27
|
-
description: Commit the .taf update from CI, with an optional custom message
|
|
28
|
-
tags:
|
|
29
|
-
- auto-commit
|
|
30
|
-
- name: Badge
|
|
31
|
-
type: tool
|
|
32
|
-
description: Generate an SVG badge from the latest receipt in .taf
|
|
33
|
-
tags:
|
|
34
|
-
- badge
|
|
35
|
-
- name: Action outputs
|
|
36
|
-
type: tool
|
|
37
|
-
description: Expose result, passed, failed, total and taf-updated to later workflow steps
|
|
38
|
-
tags:
|
|
39
|
-
- action outputs
|
|
40
|
-
endpoints:
|
|
41
|
-
- protocol: github-action
|
|
42
|
-
transport: http
|
|
43
|
-
location: Wolfe-Jam/faf-taf-git
|
|
44
|
-
metadata:
|
|
45
|
-
cards:
|
|
46
|
-
domain: faf.one
|
|
47
|
-
examples:
|
|
48
|
-
- How do I keep a record of my test results on every CI run?
|
|
49
|
-
- How do I add Test Receipts to a GitHub Actions workflow?
|
|
50
|
-
- How do I make a test badge from my .taf history?
|
|
51
|
-
packages:
|
|
52
|
-
- registryType: npm
|
|
53
|
-
identifier: faf-taf-git
|
package/badge.svg
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="145" height="20" role="img" aria-label="TAF: 55/55 passing">
|
|
2
|
-
<title>TAF: 55/55 passing</title>
|
|
3
|
-
<linearGradient id="s" x2="0" y2="100%">
|
|
4
|
-
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
-
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
-
</linearGradient>
|
|
7
|
-
<clipPath id="r">
|
|
8
|
-
<rect width="145" height="20" rx="3" fill="#fff"/>
|
|
9
|
-
</clipPath>
|
|
10
|
-
<g clip-path="url(#r)">
|
|
11
|
-
<rect width="40" height="20" fill="#555"/>
|
|
12
|
-
<rect x="40" width="105" height="20" fill="#003366"/>
|
|
13
|
-
<rect width="145" height="20" fill="url(#s)"/>
|
|
14
|
-
</g>
|
|
15
|
-
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
|
|
16
|
-
<text x="20" y="14" fill="#010101" fill-opacity=".3">TAF</text>
|
|
17
|
-
<text x="20" y="13" fill="#fff">TAF</text>
|
|
18
|
-
<text x="92.5" y="14" fill="#010101" fill-opacity=".3">55/55 passing</text>
|
|
19
|
-
<text x="92.5" y="13" fill="#fff">55/55 passing</text>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|