Repository navigation
refactor: split the eager and async engines into packages/legacy - #565
Merged
Merged
Conversation
Adds packages/legacy/package.json and README.md, following the same scaffold precedent as @dcmjs/core (private, version 0.0.0 until the publish switch flips). The package depends on @dcmjs/core via workspace:*; the lockfile picks up the new project and link. Co-Authored-By: Claude Fable 5 <[email protected]>
… git mv) Pure file moves, zero edits: DicomMessage, DicomDict, AsyncDicomReader, and datasetToBlob. The rewiring commit in this PR repoints their building-block imports at @dcmjs/core and adds shims at the old paths. Co-Authored-By: Claude Fable 5 <[email protected]>
Hand-written rewiring for the pure-move commit before it: - the moved engines now import their building blocks from @dcmjs/core by name instead of relative paths; the only relative import left is DicomMessage -> DicomDict, which lives in this package - a shim at each old path under src/ re-exporting from the new packages/legacy location, so every existing import in src/, test/, and the root index keeps working unchanged - packages/legacy/src/index.js exporting the package surface, which also re-exports DicomMetaDictionary, the BufferStream classes, and SplitDataView from @dcmjs/core for surface compatibility Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Oct 2, 2026
|
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR starts the
@dcmjs/legacypackage — the second half of the package-folder split that #564 began. The engines dcmjs users run today (DicomMessage,DicomDict,AsyncDicomReader, and thedatasetToBlobhelpers) move intopackages/legacy, depending on@dcmjs/coreand nothing else.Same commit shape as #564:
packages/legacy/package.json(private, version 0.0.0, with"@dcmjs/core": "workspace:*"andpakoas its dependencies) and a README.git mv, zero edits — all four files record as R100 renames intopackages/legacy/src/.@dcmjs/coreby name instead of relative paths (the one import that stays relative isDicomMessage→DicomDict, which lives in this package), a two-line shim at each old path undersrc/keeps every existing import in src/, test/, and the root index working unchanged, andpackages/legacy/src/index.jsexports the package surface.On that surface: per the plan discussion,
@dcmjs/legacyre-exportsDicomMetaDictionary, theBufferStreamclasses, andSplitDataViewfrom@dcmjs/core— they've lived on the legacy surface historically, but their code is core's (see #564 for the placement reasoning on each). The direction of that edge is the point: legacy depends on core, never the reverse, so the sync reader can one day be deprecated and removed without touching core or the new engines.Nothing else moved.
decodeCorestill sits insrc/core/because it belongs to the streaming-reader wave, not here — it reads throughDicomMessage.lookupTagtoday, and breaking that edge is parser-split work, not move work. The anonymizer, normalizers, adapters, SR, and the rest of the classic extras stay in rootsrc/for the wrapper package (step 7 of the landing order).The hand-written total is about 90 changed lines (scaffold 37, import rewiring 29, shims 8, index 18), well under the 500 budget; the pure moves are exempt and declared above. After each commit group: the full suite is 844 passed / 12 skipped / 856,
pnpm run buildproduces the same bundle surface (UMD export names checked against the previous build), and lint and format pass.🤖 Generated with Claude Code