Installation
@cosyte/transform ships dual ESM + CJS builds with per-condition type declarations, so it works
from either module system without configuration. Its own third-party runtime dependencies are
zero - it depends only on two cosyte siblings.
Status: pre-alpha (
0.0.x). The package is published on npm, but it cannot be installed from npm yet: its@cosyte/fhirpeer dependency is not on the registry, so the command below fails to resolve. Until that peer publishes, consume it from source or a workspace link. See Peer dependencies below.
Prerequisites
- Node.js >= 22 (the whole
@cosyte/*suite targets ES2023 / Node 22+). - A package manager -
pnpm,npm, oryarn.
Install
npm install @cosyte/transform @cosyte/hl7 @cosyte/fhir
Peer dependencies
@cosyte/hl7 and @cosyte/fhir are declared as peer dependencies: transform maps between the
models they own, so a consumer supplies them. @cosyte/hl7 is on the registry. @cosyte/fhir is
not, and that is what blocks the install above - npm reports ERESOLVE and refuses to resolve the
@cosyte/fhir peer. There is no flag that makes this correct. --legacy-peer-deps does not help:
naming @cosyte/fhir on the command line then fails with a plain 404 Not Found instead, because
the package is not on the registry at all; dropping it and installing this package alone does
succeed, but leaves both peers genuinely absent at runtime, so the first conversion you attempt
fails.
Until @cosyte/fhir publishes, this repo's own tests build against vendored tarballs in
vendor/ (regenerated by pnpm vendor:refresh) - the same interim mechanism @cosyte/mllp uses,
replaced by a real npm install once the peer is on the registry.
Smoke test
Once you have a working install (today: from source or a workspace link), confirm the package resolves and reports the release you actually have:
import { VERSION } from "@cosyte/transform";
console.log(VERSION);
VERSION is the package's own version, kept in lockstep with it by the release tooling, so from
the next release onward what it prints is the release you are running.
Every release up to and including
0.0.4prints0.0.0. They all went out with the constant stuck at its scaffold value, and a published version is never re-published, so those copies stay wrong on the registry. So0.0.0does not identify which of them you have - it only tells you the constant is lying, not your install. Read the manifest instead, which was always correct:node -p "require('@cosyte/transform/package.json').version".
Head to the Quickstart.