postcss-values-parser
postcss-values-parser copied to clipboard
docs(v7): sync docs with css-tree + ESM
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
importsyntax). - Walker helpers: not auto-registered — document
registerWalkers(Container)and update Root/Container/Walker docs and examples. - Remove/clarify unsupported
parse()options in v7; markParseOptionsas forward-compat only. - Fix Examples that suggested SCSS/LESS variable prefixes; note that
Word.isVariableonly 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.
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‑levelawait 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 ESMimportfor 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.