# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-06-01

### Changed

- Dev: migrated pnpm config from `package.json` `pnpm.onlyBuiltDependencies` (removed in pnpm 11) to `pnpm-workspace.yaml` `allowBuilds`. `packageManager` and `engines.pnpm` bumped to pnpm 11. No user-facing behaviour change; published package surface is identical.
- **BREAKING**: minimum Node version raised from 20 to 22 (`engines.node >=22.0.0`). Driven by upstream pnpm 11.x dropping Node 20 support (uses `node:sqlite`, available in Node 22.13+ only). `@types/node` bumped to `^24` (LTS line).
- Upgraded CLI framework `commander` 12→14. No user-facing behaviour change expected; `--help`, `--version`, and subcommand signatures (`analyze <source>`, `compare <sourceA> <sourceB>`) are unchanged. If `--help` output formatting shifts (whitespace), it is upstream cosmetic.
- **BREAKING**: short version flag changed from `-v` to `-V` for consistency with sibling CLIs (`fhir-resource-diff`, `fhir-test-data`) and the commander default convention. `--version` (long form) is unchanged. Pre-1.0 release; scripts using `-v` should switch to `-V` or `--version`.
- Dev: bumped typescript 5.9→6 and vitest 2→3 (`@vitest/coverage-v8` 2→3); added `ignoreDeprecations: "6.0"` and `types: ["node"]` to `tsconfig.json` for tsup DTS compatibility. vitest 4 deferred pending vitepress 2 stable (vite 5 → 6 peer constraint). No user-facing behaviour change.
- Dev: bumped eslint to 10; removed unused zod dependency. No user-facing behaviour change.

## [0.1.3] - 2026-04-24

### Fixed

- Corrected AU Core profile detection to use the HL7 Australia canonical prefix `http://hl7.org.au/fhir/core/`
- Clarified that supported profile URL prefixes are FHIR canonical identifiers and may not resolve in a browser

### Changed

- README: added "Why this exists" section, Development section, ecosystem table with all three sister tools, and pipeline integration examples; fixed the "What this tool does NOT do" entry for authentication to reflect that bearer tokens are supported but OAuth flows are not
- `llms.txt`: updated with authentication details, exit codes, cross-references to `fhir-resource-diff` and `fhir-test-data`

## [0.1.2] - 2026-04-19

### Added

- OAuth 2.0 bearer token support for secured FHIR servers: `--bearer-token <token>` flag on `analyze` and `compare` commands; falls back to `FHIR_TOKEN` environment variable
- `FetchOptions` type exported from the library for consumer use
- `fetchCapabilityStatement(url, options?)` now accepts an optional `headers` map

### Fixed

- Removed deprecated `tsconfig.json` options (`baseUrl`, `esModuleInterop: false`) that would stop functioning in TypeScript 7.0

## [0.1.1] - 2026-04-19

### Added

- Profile detection for FR Core (Interop'Santé / HL7 France), NL Nictiz (Netherlands), and IHE (Integrating the Healthcare Enterprise)

## [0.1.0] - 2026-04-19

### Added

- `analyze` command: fetch and analyze a FHIR server's CapabilityStatement from a URL or local JSON file
- `compare` command: compare two FHIR servers' capabilities side by side; `--exit-on-diff` flag for CI assertions
- Output formats: `text` (human-readable), `json` (stable machine-consumable schema), `markdown` (tables)
- Profile detection for 9 international/national FHIR profile families: US Core, UK Core, AU Core, AU Base, CA Baseline, IPS, IPA, SMART App Launch, ISiK (Germany)
- Warning rules for common CapabilityStatement issues: missing security, draft status, search-type without search parameters, unrecognized FHIR version, no resources declared
- Browser-safe TypeScript core (`src/core/`, `src/registry/`, `src/formatters/`) — works in Node.js, Deno, Cloudflare Workers, and browser bundles
- Library exports: `fetchCapabilityStatement`, `parseFromJson`, `analyze`, `compare` from main entry; `detectProfiles`, `PROFILE_REGISTRY` from `fhir-capability-analyzer/registry`
- Three example CapabilityStatement fixtures: `examples/hapi-r4.json`, `examples/us-core-server.json`, `examples/ips-server.json`
- VitePress documentation site at [dnlbox.github.io/fhir-capability-analyzer](https://dnlbox.github.io/fhir-capability-analyzer/)
- GitHub Actions: CI (Node 20 + lts/*), docs deploy, npm + GitHub Packages publish on release

[Unreleased]: https://github.com/dnlbox/fhir-capability-analyzer/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/dnlbox/fhir-capability-analyzer/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/dnlbox/fhir-capability-analyzer/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/dnlbox/fhir-capability-analyzer/releases/tag/v0.1.2
[0.1.1]: https://github.com/dnlbox/fhir-capability-analyzer/releases/tag/v0.1.1
[0.1.0]: https://github.com/dnlbox/fhir-capability-analyzer/releases/tag/v0.1.0
