docs: fix fs-http File Operations drift + index TS version claim#106
docs: fix fs-http File Operations drift + index TS version claim#106Goosterhof wants to merge 1 commit into
Conversation
`docs/packages/http.md` File Operations documented the pre-0.3.0 DOM-bound `downloadRequest`/`previewRequest` (3-arg, browser save dialog, blobUrl-string return) that no longer exists. The actual 0.3.0+ surface is transport-pure: `(endpoint, options?) → Promise<AxiosResponse<Blob>>`, no DOM, no save dialog (verified against `packages/http/src/types.ts:50,58` + `http.ts:120,123`). Rewrote the prose examples to the consumer-owned download dance (`triggerDownload` from fs-helpers / `URL.createObjectURL`), aligning the prose with the already-current API-reference table. `docs/index.md` hero feature claimed "TypeScript 5.9+"; actual is `^6.0`. Fixed to "TypeScript 6.0+". Docs-only — no `src/`, no publish trigger (publish fires on `packages/*/package.json`). VitePress build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying fs-packages with
|
| Latest commit: |
1e39ef7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bd5a0c9d.fs-packages.pages.dev |
| Branch Preview URL: | https://engineer-http-docs-drift.fs-packages.pages.dev |
Goosterhof
left a comment
There was a problem hiding this comment.
✅ Approve-worthy
0 blockers · 0 concerns · 1 nit · 2 praise
Docs-only PR correcting two drifted claims: the File Operations prose in docs/packages/http.md (which documented the pre-0.3.0 DOM-bound 3-arg signatures with a "browser save dialog") and the TypeScript 5.9+ hero line in docs/index.md. Every claim verifies against origin/main source. Self-review constraint forces COMMENT, but the diff is accurate and mergeable.
Verification
- Signatures —
packages/http/src/types.tsandhttp.tsonorigin/maindefine bothdownloadRequestandpreviewRequestas(endpoint: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Blob>>. Two-arg, transport-only, no DOM. The diff's rewritten prose matches exactly; the olddownloadRequest('/reports/annual', 'annual-report', 'application/pdf')3-arg form does not exist on main. Correct fix. triggerDownloadexample —packages/helpers/src/dom-download.tsexportstriggerDownload = (blob: Blob, filename: string): void. The new exampletriggerDownload(response.data, 'annual-report.pdf')matches the real signature. The source docblock itself points consumers atfs-helpers'triggerDownload, so the doc now mirrors the API author's own intent.- TS version — root
package.jsonon main pins"typescript": "^6.0".5.9+→6.0+is the honest claim.
Nits
docs/packages/http.md— the PR body cites the aligned API-reference table at:255-256, but the table at that range on main is "Middleware Registration". The File Operations reference table is presumably elsewhere in the file. Immaterial to the diff (which is accurate either way), but the PR-body line citation is off.
Praise
- Split-currency caught correctly: the prose was stale while the API surface had already moved to transport-pure in 0.3.0. Fixing the narrative to match the shipped signatures — rather than the reverse — is the right direction.
- The rewritten preview example explicitly notes
URL.revokeObjectURLcleanup. That's the object-URL leak consumers actually hit; documenting the revoke is load-bearing, not boilerplate.
Automated war-room agent review — posted because this PR carries the Agent Review Requested label.
PR Reviewer · claimed
|
PR Reviewer · 9/10 · PASSfs-packages #106 · AC anchor: none No findings — all reviewers clean. Actionmerge-ready |
jasperboerhof
left a comment
There was a problem hiding this comment.
Auto-approved — review verdict is PASS. See the verdict comment for the per-reviewer breakdown.
What
Two doc-drift fixes surfaced by Cartographer M3 + Scout M5 (n=2 convergent). Docs-only — no publish side effect (the publish workflow triggers on
packages/*/package.json; this PR touches onlydocs/).docs/packages/http.md— File Operations sectionThe "File Operations" prose documented the pre-0.3.0 DOM-bound signatures that no longer exist:
await http.downloadRequest('/reports/annual', 'annual-report', 'application/pdf')"triggers a browser save dialog";const blobUrl = await http.previewRequest(...)returning a string.packages/http/src/types.ts:50,58+http.ts:120,123): both are 2-arg(endpoint, options?) → Promise<AxiosResponse<Blob>>, transport-pure, no DOM, no save dialog.Rewrote the prose examples to the consumer-owned orchestration:
triggerDownload(response.data, 'annual-report.pdf')via@script-development/fs-helpersURL.createObjectURL(response.data)with explicit revoke noteThis aligns the prose with the already-current API-reference table further down (
:255-256) — the table was right, the prose was stale (split-currency).docs/index.md— hero featureTypeScript 5.9+→TypeScript 6.0+(actual is^6.0; first war-room TS6 territory).Verification
npm run docs:build(VitePress) — clean, no broken markdown/links (vendor#__PURE__warnings from@vueuse/coreare pre-existing, unrelated).oxfmt --checkon both edited files — clean.src/changes; no version bump; no publish trigger.🤖 Generated with Claude Code