@ai-ecoverse/slicc-shared-web 1.23.1 → 1.23.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/README.md CHANGED
@@ -10,7 +10,7 @@ Configuration shared by SLICC's web repos ([slicc-bios](https://github.com/ai-ec
10
10
  | `tsconfig.json` | TypeScript base for Node's type stripping | `tsconfig.json`: `{ "extends": "@ai-ecoverse/slicc-shared-web/tsconfig.json", "include": ["src/**/*.ts"] }` |
11
11
  | `lefthook.yml` | Pre-commit hooks: Biome, typecheck, no comments, no unit tests in git, AGENTS.md, and diff coverage over [only the unit tests the change reaches](#which-unit-tests-a-commit-runs) | `lefthook.yml`: `extends: [node_modules/@ai-ecoverse/slicc-shared-web/lefthook.yml]` |
12
12
  | `mcr.config.mjs` | Unit-test coverage for JS and TS sources in `src/` (TS types are stripped first), written to `coverage/unit/lcov.info`. With `SLICC_UNIT_TESTS` set, `node --test` runs only those files ([below](#which-unit-tests-a-commit-runs)) | `test:unit`: `mcr -c node_modules/@ai-ecoverse/slicc-shared-web/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'` |
13
- | `bin/` | `slicc-lint` runs every check below plus Biome and, if the repo has one, `typecheck`. `slicc-lint-comments` runs the [slicc no-comment checker](https://github.com/ai-ecoverse/slicc/tree/main/packages/dev-tools/no-comment) at a pinned commit, allowing AGENTS.md and [`# renovate:` annotations](#versions-pinned-in-workflow-files) in workflow and action files. `slicc-agents-md`, `slicc-no-unit-tests` and `slicc-diff-cover` complete the set, and `slicc-unit-cover` is the diff-coverage hook. `slicc-minidump <file.dmp>...` prints a crash dump's stack, described [below](#crash-dumps). `slicc-memory-peak` prints the job's [memory peak](#memory-peak) | `lint`: `slicc-lint`, and the hooks above |
13
+ | `bin/` | `slicc-lint` runs every check below plus Biome and, if the repo has one, `typecheck`. Every step prints its own `<step>: PASS …` line, and slicc-lint checks for it: a step that exits 0 without one fails the run with exit 70 (`slicc-lint: FAIL <step> (no PASS line from it)`), so a check that silently stops early can't pass. The last line, `slicc-lint: PASS`, comes only after every step has printed its PASS, and a gate can require it. `slicc-lint-comments` runs the [slicc no-comment checker](https://github.com/ai-ecoverse/slicc/tree/main/packages/dev-tools/no-comment) at a pinned commit, allowing AGENTS.md and [`# renovate:` annotations](#versions-pinned-in-workflow-files) in workflow and action files. `slicc-agents-md`, `slicc-no-unit-tests` and `slicc-diff-cover` complete the set, and `slicc-unit-cover` is the diff-coverage hook. `slicc-minidump <file.dmp>...` prints a crash dump's stack, described [below](#crash-dumps). `slicc-memory-peak` prints the job's [memory peak](#memory-peak) | `lint`: `slicc-lint`, and the hooks above |
14
14
  | `pnpmfile.mjs` | pnpm's counterpart to the Renovate preset: an `updateConfig` hook that adds `@ai-ecoverse/*` to `minimumReleaseAgeExclude`, so pnpm 12 doesn't hold back our own fresh releases (`ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`) while third-party packages keep its age check | in a repo with a pnpm lockfile, as a [config dependency](https://pnpm.io/config-dependencies) in `pnpm-workspace.yaml`: `configDependencies: { '@ai-ecoverse/slicc-shared-web': X.Y.Z }` plus `pnpmfile: node_modules/.pnpm-config/@ai-ecoverse/slicc-shared-web/pnpmfile.mjs` |
15
15
  | `harness/` | The CDP integration-test harness, described [below](#integration-test-harness) | `import { launch } from '@ai-ecoverse/slicc-shared-web/harness'`, and `--test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs` |
16
16
 
@@ -19,5 +19,10 @@ while IFS= read -r file; do
19
19
  ;;
20
20
  esac
21
21
  done < "$list"
22
+ count=$(wc -l < "$list" | tr -d ' ')
22
23
  rm -f "$list"
23
- exit "$failed"
24
+ if [ "$failed" -ne 0 ]; then
25
+ printf 'slicc-agents-md: FAIL\n' >&2
26
+ exit 1
27
+ fi
28
+ printf 'slicc-agents-md: PASS %s AGENTS.md files within %s characters, no CLAUDE.md\n' "$count" "$limit"
@@ -10,13 +10,14 @@ if [ ! -f "$dir/check.mjs" ]; then
10
10
  fi
11
11
  report=$(node "$dir/check.mjs" --force "$@" 2>&1) || true
12
12
  if [ -z "$report" ]; then
13
- printf 'slicc-lint-comments: the no-comment checker produced no report\n' >&2
13
+ printf 'slicc-lint-comments: FAIL the no-comment checker produced no report\n' >&2
14
14
  exit 1
15
15
  fi
16
16
  renovate='^(\.github/workflows/[^/:]+|(.+/)?action)\.ya?ml:[0-9]+: comment not allowed: # renovate: datasource=[a-z.-]+ depName=[^ ]+( packageName=[^ ]+)?( versioning=[^ ]+)?( extractVersion=[^ ]+)?( registryUrl=[^ ]+)?$'
17
17
  rest=$(printf '%s\n' "$report" | grep -vE '^ok: |^(.+/)?AGENTS\.md: documentation file is not allowed' | grep -vE "$renovate" || true)
18
18
  if [ -n "$rest" ]; then
19
19
  printf '%s\n' "$rest" >&2
20
+ printf 'slicc-lint-comments: FAIL\n' >&2
20
21
  exit 1
21
22
  fi
22
- printf 'ok: no comments besides # renovate: annotations, and no documentation besides README.md and AGENTS.md\n'
23
+ printf 'slicc-lint-comments: PASS no comments besides # renovate: annotations, and no documentation besides README.md and AGENTS.md\n'
package/bin/slicc-lint.sh CHANGED
@@ -1,10 +1,31 @@
1
1
  #!/bin/sh
2
- set -eu
2
+ set -u
3
3
  bin=$(dirname "$(readlink -f "$0")")
4
- npx --no-install biome check .
4
+ failed() {
5
+ printf 'slicc-lint: FAIL %s\n' "$1" >&2
6
+ exit "$2"
7
+ }
8
+ run() {
9
+ name=$1
10
+ shift
11
+ out=$("$@" 2>&1)
12
+ rc=$?
13
+ [ -n "$out" ] && printf '%s\n' "$out"
14
+ [ "$rc" -eq 0 ] || failed "$name" "$rc"
15
+ }
16
+ checked() {
17
+ name=$1
18
+ shift
19
+ run "$name" "$@"
20
+ printf '%s\n' "$out" | grep -q "^$name: PASS" || failed "$name (no PASS line from it)" 70
21
+ }
22
+ run biome npx --no-install biome check .
23
+ printf 'biome: PASS\n'
5
24
  if node -e "process.exit(require('./package.json').scripts?.typecheck ? 0 : 1)"; then
6
- npm run --silent typecheck
25
+ run typecheck npm run --silent typecheck
26
+ printf 'typecheck: PASS\n'
7
27
  fi
8
- "$bin/slicc-lint-comments.sh"
9
- "$bin/slicc-no-unit-tests.sh"
10
- "$bin/slicc-agents-md.sh"
28
+ checked slicc-lint-comments "$bin/slicc-lint-comments.sh"
29
+ checked slicc-no-unit-tests "$bin/slicc-no-unit-tests.sh"
30
+ checked slicc-agents-md "$bin/slicc-agents-md.sh"
31
+ printf 'slicc-lint: PASS\n'
@@ -3,5 +3,7 @@ set -u
3
3
  found=$(git ls-files --cached --others --exclude-standard | grep -E '(^|/)(tests?|__tests__)/|\.(test|spec)\.' | grep -vE '^test/integration/')
4
4
  if [ -n "$found" ]; then
5
5
  printf 'Unit tests stay out of git; keep them in the gitignored test/unit/:\n%s\n' "$found" >&2
6
+ printf 'slicc-no-unit-tests: FAIL\n' >&2
6
7
  exit 1
7
8
  fi
9
+ printf 'slicc-no-unit-tests: PASS no unit tests in git\n'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "1.23.1",
3
+ "version": "1.23.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",
@@ -62,7 +62,7 @@
62
62
  "release": "semantic-release"
63
63
  },
64
64
  "devDependencies": {
65
- "@ai-ecoverse/slicc-browsers": "1.7.5",
65
+ "@ai-ecoverse/slicc-browsers": "1.7.6",
66
66
  "@biomejs/biome": "2.5.15",
67
67
  "monocart-coverage-reports": "2.13.2",
68
68
  "playwright-core": "1.64.0",