3.4 KiB
3.4 KiB
Tasks — add-currency-provider-fixer
1. Package scaffold
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.tsconfig.json+tsconfig.lib.jsonextending the repo base.vite.config.tswithpreserveModulesand externals matching deps.vitest.config.tswithpool: "forks",setupFilespolyfill stub,provider: "istanbul", thresholds100/100/100/100.tests/setup/polyfills.tsempty universal-tier stub.
2. Implementation
src/fixer/fixer.ts—FixerProvider implements CurrencyProvider:- constructor takes
ApiKeyConfig, raisesMISSING_CONFIGon emptyapiKey. - resolves
baseUrl(defaulthttps://data.fixer.io/api) andfetch(defaultglobalThis.fetch). fetchRates(options?)buildsURLSearchParams(access_key,base, optionalsymbols), calls slim-corehttpRequest, parses JSON, discriminates envelope, returns canonicalRateFetchResultor raises typed error.
- constructor takes
src/fixer/index.ts— explicit named barrel for the feature module (FixerProvider).src/index.ts— explicit named barrel re-exportingFixerProvider.
3. Docs
src/fixer/fixer.md— Purpose / Features / Usage Basic / Usage Advanced / API Reference / Implementation Notes (≥200 words excluding code blocks).README.mdat package root with Install / Quick start / Features / Modules / Status.
4. Tests
src/fixer/fixer.test.tscovers every requirement inspecs/currency-provider-fixer/spec.md. All tests import from@suaveplan/testing/runner; everyit(...)has{ timeout: 5000 }. No mocks — every fetch is a recordingFetchLikeclosure.
5. Pre-ship gates (§13)
- Spec reconciliation (step 0): every
### Requirementand every**Verified by:**matches a test that exists insrc/fixer/fixer.test.ts. bunx turbo lint typecheck test --filter=@suaveplan/currency-provider-fixergreen.bun run checkfrom package dir green.bunx turbo test:coverage --filter=@suaveplan/currency-provider-fixergreen at 100/100/100/100.bunx turbo build --filter=@suaveplan/currency-provider-fixergreen.- Banned-pattern grep zero (TODO / FIXME / @deprecated / ts-ignore /
ts-expect-error / .skip / .only /
console.log). - Barrel-shape grep zero (no
export *in<feature>/index.ts). - Test-runner-import grep zero (no direct
from "vitest"/from "bun:test"). - Missing
.mdgrep zero. README.mdpresent.- No bare versions in
package.json(every dep usescatalog:orworkspace:^). - Subpath-export count matches feature count (1).
- Security grep zero (no hardcoded keys / tokens / passwords).
6. Root-doc refresh (§13b)
bun scripts/folder-reorg/generate-manifest.ts— refreshMANIFEST.md.- Update
STATUS.md(addcurrency-provider-fixerrow under Completed). - Update
SUMMARY.md(add per-package paragraph). bunx markdownlint-cli2 --fixacross touched files.
7. Archive (§14)
- Fold
specs/currency-provider-fixer/spec.mdintoopenspec/specs/currency-provider-fixer/spec.md. - Move
openspec/changes/add-currency-provider-fixer/toopenspec/archive/2026-05-17-add-currency-provider-fixer/.