Skip to content

build(deps): move to the 0.2 lines of hl7, fhir and ccda - #142

Merged
NSchatz merged 5 commits into
mainfrom
build/parsers-0-2
Nov 30, 2026
Merged

NSchatz merged 5 commits into
mainfrom
build/parsers-0-2

Conversation

@NSchatz

@NSchatz NSchatz commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

What

  • Moves @cosyte/hl7, @cosyte/fhir and @cosyte/ccda to ^0.2.0, @cosyte/transform to ^0.3.0, @cosyte/mllp to ^0.1.17, @cosyte/deid to ^0.2.20, and the @cosyte/synth devDependency to ^0.1.16.
  • Reads a FHIR parse as @cosyte/fhir 0.2 returns it (the resource itself, with warnings) in parse, inspect, fmt, validate and redact, with no deprecated name left.
  • cosyte parse now writes each FHIR warning as { code, position: { expression } }, the shape every other format uses. cosyte validate reports a FHIR read warning with severity warning, since a 0.2 parse warning carries no severity. Validity and exit codes do not change.
  • Updates the docs, the example and the TSDoc samples to the prefixed codes (FHIR_MALFORMED_JSON, FHIR_CODE_INVALID, HL7_NO_MSH_SEGMENT).
  • Updates the README, the intro and installation pages, AGENTS.md and .changeset/README.md, which said every release is a patch or named the 0.1 line.
  • Adds a minor changeset with a "What a caller must change" table: each output field that changes, before and after, how to find it, and the renamed passed-through codes.

Why

@cosyte/transform 0.3 asks for @cosyte/hl7 and @cosyte/fhir 0.2 as peers. With fhir still at ^0.1.11, an install held two copies of each, and test/absent-sibling.test.ts failed, because our fhir range had to sit on transform's peer line. This change puts every sibling on the same line. The output changes it causes make this release 0.2.0. That minor is approved for this release.

Proof

  • pnpm test: 46 files, 828 tests passed.
  • Run against the old source: the new FHIR warning-shape test and the validate severity test failed. With fhir back at ^0.1.11, absent-sibling failed (expected '0.1' to be '0.2').
  • typecheck, lint, format:check, phi-scan, typecheck:examples, lint:examples, examples, phi-scan:examples, check:readme, check:claude-card, check:catalog, check:process, check:docs-content, check:docs-reference, check:no-emdash, check:no-internal-refs, attw, smoke, api-surface --all (no change to the surface), and cosyte-release-pr: all passed.
  • Packed the tarball and ran npm install of it in an empty directory outside the repo: exit 0. npm ls shows one copy each of hl7, fhir and ccda (0.2.0), deduped under deid 0.2.20, transform 0.3.0 and mllp 0.1.17, and no nested 0.1 copy. cosyte --version and an HL7 parse both run.
  • Left to CI: the Windows, macOS, Bun and Deno runs, coverage, mutation and the scaling gate.

Choices

  • @cosyte/mllp 0.1.17 refuses a frame that has a VT inside it (MLLP_PAYLOAD_CONTAINS_VT). parse and inspect now exit 65 on that input, where before they read the message after the second VT. The test now expects this, and the changeset lists it.
  • The inspect field issueCount keeps its name: it is a count of the same warnings.
  • The repo has no check that refuses a release that is not a patch, so this change adds none.

@NSchatz
NSchatz merged commit c7ce5e2 into main Nov 30, 2026
25 checks passed
@NSchatz
NSchatz deleted the build/parsers-0-2 branch November 30, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant