Skip to content

Commit ed17dbd

Browse files
authored
Merge pull request #18 from unic/develop
auto-formatter multiple improvements
2 parents d4b9549 + 9d5b8b0 commit ed17dbd

17 files changed

Lines changed: 593 additions & 163 deletions

apps/claude-code/auto-format/.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"name": "auto-format",
2222
"source": "./",
2323
"tags": ["productivity", "code-quality"],
24-
"version": "0.5.8"
24+
"version": "0.5.15"
2525
}
2626
]
2727
}

apps/claude-code/auto-format/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auto-format",
3-
"version": "0.5.8",
3+
"version": "0.5.15",
44
"description": "Auto-format and lint files when Claude Code edits them. Runs Prettier + ESLint --fix after Write/Edit/MultiEdit/NotebookEdit.",
55
"author": {
66
"name": "Unic AG",

apps/claude-code/auto-format/CHANGELOG.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,118 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
- (none)
2121

22+
## [0.5.15] — 2026-05-04
23+
24+
### Breaking
25+
26+
- (none)
27+
28+
### Added
29+
30+
- (none)
31+
32+
### Fixed
33+
34+
- `runFormatter`: detect ETIMEDOUT precisely for timeouts; report signal-kill and spawn errors with distinct messages; wrap `descriptor.args()` in try/catch to uphold the never-throws contract
35+
36+
## [0.5.14] — 2026-05-03
37+
38+
### Breaking
39+
40+
- (none)
41+
42+
### Added
43+
44+
- (none)
45+
46+
### Changed
47+
48+
- Internal: extracted `DEFAULTS` and `loadConfig` from `format-hook.mjs` into `lib/config.mjs`,
49+
with ten unit tests covering the merge strategy — no behaviour change for consumers.
50+
51+
### Fixed
52+
53+
- (none)
54+
55+
## [0.5.13] — 2026-05-03
56+
57+
### Breaking
58+
59+
- (none)
60+
61+
### Added
62+
63+
- (none)
64+
65+
### Fixed
66+
67+
- Extract `DEFAULTS` and `loadConfig(projectDir)` to `scripts/lib/config.mjs` with 10 unit tests
68+
69+
## [0.5.12] — 2026-05-03
70+
71+
### Breaking
72+
73+
- (none)
74+
75+
### Added
76+
77+
- (none)
78+
79+
### Changed
80+
81+
- Internal: extracted shared subprocess contract from `runPrettier`/`runEslint`/`runBiome` into
82+
`lib/runners.mjs` — no behaviour change for consumers.
83+
84+
### Fixed
85+
86+
- (none)
87+
88+
## [0.5.11] — 2026-05-03
89+
90+
### Breaking
91+
92+
- (none)
93+
94+
### Added
95+
96+
- (none)
97+
98+
### Changed
99+
100+
- Prettier failure messages now include the exit code (`prettier failed (exit N): …`) to align with the ESLint/Biome format; previous format was `prettier failed: …`
101+
102+
### Fixed
103+
104+
- Replaced inline `runPrettier`, `runEslint`, `runBiome` functions in `format-hook.mjs` with `FormatterDescriptor` constants and a single `runFormatter` call-through
105+
106+
## [0.5.10] — 2026-05-03
107+
108+
### Breaking
109+
110+
- (none)
111+
112+
### Added
113+
114+
- (none)
115+
116+
### Fixed
117+
118+
- Extract `runFormatter` to `scripts/lib/runners.mjs` with six unit tests; update `pnpm test` to run both test files
119+
120+
## [0.5.9] — 2026-05-03
121+
122+
### Breaking
123+
124+
- (none)
125+
126+
### Added
127+
128+
- (none)
129+
130+
### Fixed
131+
132+
- Added `FormatterDescriptor` typedef to `scripts/lib/types.mjs` in preparation for `lib/runners.mjs` extraction
133+
22134
## [0.5.8] — 2026-04-30
23135

24136
### Breaking

apps/claude-code/auto-format/docs/plans/25-formatter-descriptor-type.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 25. Add `FormatterDescriptor` typedef to `lib/types.mjs`
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** XS

apps/claude-code/auto-format/docs/plans/26-runner-module.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 26. Extract `lib/runners.mjs` with `runFormatter` and tests
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** S

apps/claude-code/auto-format/docs/plans/27-replace-runner-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 27. Replace runner functions with descriptors in `format-hook.mjs`
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** S

apps/claude-code/auto-format/docs/plans/28-version-bump.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 28. Version bump and CHANGELOG entry
22

3+
**Status: done — 2026-05-04**
4+
35
**Priority:** P2
46
**Effort:** XS
57
**Version impact:** patch

apps/claude-code/auto-format/docs/plans/29-config-module.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 29. Extract `lib/config.mjs` with `DEFAULTS`, `loadConfig`, and tests
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** S

apps/claude-code/auto-format/docs/plans/30-wire-up-config-module.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 30. Update `format-hook.mjs` to use `lib/config.mjs`
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** XS

apps/claude-code/auto-format/docs/plans/31-version-bump.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 31. Version bump and CHANGELOG entry
2+
**Status: done — 2026-05-04**
23

34
**Priority:** P2
45
**Effort:** XS

0 commit comments

Comments
 (0)