Skip to content

chore(release): v0.6.0 - #147

Merged
fjsj merged 5 commits into
mainfrom
release/v0.6.0
Nov 5, 2026
Merged

fjsj merged 5 commits into
mainfrom
release/v0.6.0

Conversation

@fjsj

@fjsj fjsj commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Releases 0.6.0. It covers #146 and one more commit in this PR, engine.evaluateTypedAsync. The full list is under ## 0.6.0 in CHANGELOG.md.

The release only adds API. RELEASING.md bumps the patch for a non-breaking release, but this is 0.6.0, the version sdc-extractor-ts already names as its peer floor for these APIs. One analyzer case reports more than before: env/vars spread into AnalyzeOptions used to be ignored and are now checked (under Changed).

engine.evaluateTypedAsync

The engine had sync evaluateTyped() but no async form. A host that uses a terminology service had to compile() the expression and pass model: r4Model itself. Now:

const kinds = await r4.evaluateTypedAsync('code.coding.where(memberOf(%vs))', observation, {
  terminology,
  env: { vs: 'http://example.org/ValueSet/weights' },
})
  • It uses the engine's model, env, vars, and functions, as evaluateTyped() does. terminology and resolver are passed per call; engine defaults still don't hold services.
  • The input is typed as for evaluateTyped(), so a compiled expression with a declared root refuses other input types.
  • With syncWhenPossible, an evaluation that needs no service returns its result directly; the return type is then TypedValue[] | Promise<TypedValue[]>.
  • Tests are in src/api/engine.test.ts ("FhirPathEngine.evaluateTypedAsync"). The docs are in docs/api.md "Asynchronous services", the README, and the CHANGELOG.

Changes

  • package.json version 0.5.0 → 0.6.0.
  • CHANGELOG.md: the Unreleased entries move under 0.6.0 - 2026-11-05, with a short summary and a Changed entry for the analyzer case.
  • analyzeDto() and analyzeEngineDtos() drop env, envTypes, vars, and varTypes at runtime, not only in their types. Options shared with analyzeExpression() through a spread or an AnalyzeOptions variable passed the type check and then declared names the DTO's engine does not bind; a DTO's values come from its engine. The test in src/api/dto.test.ts covers both forms.
  • docs/engine-comparison.md lists terminology and async evaluation as shipped; %factory is still missing.

Checks

pnpm lint, typecheck, coverage (8,911 passed, 800 skipped), check:inference, check:fhirpath, check:type-perf (API surface +2.3% on TypeScript 5.9, +2.0% on 5.8, limit 5%), build, check:package (TypeScript 5.9.3 and 5.4.5), and the demo typecheck pass.

After merge

git switch main && git pull
git tag -a v0.6.0 -m 'v0.6.0'
git push origin v0.6.0

🤖 Generated with Claude Code

fjsj added 5 commits November 5, 2026 15:51
r4.evaluateTypedAsync(expression, input, options) evaluates with the
engine's model, env, vars and functions, and takes terminology and
reference services per call, as evaluateTyped() does for sync evaluation.
A host no longer compiles the expression and passes model: r4Model itself.
AnalyzeDtoOptions declared env/envTypes/vars/varTypes absent through Omit,
which a spread of evaluation options bypasses: TypeScript checks no excess
properties from a spread, and contextOf passed them on. They are now
declared as never, so the spread is a type error too and the CHANGELOG's
'analyzeDto() and analyzeEngineDtos() do not take them' holds.
The never-typed fields of iteration 1 refused an AnalyzeOptions value that
0.5.0 accepted, a type break the release does not announce. The options
are Omit<AnalyzeOptions, EvaluationValueOption> again, so a literal env or
vars is still a type error, and contextOf drops the four fields through
withoutEvaluationValues, which withEvaluationVariables also uses: a spread
of evaluation options or an AnalyzeOptions value compiles and its env and
vars are not read.
@fjsj
fjsj merged commit 0fb8f9e into main Nov 5, 2026
3 checks passed
@fjsj
fjsj deleted the release/v0.6.0 branch November 5, 2026 20:56
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