dcmjs 0.51.1 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,24 +56,41 @@ _Parts of DICOM that dcmjs *will not* focus on:_
56
56
 
57
57
  ## In Node
58
58
 
59
- ```None
60
- // To install latest _stable_ release
61
- npm install --save dcmjs
59
+ Add **dcmjs** to your application (pnpm):
62
60
 
63
- // To install latest code merged to master
64
- npm install --save dcmjs@dev
61
+ ```bash
62
+ pnpm add dcmjs # latest stable release
63
+ pnpm add dcmjs@dev # latest code merged to master
65
64
  ```
66
65
 
66
+ The same versions can be installed with `npm install` or Yarn in **your** project; those clients are fine for consuming the published package. **Building this repository** is pnpm-only (see below).
67
+
67
68
  ## For Developers
68
69
 
69
- ```None
70
+ Building and testing this repository requires **[pnpm](https://pnpm.io/)** and **Node.js 22.13 or newer** (pnpm 11 and this repo’s tooling expect that baseline; Rollup’s dependency chain expects a modern `crypto` global). CI runs tests on Node 22 and 24, and runs the production Rollup build on Node 24. The pnpm version is pinned under `packageManager` in `package.json`. Enable [Corepack](https://nodejs.org/api/corepack.html) (`corepack enable`) and use pnpm for every install and script:
71
+
72
+ ```bash
73
+ corepack enable
70
74
  git clone https://github.com/dcmjs-org/dcmjs
71
75
  cd dcmjs
72
- npm install
73
- npm run build
74
- npm test
76
+ pnpm install
77
+ pnpm run build
78
+ pnpm test
79
+ ```
80
+
81
+ Other common tasks:
82
+
83
+ ```bash
84
+ pnpm run build:examples # Rollup build + copy bundles into examples/js
85
+ pnpm run lint # ESLint (writes fixes)
86
+ pnpm run format # Prettier (writes)
87
+ pnpm run format:check # Prettier (check only)
75
88
  ```
76
89
 
90
+ **Yarn is no longer supported** for working in this repo: there is no `yarn.lock`, and installs, builds, and CI are aligned with `pnpm-lock.yaml` only. Use pnpm so dependency resolution matches lockfile and automation.
91
+
92
+ After changing dependencies in `package.json`, refresh the lockfile with `pnpm run install:update-lockfile` (or `pnpm install --no-frozen-lockfile`) before opening a PR.
93
+
77
94
  ## For Maintainers and Contributors
78
95
 
79
96
  Publish new version automatically from commit:
@@ -94,8 +111,9 @@ It is advised to use the git-cz, i.e.:
94
111
 
95
112
  - install git-cz
96
113
 
97
- ```
98
- npm install -g git-cz
114
+ ```bash
115
+ pnpm add -g git-cz
116
+ # or: npm install -g git-cz
99
117
  ```
100
118
 
101
119
  - how to commit
@@ -122,13 +140,13 @@ When DICOM standards are updated or new tags need to be added:
122
140
 
123
141
  1. **Generate the dictionary from DICOM standards** (downloads latest PS3.6 and PS3.7 XML from dicom.nema.org):
124
142
  ```bash
125
- npm run generate-dictionary
143
+ pnpm run generate-dictionary
126
144
  ```
127
145
  This creates/updates `generate/dictionary.js` with the latest tag definitions.
128
146
 
129
147
  2. **Pack the dictionary into optimized format**:
130
148
  ```bash
131
- npm run pack-dictionary
149
+ pnpm run pack-dictionary
132
150
  ```
133
151
  This generates the optimized `src/dictionary.fast.js` used at runtime.
134
152
 
@@ -168,7 +186,7 @@ Tests are written using the [Jest](https://jestjs.io) testing framework and live
168
186
 
169
187
  Pull requests should either update existing tests or add new tests in order to ensure good test coverage of the changes being made.
170
188
 
171
- To run all tests use `npm run test`. To only run specific tests use Jest's [`.only`](https://www.testim.io/blog/unit-testing-best-practices/) feature. If you're using VS Code, an extension such as [`firsttris.vscode-jest-runner`](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) can be used to step through specific tests in the debugger.
189
+ To run all tests use `pnpm test`. To only run specific tests use Jest's [`.only`](https://www.testim.io/blog/unit-testing-best-practices/) feature. If you're using VS Code, an extension such as [`firsttris.vscode-jest-runner`](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) can be used to step through specific tests in the debugger.
172
190
 
173
191
  Read all about unit testing best practices [here](https://www.testim.io/blog/unit-testing-best-practices/).
174
192