Repository navigation
fix: purge safety, CLI and a11y fixes with new test guards - #7
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.
What and why
Fixes from a full audit of the compiler, the integrations, the CSS source and the test setup. Four branches, reviewed one by one, then merged and tested together.
Purge and CLI (
scripts/lib/compiler,scripts/cli.ts)goryno longer give order-dependent answers, and@pico { safelist }keeps a regex with spaces, commas or{n,m}as one token.build --purgewith content that reads no file now fails (exit 1, nothing written) instead of writing a near-empty stylesheet. A folder as content reads every file under it, and unreadable files are reported.tbodyandcolgrouprules when the content hastable,trorcol.--helpworks afterbuild,purgeandmatrix;matrixno longer takes a flag as its output folder; paths inside a--configfile resolve against that file.Integrations (
scripts/lib/integrations,scripts/integrations)pico-reforged purgestays inside the output folder (real paths, nonode_modules, no invalid UTF-8), computes every file before writing any, and writes through a temp file and a rename.@sourcereads.svg, the PostCSS project-folder exclusion works with a relativebase, the CSS statement scanner handles backslash escapes, and a keyframe used from another stylesheet or an inline style is kept.CSS (
src/)dir, nav date inputs use a logical padding.app-shell.cssnests three levels at most (minified output is byte-identical), badge solid colors are tokens.Tests and tooling
test/size/baseline.json), popover and the 11 extras are in the visual gate.test:contrast,test:scope,test:size:update.prepublishOnlyruns the checks.visualjob (visual gate, extras with axe, contrast).pnpm testbuilds the matrix once and no longer rewritesdist/.Docs: size numbers now come from the current build (the README claimed 3% smaller raw than v2.1.1; it is 1% larger raw and 7% larger gzipped), plus corrections to the testing and integration notes.
Behavior changes worth a release note: the purge failure on empty content, config-relative paths, exit code 2 for bad flags, six new
--pico-badge-*-solid-*tokens.AI use
Written by Claude Opus 5.5 subagents in Claude Code, planned and reviewed by Claude Fable 5.2 in Claude Code.
Checks
pnpm check,pnpm testandpnpm test:apipasspnpm buildandpnpm test:visualpass, and I looked at the reportAGENTS.md)docs/is updated, and the website docs in rusticstack/pico-reforged-website have an issue or pull requestsrc/orscripts/data/, not the generated files orcss/Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.