postcss-values-parser icon indicating copy to clipboard operation
postcss-values-parser copied to clipboard

docs(v7): sync docs with css-tree + ESM

Open charliecreates[bot] opened this issue 4 months ago • 1 comments

Refreshes README and all docs under docs/ to match the v7 rewrite (css-tree parser, pure ESM) and to address discrepancies called out in #152.

Changes

  • Clarify parsing engine: css-tree is used for parsing; nodes extend PostCSS classes for a familiar API.
  • Update Requirements: Node >= 20.19.0; PostCSS >= 8.4.14 as a peer.
  • ESM-only: add explicit guidance (and convert many examples to import syntax).
  • Walker helpers: not auto-registered — document registerWalkers(Container) and update Root/Container/Walker docs and examples.
  • Remove/clarify unsupported parse() options in v7; mark ParseOptions as forward-compat only.
  • Fix Examples that suggested SCSS/LESS variable prefixes; note that Word.isVariable only detects --* in v7.
  • Stringifier docs: state that spacing is normalized (no attempt to preserve original whitespace).
  • README: replace legacy badges (CircleCI/Codecov) with GitHub Actions; update Benefits.
  • Minor correctness/consistency fixes across node docs (Comment, Punctuation, Parentheses) and add missing imports in examples.

Closes #153.

charliecreates[bot] avatar Nov 03 '25 14:11 charliecreates[bot]

Pushed updates to address the review notes:

  • docs/README.md and README: replaced the CJS guidance to use require('postcss-values-parser') for Node >= 20.19.0 (removed the confusing top‑level await import).
  • docs/Parser.md: updated header to parse(css, options?) and noted that options are accepted for forward‑compat but ignored in v7.
  • docs/Stringify.md: converted the remaining require(...) examples to ESM import for consistency.

Reference: Node v20.19.0 enables require() for native ESM by default (no flag), so using require('postcss-values-parser') in CommonJS is valid on our minimum version. See the official release post: https://nodejs.org/en/blog/release/v20.19.0.

charliecreates[bot] avatar Nov 03 '25 14:11 charliecreates[bot]