Repository navigation
Version Packages - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@cssert/cli@0.2.0
Minor Changes
#2
7d7558dThanks @tokibito! - Reduce the friction of adopting cssert in a real project. Four defaults change;each has an opt-out, and
README.mdhas 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_moduleslives in a subdirectory(
cd frontend && cssert check --config ../cssert.config.mjsused to matchnothing). Globs passed as flags stay relative to cwd. New
root(config,relative to the config file) and
--root(CLI, relative to cwd) override thebase;
resolveFrom: "cwd"restores the old behaviour.Breaking:
--format githubemits one annotation per class, anchored at thefirst occurrence with the rest counted in the message
(
… (and 65 other places).). GitHub caps the annotations it displays per checkrun, 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-occurrencesrestores 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-baselinemakes the absence fatal;--no-baseline(or--baseline "", which used to fail with EISDIR) ignores anexisting baseline for one run.
Breaking:
baseline createfreezes only the kinds that fail the check(
--kind failing, the new default:missing, plusdynamic-suspectunder--fail-on-dynamic). Freezing dynamic-suspect findings keyed by whole templateexpressions made baselines rot on any edit to the expression.
--kind allrestores the old behaviour;
--kind missing|dynamic-suspectselects explicitly.Added:
--min-documents/--min-stylesheets(andminDocuments/minStylesheets) fail the run when fewer inputs arrived than expected, so aCI artefact that failed to download cannot pass as a green check. Reported in
every format through the new
Report.errors.so a green run says how much of the input it could not resolve.
sources: the input globs the finding was seen under.A finding listed only under your template glob is a page nobody rendered.
audit()acceptssourceon each document.hooks/--hookfor classes that are supposed to have no styles —allowsemantics, separate key so the config records the reason.baseline create|prune --dry-run.--versionnames 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 completethree-job GitHub Actions workflow.