Repository navigation
docs: release plan for landing 1.0 as staged package PRs, plus a pipeline smoke test - #518
Conversation
Supersedes the 2026-08-07 plan. Describes the package split, the 1.0-beta release branch, per-package staging branches, the test-first sequence for core, routing of the 33 review findings, and lockstep publishing with semantic-release. Co-Authored-By: Claude Fable 5 <[email protected]>
Two trivial assertions on the committed sample-sr.dcm fixture. The purpose is to exercise the CI checks on the 1.0-beta branch and prove they run and report on pull requests. See RELEASE_PLAN.md section 6, step 0. Co-Authored-By: Claude Fable 5 <[email protected]>
…e 24 fs.readFileSync can return a small file inside a larger shared memory pool. Taking .buffer on that result hands the parser the whole pool, with the file sitting at a nonzero offset, and the DICM marker check then fails. Node 24 pools more aggressively, which is why anonymizer.test.js and data.test.js fail there today (7 tests) while Node 22 passes by luck of alignment. This adds readFileAsArrayBuffer() to testUtils and routes all 22 file-read sites through it. Typed-array .buffer uses are untouched. Same class of problem as issue #311. Co-Authored-By: Claude Fable 5 <[email protected]>
…ware helper The first pass converted single-line fs.readFileSync(...).buffer sites. CI on Node 24 then failed in a second population: reads assigned to a variable first, with .buffer taken on a later line. This converts those sites in data.test.js, data-options.test.js, lossless-read-write.test.js and normalizers.test.js, and drops the imports that became unused. Sites that already handle byteOffset correctly are untouched. Co-Authored-By: Claude Fable 5 <[email protected]>
ensureTestDataDir checked for the directory and then created it. Two parallel jest workers can both pass the check, and the slower mkdir then fails with EEXIST, which failed test_multiframe_1 on one CI leg. mkdirSync with recursive:true succeeds whether or not the directory exists, so the check goes away. Co-Authored-By: Claude Fable 5 <[email protected]>
|
I think the first pr is to fix the ci. to publish beta channel @wayfarer3130 |
| | Package | What it does | Where the code is today | Published to npm? | | ||
| | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | | ||
| | `@dcmjs/core` | Reads and writes DICOM files, including the new event-stream reader that handles files larger than memory | `src/eventStream/`, `src/core/`, the reader/writer classes (`DicomMessage`, `DicomDict`, `ValueRepresentation`, `BufferStream`, `SplitDataView`, `Tag`, `DicomMetaDictionary`), `src/charset/`, `src/constants/`, the runtime dictionary files, `AsyncDicomReader` | Yes | | ||
| | `@dcmjs/parser` | The low-level tokenizer core (adapted from [dicom-parser], with its MIT license carried along) | `packages/parser/` | No — bundled inside `@dcmjs/core`'s build (recommendation; final call before the core branch merges) | |
There was a problem hiding this comment.
The dicom-parser should be dropped entirely from the 1.0 stream - that was something you were evaluating as the lazy parser and isn't to be carried forward.
|
|
||
| | Package | What it does | Where the code is today | Published to npm? | | ||
| | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | | ||
| | `@dcmjs/core` | Reads and writes DICOM files, including the new event-stream reader that handles files larger than memory | `src/eventStream/`, `src/core/`, the reader/writer classes (`DicomMessage`, `DicomDict`, `ValueRepresentation`, `BufferStream`, `SplitDataView`, `Tag`, `DicomMetaDictionary`), `src/charset/`, `src/constants/`, the runtime dictionary files, `AsyncDicomReader` | Yes | |
There was a problem hiding this comment.
Suggest this contain the ValueRepresentation, split data view, tag, charset, but neither readers nor writers, nor the async dicom reader
Lets put the legacy stuff in @dcmjs/legacy
and the new reader stuff in
@dcmjs/parser (NOT the parser you have below)
@dcmjs/generator for the output
| | `@dcmjs/core` | Reads and writes DICOM files, including the new event-stream reader that handles files larger than memory | `src/eventStream/`, `src/core/`, the reader/writer classes (`DicomMessage`, `DicomDict`, `ValueRepresentation`, `BufferStream`, `SplitDataView`, `Tag`, `DicomMetaDictionary`), `src/charset/`, `src/constants/`, the runtime dictionary files, `AsyncDicomReader` | Yes | | ||
| | `@dcmjs/parser` | The low-level tokenizer core (adapted from [dicom-parser], with its MIT license carried along) | `packages/parser/` | No — bundled inside `@dcmjs/core`'s build (recommendation; final call before the core branch merges) | | ||
| | `@dcmjs/schemas` | The machine-readable catalog of DICOM attributes: names, types, and rules, generated from the data dictionary | `src/schema/`, `schema/`, `generate/`, `types/` | Yes | | ||
| | `@dcmjs/dicomdir` | Reads and writes DICOMDIR, the index file on the CDs and USB drives patients receive | `src/media/` | Yes | |
There was a problem hiding this comment.
Lets call this media if it is media, otherwise call it dicomdir
| | `@dcmjs/schemas` | The machine-readable catalog of DICOM attributes: names, types, and rules, generated from the data dictionary | `src/schema/`, `schema/`, `generate/`, `types/` | Yes | | ||
| | `@dcmjs/dicomdir` | Reads and writes DICOMDIR, the index file on the CDs and USB drives patients receive | `src/media/` | Yes | | ||
| | `@dcmjs/fhir` | Translates between DICOM and FHIR, the data format U.S. regulations require for patient record access | `packages/fhir/` | Yes | | ||
| | `@dcmjs/pdfs` | Wraps PDF reports into DICOM instances and unwraps them again | `src/encapsulated/encapsulatedPdf.js` | Yes | |
There was a problem hiding this comment.
I think we should have a package that has data helpers for the bulk data generally - that would be a single package that has pdf, video and other data helpers.
Adding too many sub-packages needs to be balanced with having too few and I think this breakdown is a bit too granular.
There was a problem hiding this comment.
Ah, we can have packages that bundle other packages. I was thinking a @dcmjs/media package.
| | `@dcmjs/fixtures` | The DICOM files used by the test suites, each with documented origin and license | scattered today across `test/`, `packages/parser/testImages/`, `examples/data/` | No (kept private so installs stay small; can be published later if maintainers want) | | ||
| | `@dcmjs/tests` | Test suites that span several packages at once (integration and equivalence tests) | parts of `test/` | No | | ||
| | `@dcmjs/validator` | Future: checks datasets against `@dcmjs/schemas`. Only a scaffold for now; no working code exists yet | — | No, until it is real | | ||
| | `dcmjs` (the existing package) | Becomes a thin wrapper: the familiar 0.x surface (structured reports, derivations, adapters, utilities, anonymizer) plus a re-export of `@dcmjs/core`. It does **not** bundle the optional packages, which returns the bundle to roughly its 0.52 size | root `src/` minus everything above | Yes | |
There was a problem hiding this comment.
Build a dcmjs package, but lets not publish is quite yet - or perhaps publish it for now as @dcmjs/dcmjs so that both packages can be imported just by changing the import label. When ready, we will start publishing actual dcmjs builds.
There was a problem hiding this comment.
Yes, I very much agree. Bumping that up next.
wayfarer3130
left a comment
There was a problem hiding this comment.
Can you update package names/details as noted in the PR.
The FIRST publish doesn't have to be in the first commit - we can move things around until we are ready to try pushing.
| | 3 | `@dcmjs/schemas` | Nearly self-contained; nothing else in `src/` imports it. | | ||
| | 4 | Core test bank onto `release/1.0-beta-core` | The tests that define what core must do land **before** the code that does it — see section 7. | | ||
| | 5 | The 33 review findings, fixed one PR each, then `@dcmjs/core` itself | The heart of the release. | | ||
| | 6 | `@dcmjs/dicomdir`, `@dcmjs/pdfs`, `@dcmjs/video`, `@dcmjs/fhir` | Independent of each other once core exists; can proceed in parallel. | |
There was a problem hiding this comment.
I think Steve wants fhir out for now until later, please double check with him @pieper
There was a problem hiding this comment.
It won't be part of the core dcmjs, just as one of the extra libraries - that keeps it available/close, but separates it as desired.
Adopts wayfarer3130's review comments: the engines split from the data types (core = building blocks only; legacy = today's readers and writers; parser = the new streaming reader; generator = the new writers). The vendored dicom-parser tokenizer is dropped from the 1.0 stream entirely, and about 300 tests retire with it. @dcmjs/media is added as a bundle over dicomdir, pdfs, and video, which all remain individually installable. The wrapper publishes as @dcmjs/dcmjs during the beta so the real dcmjs name stays untouched until the team is ready. FHIR stays in the plan with its landing order marked as an open question. Section 7 is rewritten to the simpler tests-travel-with-code approach discussed since the first draft. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
…s sequencing Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
…arifications from review Rewrites the section-1 metaphor in direct terms and retitles section 6. Adds the breaking-change-commit requirement for the first 1.0.0-beta.1 version calculation, documents the private root package during the beta, records dist-tag promotion as a deliberate manual step, and fixes the appendix publishCmd to tag by channel instead of hardcoding beta. Co-Authored-By: Claude Fable 5 <[email protected]>
The @dcmjs npm organization is not ours; per review discussion the packages publish under @dcmjs-org (matching the GitHub organization), and the team can reconsider the shorter scope if its owner responds. Every package name in the plan now reads @dcmjs-org/. Co-Authored-By: Claude Fable 5 <[email protected]>
Backport of the test changes from 7afe17f (#518) on 1.0-beta. Since Node 24.21, fs.readFileSync() returns small files (e.g. sample-sr.dcm) inside a 64 KiB pooled ArrayBuffer, so passing `buffer.buffer` to DicomMessage.readFile() parses trailing pool memory. This broke anonymizer.test.js and data.test.js on the Node 24 CI job for every PR against master. Also makes test data dir creation race-free. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves the conflicts GitHub reported on PR #542. All fourteen came from PRs #518/#519 squash-merging onto 1.0-beta content that was co-developed with this branch, which hid the shared history. Resolution, per file: - DATACITATION.md and the nine conflicted test files: kept this branch's versions — 1.0-beta's copies are exact older snapshots of this branch's own history. - RELEASE_PLAN.md and .github/workflows/publish-package.yml: took 1.0-beta's versions — PR #519 deliberately superseded ours with the OIDC trusted-publishing rewrite and SHA-pinned actions. - pnpm-workspace.yaml: 1.0-beta's newer security config plus this branch's "packages/*" workspace entry (needed for packages/fixtures). - pnpm-lock.yaml: regenerated via pnpm install against the merged package.json. Verified with the full suite: 855 passed, 11 skipped. Co-Authored-By: Claude Fable 5 <[email protected]>
* fix(colors): convert DICOM CIELab relative to the D50 white point DICOM encodes CIELab values like the ICC Profile Connection Space (PS3.3 C.10.7.1.1), whose reference white is D50. Colors computed CIELab relative to D65 (the sRGB white point) without chromatic adaptation, so a*/b* were wrong for chromatic colors and dcmjs disagreed with DCMTK, PixelMed and highdicom. This ports DCMTK commit 88105877 (IODCIELabUtil): - sRGB -> linear RGB -> XYZ (D65) -> Bradford -> XYZ (D50) -> CIELab and the reverse, using the CSS Color Module Level 4 matrices and constants - clip out-of-gamut colors per channel instead of shifting all channels - add dicomlab2RGB8 / rgb82DICOMLAB helpers that round and clamp - add a test suite with the reference values shared with DCMTK/PixelMed Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: read test files into standalone ArrayBuffers Backport of the test changes from 7afe17f (#518) on 1.0-beta. Since Node 24.21, fs.readFileSync() returns small files (e.g. sample-sr.dcm) inside a 64 KiB pooled ArrayBuffer, so passing `buffer.buffer` to DicomMessage.readFile() parses trailing pool memory. This broke anonymizer.test.js and data.test.js on the Node 24 CI job for every PR against master. Also makes test data dir creation race-free. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(colors): address review of the D50 CIELab port - rgb82DICOMLAB: use Array.from so typed array input is not truncated - roundClamp returns 0 for NaN; clamp01/roundClamp are module functions, not public static methods - document that the XYZ functions are D50-relative, that d65WhitePointXYZ must not be mixed with them, and why D50 uses the x,y chromaticities - assert exact per-channel gamut clipping results in the tests - VTKjs adapter uses Colors.dicomlab2RGB8 - changelog entry for the corrected behaviour Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: use readFileAsArrayBuffer for the remaining inline buffer slices Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: correct the comment of the gamut clipping test Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Bill Wallace <[email protected]>
|
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This is the first small PR of the staged approach we discussed for #512. It has two jobs: put the release plan in the repo where everyone can mark it up, and prove that CI actually runs.
RELEASE_PLAN.md lays out the whole approach: which packages we're splitting out (
@dcmjs-org/core,@dcmjs-org/parser,@dcmjs-org/schemas,@dcmjs-org/tests,@dcmjs-org/fixtures, and so on), how the per-package staging branches work, the test-first sequence for core, what happens to each of the 33 findings from Bill's review map, and how publishing works. It's meant to be read top to bottom, and section 1 sums up the whole idea in a couple of paragraphs.The smoke test is deliberately trivial: two assertions on the
sample-sr.dcmfile that's already in the repo. Its only purpose was to make the checks run.Running them turned out to be worth it, because the pipeline caught two real problems on its first try:
Node 24 fails 7 existing tests, on master too. When Node reads a small file it sometimes hands you the file inside a larger shared memory buffer. Grab
.bufferoff that and you get the whole shared buffer, with your file sitting somewhere in the middle — so the parser goes looking for the DICM marker in the wrong place. Node 24 pools more aggressively than 22, which is why the same tests pass on one and fail on the other. Bill and Steve both flagged this in the feat: dcmjs 1.0 rewrite — event streaming, bounded-memory large files, FHIR, video, DICOMDIR #512 review, and it's the same family as Trouble doing basic loading #311. I added areadFileAsArrayBuffer()helper totestUtils.jsand pointed all the file-reading test code at it.A flaky temp-directory race. Two jest workers both check whether the shared temp directory exists, both find it doesn't, and the slower
mkdirdies with EEXIST.mkdirSyncwithrecursive: truedoesn't care whether the directory is already there, so the check-then-create is gone.Merging this publishes nothing and touches no library code. It gets the plan into the repo where follow-up PRs can cite it, and leaves the
1.0-betagate green, with all eight checks passing, on Node 22 and 24, for both the push and PR runs.