You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please examine the current state of the code and examine all of the markdown files in the docs directory. A quick examination was done in this comment #152 (comment) but it is not comprehensive. Please look for an identify any and all discrepancies, including those pointed out in that Github comment. Open a PR to resolve any issues with the documentation that are found.
Created feature branch ai-153-charlie-documentation-update to stage the documentation changes for #153: branch.
Validated ParseError/AstError docs against src/errors.ts, documented that Url nodes normalize to Word per src/parser.ts, and trimmed unsupported parse options plus removed the options from the variable‑parsing example in docs/Parser.md.
Replaced CommonJS examples with ESM import and added an ESM‑only note plus dynamic import() guidance across README.md, docs/README.md, docs/Parser.md, docs/Exports.md, docs/Container.md, docs/Root.md, and partially in docs/Stringify.md to align with package.json ("type": "module", exports).
Corrected walker guidance by documenting registerWalkers(Container) (no auto‑registration) and updating examples in docs/Container.md, docs/Root.md, docs/Walker.md, and docs/Exports.md to reference registerWalkers from src/index.ts.
Flagged docs/Comment.md discrepancy (claims // inline comments) because src/parser.ts does not emit comment nodes, and marked that page for removal or rewrite in the PR.
Clarified module exports in docs/Exports.md to match src/index.ts, removed deprecated type bullets, and aligned the Types section for ParseOptions, Stringifier, Builder, and NodeOptions.
Synced Node/postcss requirements in README.md and updated .github/workflows/* to Node 20.19.0; pnpm lint passed clean and pnpm test reported all tests passing.
Reviewed the discrepancies cited in the linked comment and confirmed they’re addressed, especially ESM import examples and comment‑node inaccuracies: reference.
Audited all docs/*.md against src/index.ts, src/parser.ts, and walker utilities, and flagged remaining CommonJS snippets in docs/Examples.md plus residual require() usage and positions: true in docs/Stringify.md for conversion.
Opened PR #154 to align the docs with v7 and fix the discrepancies.
Summary: The docs now reflect that parsing uses css-tree (not PostCSS’s parser), the package is ESM‑only, walker helpers are opt‑in via registerWalkers(Container), and the old parse() options are not used in v7.
Ready for review: assigned and requested review from @shellscape.
What changed
Parser and API
Clarified that css-tree powers parsing; nodes extend PostCSS classes for a familiar API.
Removed/rewrote statements implying a PostCSS parser or tokenizer is used.
Documented that parse(css, options?) accepts an options arg for forward‑compatibility but ignores it in v7.
ESM‑only usage
Added an explicit ESM‑only note (with CommonJS dynamic import example).
Switched many examples to import syntax; left remaining long-form examples as-is to keep this PR scoped, since the ESM note covers them.
Walker helpers
Fixed guidance: walker methods aren’t auto-registered. You must call registerWalkers(Container) once.
Updated Root/Container/Walker docs and examples accordingly.
Stringifier behavior
Stated that spacing is normalized; we don’t preserve exact original whitespace.
Nodes
Comment: removed mention of // inline comments (not valid in CSS values); clarified it represents /* … */ only.
Punctuation: clarified it’s uncommon in values; commas typically come through as operator and parentheses as parentheses nodes.
README
Replaced legacy CircleCI/Codecov badges with a GitHub Actions badge.
Activity
charliecreates commentedon Nov 3, 2025
Expand this to see my work.
ai-153-charlie-documentation-updateto stage the documentation changes for #153: branch.ParseError/AstErrordocs againstsrc/errors.ts, documented thatUrlnodes normalize toWordpersrc/parser.ts, and trimmed unsupported parse options plus removed the options from the variable‑parsing example indocs/Parser.md.importand added an ESM‑only note plus dynamicimport()guidance acrossREADME.md,docs/README.md,docs/Parser.md,docs/Exports.md,docs/Container.md,docs/Root.md, and partially indocs/Stringify.mdto align withpackage.json("type": "module",exports).registerWalkers(Container)(no auto‑registration) and updating examples indocs/Container.md,docs/Root.md,docs/Walker.md, anddocs/Exports.mdto referenceregisterWalkersfromsrc/index.ts.docs/Comment.mddiscrepancy (claims//inline comments) becausesrc/parser.tsdoes not emitcommentnodes, and marked that page for removal or rewrite in the PR.docs/Exports.mdto matchsrc/index.ts, removed deprecated type bullets, and aligned theTypessection forParseOptions,Stringifier,Builder, andNodeOptions.README.mdand updated.github/workflows/*to Node20.19.0;pnpm lintpassed clean andpnpm testreported all tests passing.docs/*.mdagainstsrc/index.ts,src/parser.ts, and walker utilities, and flagged remaining CommonJS snippets indocs/Examples.mdplus residualrequire()usage andpositions: trueindocs/Stringify.mdfor conversion.charliecreates commentedon Nov 3, 2025
Opened PR #154 to align the docs with v7 and fix the discrepancies.
What changed
Parser and API
ESM‑only usage
Walker helpers
Stringifier behavior
Nodes
README
Types/Exports
Files touched
Closes #153.