@thepalaceproject/circulation-admin 1.42.2 → 1.43.0-post.2

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/.node-version CHANGED
@@ -1 +1 @@
1
- 20.18.3
1
+ 24.16.0
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v20
1
+ v24
package/.nycrc.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/nycrc",
3
+ "extension": [".ts", ".tsx"],
4
+ "include": ["src/**/*.ts", "src/**/*.tsx"],
5
+ "exclude": ["src/**/__tests__/**", "src/testHelper.ts", "**/*.d.ts"],
6
+ "reporter": ["lcov", "text-summary"],
7
+ "report-dir": "coverage/mocha"
8
+ }
package/CLAUDE.md CHANGED
@@ -20,6 +20,9 @@ npm test # Full test suite (mocha legacy + jest)
20
20
  npm run test-jest # Jest tests only
21
21
  npm run test-jest-file <path> # Single jest test: npm run test-jest-file tests/jest/components/MyTest.test.tsx
22
22
  npm run test-file-ts <path> # Single mocha test: npm run test-file-ts src/components/__tests__/MyTest-test.tsx
23
+ npm run coverage # Both suites with coverage (what CI runs); writes coverage/{mocha,jest}/lcov.info
24
+ npm run coverage-ts # Mocha suite coverage only (nyc)
25
+ npm run coverage-jest # Jest suite coverage only
23
26
  npm run dev-test-axe # Dev build with react-axe accessibility checking (output in browser console)
24
27
  ```
25
28
 
@@ -68,6 +71,10 @@ The dev server can also read the backend URL from `.env` or `.env.local` with `B
68
71
 
69
72
  2. **Mocha** (legacy): Tests in `src/*/__tests__/` directories. Uses Enzyme with React 16 adapter. Do not add new mocha tests.
70
73
 
74
+ **Coverage:** Both suites report to Codecov under separate flags (`jest`, `mocha`). Each emits an istanbul `lcov` report — jest natively, mocha via `nyc` (configured in `.nycrc.json`) — so the two agree on which lines are executable and Codecov can merge them into a single union. Do not swap `nyc` for `c8`: c8's V8-based line mapping counts every physical line of a `.ts` file as executable, which reports untested-but-imported modules as 100% covered and corrupts the merge.
75
+
76
+ Jest's `roots` must keep `<rootDir>/src` so `collectCoverageFrom` can discover source files no jest test imports; `testMatch` (not `--roots`) is what keeps jest from picking up the mocha tests under `src/**/__tests__/`.
77
+
71
78
  ## Code Style
72
79
 
73
80
  - Prettier: double quotes, semicolons, trailing commas (es5), 80 char width
@@ -79,7 +86,7 @@ The dev server can also read the backend URL from `.env` or `.env.local` with `B
79
86
 
80
87
  ## Output
81
88
 
82
- Webpack builds to `dist/circulation-admin.js` (UMD library, global `CirculationAdmin`) and `dist/circulation-admin.css`. Node.js 20+ required.
89
+ Webpack builds to `dist/circulation-admin.js` (UMD library, global `CirculationAdmin`) and `dist/circulation-admin.css`. Node.js 24 required (>=24.0.0 <25.0.0).
83
90
 
84
91
  ## Code Conventions
85
92
 
package/README.md CHANGED
@@ -12,7 +12,7 @@ To see screenshots, read in-depth documentation, and find out more about the pro
12
12
 
13
13
  This package may be used in a local build of the Palace Project [Circulation Manager](https://github.com/ThePalaceProject/circulation), or it may be run against a remote Circulation Manager.
14
14
 
15
- This project uses Node.js 20. We recommend the latest version of Node.js 20.
15
+ This project uses Node.js 24. We recommend the latest version of Node.js 24.
16
16
 
17
17
  You have a number of options for installing Node.js. One convenient way on macOS is to use Homebrew and nvm to manage Node.js versions.
18
18
 
@@ -28,22 +28,22 @@ Install nvm using Homebrew:
28
28
  brew install nvm
29
29
  ```
30
30
 
31
- Install and use the latest version of Node.js 18, e.g. 18.14.2 with nvm:
31
+ Install and use the latest version of Node.js 24, e.g. 24.16.0 with nvm:
32
32
 
33
33
  ```
34
- nvm install 20.18.3
35
- nvm use 20.18.3
34
+ nvm install 24.16.0
35
+ nvm use 24.16.0
36
36
  ```
37
37
 
38
38
  Alternatively, you can use `nodenv` on macOS:
39
39
 
40
40
  ```
41
41
  brew install nodenv
42
- nodenv install 20.18.3
43
- nodenv global 20.18.3
42
+ nodenv install 24.16.0
43
+ nodenv global 24.16.0
44
44
  ```
45
45
 
46
- If you have different projects requiring different Node.js versions, you can use nodenv to set a local version for the project by navigating to the root directory of circulation-admin and executing `nodenv local 18.14.2`.
46
+ If you have different projects requiring different Node.js versions, you can use nodenv to set a local version for the project by navigating to the root directory of circulation-admin and executing `nodenv local 24.16.0`.
47
47
 
48
48
  You can also use the `n` npm package to manage Node.js versions, or simply install the Node.js binary directly.
49
49