From 30ad00779da503ab363bb781fd91f73e7242be6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 13 Sep 2026 14:54:49 +0000 Subject: [PATCH] Version Packages --- .changeset/proud-pumas-tap.md | 55 ---------------------------------- CHANGELOG.md | 56 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 57 insertions(+), 56 deletions(-) delete mode 100644 .changeset/proud-pumas-tap.md diff --git a/.changeset/proud-pumas-tap.md b/.changeset/proud-pumas-tap.md deleted file mode 100644 index 9ad664b..0000000 --- a/.changeset/proud-pumas-tap.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -"@cssert/cli": minor ---- - -Reduce the friction of adopting cssert in a real project. Four defaults change; -each has an opt-out, and `README.md` has an "Upgrading from 0.1" table. - -**Breaking: relative paths in a config file now resolve against the config -file's directory**, not the working directory, the way eslint/vitest/tsc do. -The same config gives the same result from any directory, which is what makes -cssert usable when `node_modules` lives in a subdirectory -(`cd frontend && cssert check --config ../cssert.config.mjs` used to match -nothing). Globs passed as flags stay relative to cwd. New `root` (config, -relative to the config file) and `--root` (CLI, relative to cwd) override the -base; `resolveFrom: "cwd"` restores the old behaviour. - -**Breaking: `--format github` emits one annotation per class**, anchored at the -first occurrence with the rest counted in the message -(`… (and 65 other places).`). GitHub caps the annotations it displays per check -run, so a single class used in 85 places used to hide every other finding — -worst on the first run, when the report is longest. `--annotate-occurrences` -restores per-occurrence annotations. Human and SARIF output are unchanged. - -**Breaking: a baseline file that does not exist no longer exits 2.** cssert -notes it on stderr and continues without suppression, so you can write the -config before freezing anything. `--require-baseline` makes the absence fatal; -`--no-baseline` (or `--baseline ""`, which used to fail with EISDIR) ignores an -existing baseline for one run. - -**Breaking: `baseline create` freezes only the kinds that fail the check** -(`--kind failing`, the new default: `missing`, plus `dynamic-suspect` under -`--fail-on-dynamic`). Freezing dynamic-suspect findings keyed by whole template -expressions made baselines rot on any edit to the expression. `--kind all` -restores the old behaviour; `--kind missing|dynamic-suspect` selects explicitly. - -Added: - -- `--min-documents` / `--min-stylesheets` (and `minDocuments` / - `minStylesheets`) fail the run when fewer inputs arrived than expected, so a - CI artefact that failed to download cannot pass as a green check. Reported in - every format through the new `Report.errors`. -- The summary counts documents that still contain unresolved class expressions, - so a green run says how much of the input it could not resolve. -- JSON findings carry `sources`: the input globs the finding was seen under. - A finding listed only under your template glob is a page nobody rendered. - `audit()` accepts `source` on each document. -- `hooks` / `--hook` for classes that are supposed to have no styles — - `allow` semantics, separate key so the config records the reason. -- `baseline create|prune --dry-run`. -- `--version` names the package (`cssert 0.2.0 (@cssert/cli)`). - -Docs: "What a green run does and does not prove" and a baseline operations -guide in the README; the Django recipe gains a pytest-based rendering recipe, -a note on rendering both branches of every `{% if %}`, and a complete -three-job GitHub Actions workflow. diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e8018..15d15c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,61 @@ # @cssert/cli +## 0.2.0 + +### Minor Changes + +- [#2](https://github.com/tokibito/cssert/pull/2) [`7d7558d`](https://github.com/tokibito/cssert/commit/7d7558d334efe0449757bd0aaa85c3dd6a51a17b) Thanks [@tokibito](https://github.com/tokibito)! - Reduce the friction of adopting cssert in a real project. Four defaults change; + each has an opt-out, and `README.md` has an "Upgrading from 0.1" table. + + **Breaking: relative paths in a config file now resolve against the config + file's directory**, not the working directory, the way eslint/vitest/tsc do. + The same config gives the same result from any directory, which is what makes + cssert usable when `node_modules` lives in a subdirectory + (`cd frontend && cssert check --config ../cssert.config.mjs` used to match + nothing). Globs passed as flags stay relative to cwd. New `root` (config, + relative to the config file) and `--root` (CLI, relative to cwd) override the + base; `resolveFrom: "cwd"` restores the old behaviour. + + **Breaking: `--format github` emits one annotation per class**, anchored at the + first occurrence with the rest counted in the message + (`… (and 65 other places).`). GitHub caps the annotations it displays per check + run, so a single class used in 85 places used to hide every other finding — + worst on the first run, when the report is longest. `--annotate-occurrences` + restores per-occurrence annotations. Human and SARIF output are unchanged. + + **Breaking: a baseline file that does not exist no longer exits 2.** cssert + notes it on stderr and continues without suppression, so you can write the + config before freezing anything. `--require-baseline` makes the absence fatal; + `--no-baseline` (or `--baseline ""`, which used to fail with EISDIR) ignores an + existing baseline for one run. + + **Breaking: `baseline create` freezes only the kinds that fail the check** + (`--kind failing`, the new default: `missing`, plus `dynamic-suspect` under + `--fail-on-dynamic`). Freezing dynamic-suspect findings keyed by whole template + expressions made baselines rot on any edit to the expression. `--kind all` + restores the old behaviour; `--kind missing|dynamic-suspect` selects explicitly. + + Added: + + - `--min-documents` / `--min-stylesheets` (and `minDocuments` / + `minStylesheets`) fail the run when fewer inputs arrived than expected, so a + CI artefact that failed to download cannot pass as a green check. Reported in + every format through the new `Report.errors`. + - The summary counts documents that still contain unresolved class expressions, + so a green run says how much of the input it could not resolve. + - JSON findings carry `sources`: the input globs the finding was seen under. + A finding listed only under your template glob is a page nobody rendered. + `audit()` accepts `source` on each document. + - `hooks` / `--hook` for classes that are supposed to have no styles — + `allow` semantics, separate key so the config records the reason. + - `baseline create|prune --dry-run`. + - `--version` names the package (`cssert 0.2.0 (@cssert/cli)`). + + Docs: "What a green run does and does not prove" and a baseline operations + guide in the README; the Django recipe gains a pytest-based rendering recipe, + a note on rendering both branches of every `{% if %}`, and a complete + three-job GitHub Actions workflow. + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index a79b0b9..364370a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cssert/cli", - "version": "0.1.0", + "version": "0.2.0", "type": "module", "description": "Contract testing for built CSS. Detect utility classes that went missing from your build output.", "keywords": [