Repository navigation
feat: publish dcmjs 1.x under the unscoped dcmjs name too - #681
Merged
Merged
Conversation
… links - .releaserc.json: remove successComment: false, which was for the 1.0.0 release only. The 0.x entry uses the range 0.54.x, as on the 0.x branch (#648). - RELEASE_PLAN.md: the same changes, and why semantic-release cannot use the range 0.x. - codemods READMEs: link to docs on main, not master. Co-Authored-By: Claude Opus 5.5 <[email protected]>
packages/dcmjs is the package "dcmjs". Each entry re-exports the same entry of @dcmjs-org/dcmjs, so an application that uses both names gets one copy of the code. pnpm -r publish ships it with the other packages, and the stamp script gives it the same version. - packages/dcmjs: package.json, the ESM and CJS re-export files of ".", eventStream, media, encapsulated, image and dictionary, README. - test/package-exports.test.js: the alias has the same entry points as @dcmjs-org/dcmjs, and each entry file re-exports the same entry. - .releaserc.json, RELEASE_PLAN.md: the 0.x line publishes under the npm dist-tag 0.x, so that latest stays on 1.x. - README, MIGRATION.md, package-name codemod README: the unscoped name publishes 1.x; the codemod is optional. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ Deploy Preview for dcmjs2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
wayfarer3130
added a commit
that referenced
this pull request
Nov 27, 2026
npm does not permit the dist-tag 0.x, so @semantic-release/npm published the channel 0.x as release-0.x. With the channel release-0.x, the config, the git notes, the GitHub label and the npm dist-tag have one name. The git note of v0.54.2 already lists release-0.x, so the first run does not try to add the channel to v0.54.2 again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e-0.x (review of #681) - packages/dcmjs: a build step copies build/dcmjs.js (and its map) to dist/, and the unpkg and jsdelivr fields point at it, so that https://unpkg.com/dcmjs keeps working in a browser after 1.x takes latest (review B1, Q1). The dependency is workspace:^, so an app with a newer @dcmjs-org/dcmjs gets one copy of the code (Q2). - .releaserc.json, RELEASE_PLAN.md: the 0.x channel is release-0.x, the npm dist-tag that the 0.x line gets (Q3, S1). - README, MIGRATION.md: the first unscoped 1.x is 1.1.0 (S2); one copy when one version satisfies both names (N1); the unpkg URL serves the 1.x UMD build; the jest mapping also maps the dcmjs names (N2). - test: each ESM target that the alias re-exports has a default export (N3). Co-Authored-By: Claude Opus 5.5 <[email protected]>
wayfarer3130
added a commit
that referenced
this pull request
Nov 28, 2026
…eviews of #678 and #681) (#682) * docs: correct the 0.x release rules and links (review of #678) - The npm dist-tag of the 0.x line is release-0.x: npm refuses a dist-tag that is a version range, so semantic-release adds the prefix. [email protected] still installs the line, as a range. - The 0.x examples are at 0-x--dcmjs2.netlify.app (Netlify writes the "." of the branch name as "-"). - The rule is for the commit that lands on 0.x: for a PR with one commit, the squash merge uses the commit title, not the PR title. - Two ways to recover from a feat: commit: a revert, merged with "Rebase and merge" so that the revert message stays exact, or a ci: PR that raises the range to 0.55.x. - examples/vtkDisplay loads [email protected], not the unversioned name. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: name the 0.x channel release-0.x (review of #681, Q3) npm does not permit the dist-tag 0.x, so @semantic-release/npm published the channel 0.x as release-0.x. With the channel release-0.x, the config, the git notes, the GitHub label and the npm dist-tag have one name. The git note of v0.54.2 already lists release-0.x, so the first run does not try to add the channel to v0.54.2 again. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: 0.x requires a linear history; check the revert commit (review of #682) - Each commit that lands on 0.x counts. The branch requires a linear history, so a PR merges with "Squash and merge" or "Rebase and merge" (review S1, Q2). - The revert recovery tells the maintainer to check the title and the body of the revert commit before the merge (review S2). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
wayfarer3130
marked this pull request as ready for review
November 28, 2026 01:12
# Conflicts: # .releaserc.json # RELEASE_PLAN.md
|
🎉 This PR is included in version 1.1.0 🎉 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.
Summary
This PR publishes dcmjs 1.x under the unscoped name
dcmjs, in addition to@dcmjs-org/dcmjs. The new packagepackages/dcmjshas the namedcmjs. Each of its entries re-exports the same entry of@dcmjs-org/dcmjs. Thus an application that uses both names gets one copy of the code, and one copy of the reader state (the log level and theregisterTag()entries).This PR depends on two other PRs:
main. This branch starts from the branch of chore(release): comment on released PRs again; 0.x range 0.54.x; main links #679. Merge chore(release): comment on released PRs again; 0.x range 0.54.x; main links #679 first.0.x(both merged): the 0.x releases go to the npm dist-tagrelease-0.x, so they do not movedcmjs@latest.Changes
packages/dcmjs(new):package.json: the namedcmjs, the dependency"@dcmjs-org/dcmjs": "workspace:^", and the sameexportskeys as the root package:.,./eventStream,./media,./encapsulated,./image,./dictionaryand./package.json. On publish, pnpm writes^<version>, so an app with a newer@dcmjs-org/dcmjsgets one copy. Theunpkgandjsdelivrfields point atdist/dcmjs.js.copy-umd.mjs(thebuildscript, not published): copies the UMD buildbuild/dcmjs.jsand its map todist/. The rootpnpm run buildruns it after rollup, and the publish job runspnpm run build..mjs) and one CJS file (.cjs) for each entry. Each file re-exports the entry of@dcmjs-org/dcmjs../dictionaryis ESM only, as in the root package.README.md.test/package-exports.test.js: the check of the dualdistbuild skips the alias, because the alias has no build. A new block checks two things. The alias has the same entry points as@dcmjs-org/dcmjs. Each entry file re-exports the same entry of@dcmjs-org/dcmjs..releaserc.jsonandRELEASE_PLAN.md: the0.xentry has"channel": "release-0.x", the same as on the0.xbranch (ci: name the 0.x channel release-0.x; correct the 0.x release docs (reviews of #678 and #681) #682).README.md,docs/MIGRATION.mdand the README of thepackage-namecodemod: the unscoped name publishes 1.x. The codemod is optional.Release
The publish job needs no change:
pnpm -r publishpublishes each workspace package that is not private, and this package is not private.scripts/stamp-workspace-versions.mjsgives the package the same version as the other packages.dcmjsalready trustspublish-package.ymlwith the environmentpublish, with no branch restriction.The title starts with
feat:, so the merge releases1.1.0. The first unscoped 1.x version is thus[email protected]. To release the package as a fix version, change the title tofix:. Each later release frommainpublishesdcmjswithlatest.Change that users can see
npm install dcmjsinstalls 1.x. Before, it installed 0.x.^0.54.0stays on 0.x. A range that allows 1.x (*,latest,>=0.54) moves to 1.x.docs/MIGRATION.md.<script src="https://unpkg.com/dcmjs">loads the 1.x UMD build, which sets the same globaldcmjs.https://unpkg.com/[email protected]stays on 0.x.docs/MIGRATION.mdsays this.Verification
1.0.0for a scratch pack, and packed the root package and the alias. Then I installed both tarballs with npm in an empty project. For each entry (.,/eventStream,/media,/encapsulated,/image,/dictionary),importofdcmjsgives the same default export and the same named exports asimportof@dcmjs-org/dcmjs.requiregives the same object, except for/dictionary, which is ESM only.dcmjs.data.DicomMessage.readFileis a function.Until #679 merges, the diff of this PR also shows the commit of #679 (
37ad5d0).The review of this PR (B1, S1, S2, N1, N2, N3, Q1 to Q3) is applied in
2d97b91.🤖 Generated with Claude Code