Commit ae4c51b
Put timestamp first in SPFxScaffoldLog JSONL output (#232)
## Description
Moves `timestamp` to be the first field in each serialized JSONL line in
`SPFxScaffoldLog`, making the log more human-readable when viewed line
by line (the timestamp is now immediately visible at the start of each
entry).
**Change in `append()`:**
```ts
// Before
const normalizedEvent = { ...event, timestamp: event.timestamp || new Date().toISOString() };
// After
const normalizedEvent = { timestamp: event.timestamp || new Date().toISOString(), ...event };
```
## How was this tested
- [ ] `rushx build` in `api/spfx-template-api/`
## Type of change
- [ ] Bug fix
- [x] New feature / enhancement
- [ ] Template change
- [ ] Docs / CI change only
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 45d5e53 commit ae4c51b
2 files changed
Lines changed: 15 additions & 3 deletions
File tree
- api/spfx-template-api/src/logging
- common/changes/@microsoft/spfx-cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments