Files
suaveplan/openspec/archive/2026-05-17-add-currency-provider-fixer/tasks.md
2026-05-27 23:29:53 +01:00

79 lines
3.4 KiB
Markdown

# Tasks — add-currency-provider-fixer
## 1. Package scaffold
- [x] `packages/finance/currency-provider-fixer/package.json` — `0.1.0`,
`sideEffects: false`, deps on `@suaveplan/currency` /
`@suaveplan/currency-providers` / `@suaveplan/types` / `tslib`, devDeps via
catalog refs.
- [x] `tsconfig.json` + `tsconfig.lib.json` extending the repo base.
- [x] `vite.config.ts` with `preserveModules` and externals matching deps.
- [x] `vitest.config.ts` with `pool: "forks"`, `setupFiles` polyfill stub,
`provider: "istanbul"`, thresholds `100/100/100/100`.
- [x] `tests/setup/polyfills.ts` empty universal-tier stub.
## 2. Implementation
- [x] `src/fixer/fixer.ts` — `FixerProvider implements CurrencyProvider`:
- constructor takes `ApiKeyConfig`, raises `MISSING_CONFIG` on empty
`apiKey`.
- resolves `baseUrl` (default `https://data.fixer.io/api`) and `fetch`
(default `globalThis.fetch`).
- `fetchRates(options?)` builds `URLSearchParams` (`access_key`, `base`,
optional `symbols`), calls slim-core `httpRequest`, parses JSON,
discriminates envelope, returns canonical `RateFetchResult` or raises
typed error.
- [x] `src/fixer/index.ts` — explicit named barrel for the feature module
(`FixerProvider`).
- [x] `src/index.ts` — explicit named barrel re-exporting `FixerProvider`.
## 3. Docs
- [x] `src/fixer/fixer.md` — Purpose / Features / Usage Basic / Usage
Advanced / API Reference / Implementation Notes (≥200 words excluding
code blocks).
- [x] `README.md` at package root with Install / Quick start / Features /
Modules / Status.
## 4. Tests
- [x] `src/fixer/fixer.test.ts` covers every requirement in
`specs/currency-provider-fixer/spec.md`. All tests import from
`@suaveplan/testing/runner`; every `it(...)` has `{ timeout: 5000 }`. No
mocks — every fetch is a recording `FetchLike` closure.
## 5. Pre-ship gates (§13)
- [x] Spec reconciliation (step 0): every `### Requirement` and every
`**Verified by:**` matches a test that exists in `src/fixer/fixer.test.ts`.
- [x] `bunx turbo lint typecheck test --filter=@suaveplan/currency-provider-fixer` green.
- [x] `bun run check` from package dir green.
- [x] `bunx turbo test:coverage --filter=@suaveplan/currency-provider-fixer`
green at 100/100/100/100.
- [x] `bunx turbo build --filter=@suaveplan/currency-provider-fixer` green.
- [x] Banned-pattern grep zero (TODO / FIXME / @deprecated / ts-ignore /
ts-expect-error / .skip / .only / `console.log`).
- [x] Barrel-shape grep zero (no `export *` in `<feature>/index.ts`).
- [x] Test-runner-import grep zero (no direct `from "vitest"` / `from "bun:test"`).
- [x] Missing `.md` grep zero.
- [x] `README.md` present.
- [x] No bare versions in `package.json` (every dep uses `catalog:` or
`workspace:^`).
- [x] Subpath-export count matches feature count (1).
- [x] Security grep zero (no hardcoded keys / tokens / passwords).
## 6. Root-doc refresh (§13b)
- [x] `bun scripts/folder-reorg/generate-manifest.ts` — refresh `MANIFEST.md`.
- [x] Update `STATUS.md` (add `currency-provider-fixer` row under
Completed).
- [x] Update `SUMMARY.md` (add per-package paragraph).
- [x] `bunx markdownlint-cli2 --fix` across touched files.
## 7. Archive (§14)
- [x] Fold `specs/currency-provider-fixer/spec.md` into
`openspec/specs/currency-provider-fixer/spec.md`.
- [x] Move `openspec/changes/add-currency-provider-fixer/` to
`openspec/archive/2026-05-17-add-currency-provider-fixer/`.