Skip to content

Commit 85150dd

Browse files
Fix Jest 30 compatibility and standardize on pnpm. (#259)
Add jest-environment-jsdom, update custom transformers for Jest 28+, move security overrides to pnpm-workspace.yaml, and remove leftover bun references from hooks and docs.
1 parent 2ff6b71 commit 85150dd

9 files changed

Lines changed: 368 additions & 244 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ typings/
5454
# Yarn Integrity file
5555
.yarn-integrity
5656

57+
# Bun lockfile
58+
bun.lock
59+
bun.lockb
60+
5761
# dotenv environment variables file
5862
.env
5963

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env sh
22
# Block commit if lint or format fails (biome check runs both)
3-
bun run lint
3+
pnpm run lint

docs/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ <h2>Citation</h2>
131131
}
132132
</code></pre>
133133
<h2>Installation</h2>
134-
<p>Install the <a href="https://www.npmjs.com/package/dicom-microscopy-viewer">dicom-microscopy-viewer</a> package using the <code>bun</code> package manager:</p>
135-
<pre class="prettyprint source lang-None"><code>bun add dicom-microscopy-viewer
134+
<p>Install the <a href="https://www.npmjs.com/package/dicom-microscopy-viewer">dicom-microscopy-viewer</a> package using your preferred package manager:</p>
135+
<pre class="prettyprint source lang-None"><code>pnpm add dicom-microscopy-viewer
136136
</code></pre>
137137
<h2>Development &amp; Testing</h2>
138138
<p>We use <a href="https://babeljs.io/">Babel</a> to compile (transpile), <a href="https://webpack.js.org/">webpack</a> to bundle, and <a href="https://github.com/facebook/jest">Jest</a> to test JavaScript code.</p>
@@ -141,14 +141,14 @@ <h2>Development &amp; Testing</h2>
141141
cd dicom-microscopy-viewer
142142
</code></pre>
143143
<p>Install dependencies and build the package:</p>
144-
<pre class="prettyprint source lang-None"><code>bun install
145-
bun run build
144+
<pre class="prettyprint source lang-None"><code>pnpm install
145+
pnpm run build
146146
</code></pre>
147147
<p>Run tests:</p>
148-
<pre class="prettyprint source lang-None"><code>bun run test
148+
<pre class="prettyprint source lang-None"><code>pnpm run test
149149
</code></pre>
150150
<p>Build the API documentation:</p>
151-
<pre class="prettyprint source lang-None"><code>bun run generateDocs
151+
<pre class="prettyprint source lang-None"><code>pnpm run generateDocs
152152
</code></pre>
153153
<h2>Support</h2>
154154
<p>The developers gratefully acknowledge their reseach support:</p>

package.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@babel/preset-env": "^7.16",
3333
"@babel/runtime-corejs3": "^7.15.4",
3434
"@biomejs/biome": "2.3.13",
35-
"babel-jest": "27.5",
35+
"babel-jest": "^30.4",
3636
"babel-loader": "^8.2.3",
3737
"babel-plugin-transform-import-meta": "^2.3.3",
3838
"chai": "^6.2.2",
@@ -42,6 +42,7 @@
4242
"css-loader": "^6.7.1",
4343
"jest": "^30.4",
4444
"jest-canvas-mock": "^2.3",
45+
"jest-environment-jsdom": "^30.4",
4546
"jsdoc": "^4.0.2",
4647
"open-cli": "^7.0.1",
4748
"terser-webpack-plugin": "^5.2.2",
@@ -82,13 +83,5 @@
8283
"webpack:dynamic-import:watch": "webpack --progress --watch --config ./config/webpack/webpack-dynamic-import",
8384
"webpack:watch": "webpack --progress --watch --config ./config/webpack/webpack-bundle",
8485
"prepare": "husky"
85-
},
86-
"pnpm": {
87-
"overrides": {
88-
"braces": "3.0.3",
89-
"form-data": "3.0.5",
90-
"minimatch": "3.1.5",
91-
"serialize-javascript": "7.0.5"
92-
}
9386
}
9487
}

0 commit comments

Comments
 (0)