@ai-ecoverse/slicc-shared-web 2.13.1 → 2.13.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.
Files changed (2) hide show
  1. package/README.md +1 -1
  2. package/package.json +10 -2
package/README.md CHANGED
@@ -272,7 +272,7 @@ and the PR commits the `.githooks/` directory that the first `npm install` write
272
272
 
273
273
  The diff-coverage hook, `slicc-unit-cover`, runs only the unit tests that cover the staged change, then `slicc-diff-cover` on their `coverage/unit/lcov.info`, so every staged line in `src/` still has to run:
274
274
 
275
- - **Which directories are source:** `src/` by default, anywhere in the path, as before. A repo whose code lives elsewhere lists its directories in `package.json`: `"slicc": { "unitSources": ["extension", "six", "scripts"] }`, repo-relative, without `.` or `..` segments. `mcr.config.mjs` then collects coverage only from those directories, and the hook treats a staged file outside them as no code. A malformed list fails the hook.
275
+ - **Which directories are source:** `src/` by default, anywhere in the path, as before. A repo whose code lives elsewhere lists its directories in `package.json`: `"slicc": { "unitSources": ["extension", "six", "scripts"] }`, repo-relative, without `.` or `..` segments. `mcr.config.mjs` then collects coverage only from those directories, and the hook treats a staged file outside them as no code. A malformed list fails the hook. This repo lists its own `bin`, `harness`, `testing` and `unit`, and its `test:unit` uses the root `mcr.config.mjs`.
276
276
  - **What counts as changed:** the staged files (`git diff --cached --name-only`), and nothing else. `test/unit/` is gitignored, and repos that keep their unit tests in a store outside git sync the whole store into it before a commit, which brings in tests for code that is on other branches; so a unit test that is new or edited runs only when its imports reach a staged file, like any other. One that reaches nothing staged adds no coverage to the staged lines.
277
277
  - **Committing a merge, cherry-pick or rebase:** while `MERGE_HEAD` or `CHERRY_PICK_HEAD` exists, or a rebase is running and has stopped at `REBASE_HEAD`, only lines that are new against `HEAD` and against each of those commits count: conflict resolutions and edits made during the merge, not what the other side brought, which was covered where it was written. Diff coverage checks only those lines; the tests that run and the missing-lcov check follow the files that hold them, and files the merge itself deleted lines from, renamed, added empty or changed the mode of. A merge with no changes of its own is no code staged. A revert counts as usual.
278
278
  - **A unit test for code this tree doesn't have:** a test whose imports reach a staged file but also a code module under the sources that doesn't exist, isn't gitignored and isn't a staged deletion (a store test for a module on another branch) is skipped, and the hook names it in one line before the count. A missing `new URL(…, import.meta.url)` target, a missing non-code file such as `.wasm` or `.json`, and a missing file outside the sources or gitignored (a build output such as `dist/` or a bundled worker) don't skip the test.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "2.13.1",
3
+ "version": "2.13.2",
4
4
  "description": "Shared Renovate, Biome, TypeScript, lefthook and GitHub Actions configuration, plus the CDP integration-test harness, for SLICC's web repos",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -11,6 +11,14 @@
11
11
  "engines": {
12
12
  "node": ">=24"
13
13
  },
14
+ "slicc": {
15
+ "unitSources": [
16
+ "bin",
17
+ "harness",
18
+ "testing",
19
+ "unit"
20
+ ]
21
+ },
14
22
  "fledgling": {
15
23
  "provider": "github",
16
24
  "workflow": "ci.yml",
@@ -61,7 +69,7 @@
61
69
  "lint": "bin/slicc-lint.sh && shellcheck bin/*.sh",
62
70
  "pretest": "slicc-cdp install-browser",
63
71
  "test": "SLICC_PROFILE=1 node --test --test-global-setup=harness/global.mjs test/integration/*.test.mjs && node test/integration/verify.mjs",
64
- "test:unit": "mcr -c test/unit/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
72
+ "test:unit": "mcr -c mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
65
73
  "trust": "npx fledgling sync -y --skip-publish",
66
74
  "trust:dry": "npx fledgling sync --dry-run -y --skip-publish",
67
75
  "release": "semantic-release"