2.5 KiB
2.5 KiB
Tasks: add-storage-file-bun-fs-adapter
Implementation
- 1. Author
src/bun-fs/bun-fs.tsexportingdefaultBunFs(): NodeFsLikeandpickDefaultFs(): NodeFsLike.defaultBunFs()composes over thedefaultNodeFs()base, overridingreadFiletoBun.file(path).bytes()andwriteFiletoBun.write(path, data). - 2. Author
src/bun-fs/bun-fs.test.tsusing@suaveplan/testing/runner. Cover: round-trip via Bun.write+Bun.file, forwarding of every delegated method on a real temp dir, andpickDefaultFs()returning a callableNodeFsLike. - 3. Author
src/bun-fs/bun-fs.md(sibling doc, §4 conformant — Purpose, Features, Usage Basic, Usage Advanced, API Reference, Implementation Notes; ≥200 words excl. code). - 4. Author
src/bun-fs/index.tswith explicit named re-exports (§6a — noexport *). - 5. Switch
resolveConfiginsrc/node-fs-storage/node-fs-storage.helpers.tsfromdefaultNodeFs()topickDefaultFs(). Behaviour unchanged whenoptions.fsis provided. - 6. Add
defaultBunFsandpickDefaultFstosrc/index.tsexports. - 7. Add
./bun-fs/bun-fstopackage.jsonexportsmap. - 8. Update
README.mdModules section to list the new module.
Verification
- 9.
bunx turbo lint typecheck test --filter=@suaveplan/storage-file— all green. - 10.
bunx turbo test:coverage --filter=@suaveplan/storage-file— 100/100/100/100 on every file insrc/. - 11.
bunx turbo build --filter=@suaveplan/storage-file— green. - 12. Banned-pattern scan in
src/(zero output expected):grep -rn "@deprecated\|TODO\|FIXME\|ts-ignore\|ts-expect-error\|\.skip\|\.only" packages/storage/storage-file/src/ --include="*.ts". - 13. Test-runner import scan (zero output):
grep -rnE "from ['\"](vitest|bun:test)['\"]" packages/storage/storage-file/src/. - 14. Subpath export count matches feature-module count.
- 15. Sibling
.mdexists for every implementation.tsinsrc/bun-fs/.
Archive
- 16. Fold
specs/storage-file/spec.mdintoopenspec/specs/storage-file/spec.md. - 17. Move
openspec/changes/add-storage-file-bun-fs-adapter/toopenspec/archive/<yyyy-mm-dd>-add-storage-file-bun-fs-adapter/. - 18. Refresh
MANIFEST.md(bun scripts/folder-reorg/generate-manifest.ts) and runbunx markdownlint-cli2 --fixon touched docs.