@chappibunny/repolens 1.5.1 โ 1.5.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 -0
- package/package.json +1 -1
- package/src/utils/retry.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoLens will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.5.3
|
|
6
|
+
|
|
7
|
+
### ๐ง Improvements
|
|
8
|
+
|
|
9
|
+
- **CI test gate**: Publish workflow now runs the full Vitest suite before publishing. The `publish` job requires both `security` and `test` jobs to pass.
|
|
10
|
+
|
|
11
|
+
### ๐งช Test Coverage
|
|
12
|
+
|
|
13
|
+
- **Renderer unit tests** (`tests/renderers.test.js`): 33 tests covering all four `render.js` exports (`renderSystemOverview`, `renderModuleCatalog`, `renderApiSurface`, `renderRouteMap`), `renderSystemMap` (with/without depGraph, categories, limits), and `renderDiff.js` (`buildArchitectureDiffData` route detection, `renderArchitectureDiff` truncation).
|
|
14
|
+
- **311 tests** passing across **21 test files** (up from 278/20).
|
|
15
|
+
|
|
16
|
+
## 1.5.2
|
|
17
|
+
|
|
18
|
+
### ๐ Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **retry-after: 0 honoured**: Fixed falsy-zero bug in `fetchWithRetry` where `retry-after: 0` header was ignored (fell through to `baseDelayMs`). Now properly honours the server's hint, even when it's zero.
|
|
21
|
+
|
|
22
|
+
### ๐งช Test Quality
|
|
23
|
+
|
|
24
|
+
- **Mock HTTP server integration tests** (`tests/http-integration.test.js`): 17 tests exercising `fetchWithRetry` against a real local HTTP server โ retry on 429/500, timeout handling, header validation, Notion/Confluence block/format generation.
|
|
25
|
+
- **Rate-limit concurrent stress tests** (`tests/rate-limit-stress.test.js`): 9 tests firing 20โ50 parallel requests through the token bucket to verify throttling, deadlock freedom, burst behaviour, and `batchRequests` concurrency control.
|
|
26
|
+
- **Watch mode test refactor** (`tests/watch.test.js`): Replaced fake timers with real temp directories and real `fs.watch` events. Tests now create actual files, observe filesystem watcher callbacks, and verify debounced rebuilds without `vi.useFakeTimers()`.
|
|
27
|
+
- **278 tests** passing across **20 test files** (up from 251/18).
|
|
28
|
+
|
|
5
29
|
## 1.5.1
|
|
6
30
|
|
|
7
31
|
### ๐ Bug Fixes
|
package/package.json
CHANGED
package/src/utils/retry.js
CHANGED
|
@@ -38,11 +38,11 @@ export async function fetchWithRetry(url, options = {}, config = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const retryAfterHeader = response.headers.get("retry-after");
|
|
41
|
-
const retryAfterMs = retryAfterHeader
|
|
41
|
+
const retryAfterMs = retryAfterHeader != null
|
|
42
42
|
? Number(retryAfterHeader) * 1000
|
|
43
43
|
: null;
|
|
44
44
|
|
|
45
|
-
const delay = retryAfterMs
|
|
45
|
+
const delay = retryAfterMs != null ? retryAfterMs : Math.min(baseDelayMs * 2 ** attempt, maxDelayMs);
|
|
46
46
|
|
|
47
47
|
warn(`${label} failed with retryable status ${response.status}. Retrying in ${delay}ms (attempt ${attempt + 1}/${retries + 1})`);
|
|
48
48
|
await sleep(delay);
|