4.9 KiB
4.9 KiB
Tasks — Slim @suaveplan/currency-providers
Spec-completeness preflight (AGENTS.md §12a)
- Numbered checklist of every
### Requirementand#### Scenariodrafted inspecs/currency-providers/spec.md(10 requirements kept/added; see./specs/currency-providers/spec.md).
Remove concrete provider modules
- Delete
src/providers/ecb/ - Delete
src/providers/fixer/ - Delete
src/providers/open-exchange-rates/ - Delete
src/providers/binance/ - Delete
src/providers/coingecko/ - Delete
src/providers/coinmarketcap/ - Delete
src/providers/cryptocompare/ - Delete
src/providers/kraken/ - Delete
src/providers/virtual/ - Delete now-empty
src/providers/directory - Drop the 9
./providers/<name>/<name>subpath exports frompackage.json - Drop
@suaveplan/currencyand@suaveplan/moneyfromdependenciesiff no remaining surface needs them — actually@suaveplan/currencystays (registry storesCurrencyProviderinstances from that pkg) and@suaveplan/moneydrops (only the deletedVirtualCurrencyProviderusedregisterCurrency).
Add slim-core surface
- Add
PROVIDER_NOT_REGISTERED+PROVIDER_ALREADY_REGISTEREDcodes toCURRENCY_PROVIDER_CODES(src/error-codes/error-codes.ts) - Build
src/registry/registry.ts—CurrencyProviderRegistryclass withregister/get/has/list/unregister - Build
src/registry/registry.md(sibling doc, ≥200 words) - Build
src/registry/registry.test.ts— covers every method, both registry error codes,list()sort determinism - Build
src/factory/factory.ts—defineCurrencyProviderfactory - Build
src/factory/factory.md - Build
src/factory/factory.test.ts - Build
src/http/http.ts—httpRequest+composeAbortSignal - Build
src/http/http.md - Build
src/http/http.test.ts— happy path, HTTP_ERROR on non-2xx, header forwarding, caller-signal abort, timeout-signal abort, both signals abort,composeAbortSignalall four combinations - Update
src/error-codes/error-codes.test.tsto assert the two new codes and prove they are reachable from registry call sites - Update
src/index.ts— explicit named barrel with new exports + drop removed provider exports - Update
package.jsonexportsmap: 5 subpaths total (.,./error-codes/error-codes,./types/configs,./registry/registry,./factory/factory,./http/http) - Update
tests/dep-graph.test.tsto match the new subpath list (or delete the per-subpath assertions and replace with a check that every<feature>/index.tsis referenced from a subpath export) - Update
vite.config.tsexternal list (drop@suaveplan/money)
Documentation
- Update
README.mdModules + Provider summary sections to describe the slim core (registry / factory / httpRequest / shared types) and link to the future sibling packages - Confirm every
.tsinsrc/has a sibling.md(the §13 step-5 grep returns zero)
Pre-archive gates (AGENTS.md §13)
- Step 0 — spec reconciliation: every
### Requirementand**Verified by:**resolves to a real file + verbatim test name - Step 1 —
bunx turbo lint typecheck test --filter=@suaveplan/currency-providersandbun run checkboth green - Step 2 —
bunx turbo test:coverage --filter=@suaveplan/currency-providersreports 100/100/100/100 via istanbul - Step 3 —
bunx turbo build --filter=@suaveplan/currency-providersgreen - Step 4 — banned-pattern grep returns zero
- Step 4a — barrel-shape grep returns zero
- Step 4b — test-runner-import grep returns zero
- Step 5 — missing-
.mdgrep returns zero - Step 6 — README present
- Step 7 — bare-version grep returns zero
- Step 8 — subpath-export count = 5 (matches feature module count)
- Step 9 — security-scan grep returns zero
- Step 10 — dependent sweep
(
bunx turbo test --filter=...@suaveplan/currency-providers)
Root-doc refresh (AGENTS.md §13b)
- Re-run
bun scripts/folder-reorg/generate-manifest.tsto refreshMANIFEST.md - Re-run
bun scripts/generate-missing.tsto refreshMISSING.yml - Update
STATUS.mdrow for@suaveplan/currency-providersto describe the slim shape - Update
SUMMARY.mdrow for@suaveplan/currency-providerslikewise bunx markdownlint-cli2 --fixacross touched root + change files
Archive (AGENTS.md §14)
- Fold
specs/currency-providers/spec.mdintoopenspec/specs/currency-providers/spec.md(apply REMOVED + ADDED to the canonical spec landed by the 2026-05-17 change) - Move
openspec/changes/slim-currency-providers/→openspec/archive/2026-05-17-slim-currency-providers/